Principles of machine learning (ML) are applied to models that support skyrmion phases in two dimensions. Most successful predictions were found when a convolutional neural network (CNN) layer was inserted as well as several layers of neural networks. A new training scheme based on features of the input configuration such as magnetization and spin chirality is introduced to make reliable predictions on the mixed phases, consisting of either a mixture of spiral and skyrmions or of skyrmions and ferromagnets. It proved possible to further train external parameters such as the external magnetic field and temperature and make reliable predictions on them. The predictive capacity of the ML continued to apply to configurations that are not generated by the original Hamiltonian used in the training stage, but a different Hamiltonian adiabatically connected to the original one.