Depending on the machine learning model you plan to use, you will be required to install specific Python packages like pandas, NumPy, or sklearn. You can figure out which packages you need to install by checking the import statements of your machine learning Python file. One package that needs to be installed is coremltools—it is really mandatory for your purpose of converting an existing machine learning model into the MLModel format.
- [Instructor] We are currently preparing everything so that we can convert an existing machine learning model into the ML model format that we need for ASCII code; and what we did so far was to install a virtual environment that we can use for Core ML tools, and we also installed the Core ML tools into this virtual environment. And what we are doing now really depends on the machine learning framework on the machine learning model that you use in your application, and this is our gender to names model that we have used in the last session; and here I can see that we are importing a library called pandas, numpy, and a library called sklearn, which is very popular for machine learning in Python.
And this is going to create our model for us, this little file here. We are going to see it in the next video again, but from that I can learn that I need to have the pandas, numpy, and sklearn library added to my system or to my virtual environment; so what I need to do is, first of all, install using pip install -U pandas. This is the first library that I need. Then I also have to use pip install -U installing numpy and, of course, also the last one, which is sklearn; and for me that already happened.
In your case, this could take some time; and please remember that when you use a machine learning model, then these libraries you install on your machine could differ depending on the machine learning model you use. So these are the dependencies that we have installed now; and in the next video, we are going to use the Core ML tools to convert our existing model into the ML model format.
- What are machine learning, Core ML, Vision, and NLP?
- Adding a machine learning model to a project
- Getting predictions from machine learning models
- Converting existing machine learning models for Core ML
- Classifying images and detecting objects with Vision and Core ML
- Analyzing natural language text with NSLinguisticTagger