It was a
placer to share some amazing time with the Metro Toronto .Net User Group. Last
night was also a special one, we hosted the event at the amazing @MarsDD it was
great to have a huge group interested in Artificial Intelligence.
it’s time to share the resources of the event
During the next couple of months, I’ll be sharing some amazing experiences around AI. Some of these experiences includes IoT devices like a Raspberry Pi, and of course some Machine Learning.Net (ML.Net). Because ML.Net is built with .Net Core, it makes sense to share the 5 simple steps you need to do to install .Net Core in a Raspberry Pi.
my 1st try was to navigate to the official .Net page (see
references), which automatically detect my Linux distro and proposes a set of
completely sure that I’m working in a 32 bits environment, however I’ll double
check this with the following commands
sudo apt-get install lshw lshw
After installing lshw I confirm that I’m in a 32 bit environment
Bonus: lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).
Now I need to navigate to the download page to download the
specific Linux 32-bit version (see references).
Once I got the image downloaded its time to extract the file
on a specific folder. I’ve created a folder named “dotnet” with the following command
sudo mkdir -p dotnet
And to extract the image from the Downloads folder
sudo tar zxf dotnet-sdk-2.2.401-linux-arm.tar.gz -C
Let’s create a symbolic link to the extracted binaries
sudo ln -s /home/pi/dotnet/dotnet /usr/local/bin
And it’s done! Let’s invoke the .DotNet help command to test
Now we can follow the steps of [.NET Core on Raspberry Pi,
see references] to create a Console Application and to test the device.
To create a new console App
dotnet new console
And test the app
sudo dotnet run
We can publish the app for linux / raspberry pi
sudo dotnet publish -r linux-arm
And copy the generated folder to be used in another device
So next steps will be some other tests with Raspberry Pi and
.Net Core. And the following image is a big teaser of this
recursos para comenzar a aprender Machine Learning. Sin embargo, suele ser
complicado elegir uno que realmente se adapte a nuestro perfil, y que nos
permita aprender de forma coherente y concisa los principios de Machine
Learning. Si trabajas con tecnologías Microsoft o eres un programador .Net,
este curso es para ti.
curso veremos los conceptos principales que explican el estado actual de
Machine Learning; y aprenderemos utilizando ML.NET (Machine Learning.Net ).
ML.Net es un conjunto de herramientas que ha alcanzado de forma oficial su
versión Release y que será la base del aprendizaje de Machine Learning. Veremos
escenarios para aprendizaje supervisado y no supervisado, escenarios de
análisis de sentimientos de texto, escenarios de integración con otras
tecnologías de ML, como ONNX o TensorFlow, y mucho más.
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.