ML.NET Model Builder provides an easy to understand visual interface to build, train, and deploy custom machine learning models. Prior machine learning expertise is not required. Model Builder supports AutoML, which automatically explores different machine learning algorithms and settings to help you find the one that best suits your scenario.
The tool is on Preview, but it’s still an amazing one to play around with ML. So I decided to give it a try with my small data set of kids, the one I use on the Machine Learning.Net demos.
The structure of my CSV file is very simple with just 3 columns: Age, Gender and Label.
However the first time I run the scenario I found the following error.
Inferring Columns ...
Creating Data loader ...
Loading data ...
Exploring multiple ML algorithms and settings to find you the best model for ML task: regression
For further learning check: https://aka.ms/mlnet-cli
| Trainer RSquared Absolute-loss Squared-loss RMS-loss Duration #Iteration |
[Source=AutoML, Kind=Trace] Channel started
Exception occured while exploring pipelines:
Provided label column 'Label' was of type String, but only type Single is allowed.
System.ArgumentException: Provided label column 'Label' was of type String, but only type Single is allowed.
at Microsoft.ML.CLI.Program.<>c__DisplayClass1_0.<Main>b__0(NewCommandSettings options)
Please see the log file for more info.
Which makes a lot of sense, my Label column is a String and the Model Builder expects a Single data type. So, I updated my data file replacing the labels with numbers and I was ready for a 2nd test.
This time the training process started fine, however I noticed that using just a small training dataset didn’t trigger any comparing between different algorithms. So I created a much bigger training dataset, and now I got the training process up and running.
At the end the results are the ones below. And it’s very interesting. I do most of my demos using a MultiClass SDCA trainer and AutoML suggest me to use a LightGBM trainer. This will be part of my Machine Learning.Net speech for sure in the future.
Grandes speakers como Scott Hanselman y otros, estaran en una sesion de 7 horas presentando la ultima version de Visual Studio. El evento oficial y los detalles se pueden encontrar en https://visualstudio.microsoft.com/vs2019-launch/ , es tiempo de agregar el reminder y disfrutar el nuevo IDE !
Scott Hanselman and other amazing set of speakers will host a 7 hour session introducing the latest version of Visual Studio. So, go to https://visualstudio.microsoft.com/vs2019-launch/ , add the reminder to your calendar and get ready also for some local launch events !
Let me start with IANAPU [I am not a Python user], and that’s maybe why, when I need to work and understand what is in my current environment it took me a lot of time to get and deploy the correct tools and the right packages to work with. I’m not a fan of console environments, and if we add this to the 90% of the Python work, that maybe the main problem.
Visual Studio Code is amazing environment to work with Python. So far, is good enough for me and my machine learning devs. I’ll became a brand-new Mac user in the next couple of days, so I hope that everything I’ve learned is the same on Mac.
I was trying some of the new features in Visual Studio 2019 Preview 2, and the options to manage Python environments blown my mind.
Let’s start with a single Python Application in the solution explorer. With 2 clicks I know what I have in my environment: current python version, packages and more.
With 2 clicks I can add a new environment, where I can choose the Python version, a base Anaconda environment, and tons of options more.
If we decided to create an Anaconda working environment, we can load our working packages from a file, or from a cool drop-down list.
Adding and upgrading packages is done with the usual Visual Studio integrated experience
Of course, we have the option to review the Console logs, to understand the background processes
Virtual environment is being created at '...\Python\PythonApplication1\envBlog01'
Virtual environment was successfully created at '...\Python\PythonApplication1\envBlog01'
----- Creating 'envBlogConda01' -----
Solving environment: ...working... done
## Package Plan ##
environment location: d:\ProgramData\Anaconda3\envs\envBlogConda01
==> WARNING: A newer version of conda exists. <==
Preparing transaction: ...working... done
current version: 4.5.4
latest version: 4.6.1
Please update conda by running
$ conda update -n base conda
Verifying transaction: ...working... done
Executing transaction: ...working... done
# To activate this environment, use:
# > activate envBlogConda01
# To deactivate an active environment, use:
# > deactivate
# * for power-users using bash, you must source
----- Successfully created 'envBlogConda01' -----
---- Installing 'numpy' -----
Downloading https://files.pythonhosted.org/packages/31/7e/8905636f7e4f9b9d7078aa0e701500634f832f145855a11beb098d3b0fb1/numpy-1.16.0-cp36-cp36m-win_amd64.whl (11.9MB)
Installing collected packages: numpy
Successfully installed numpy-1.16.0
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
----- Successfully installed 'numpy' -----
---- Installing 'pip' -----
Downloading https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl (1.4MB)
Installing collected packages: pip
Found existing installation: pip 10.0.1
Successfully uninstalled pip-10.0.1
Successfully installed pip-19.0.1
----- Successfully installed 'pip' -----