Click here to Skip to main content
15,885,366 members
Articles / Artificial Intelligence / Machine Learning

Export Options in ANNdotNET

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
1 Nov 2018CPOL3 min read 6.6K   4  
Export options in ANNdotNET

ANNdotNET v1.0 has been released a few weeks ago, and the feedback is very positive. Also, up to now, there isn't any blocking or serious bug in the release which makes me very happy. For this blog post, we are going through Export options in ANNdotNET.

The ANNdotNET is supposed to be an application which can offer whole life-cycle for machine learning project: from the defining raw data set, cleaning and features engineering, to training and evaluation of the model. Also, with different mlconfig files within the same project, the user has the ability to create as many ml configurations as  she/he wants. Once the user selects the best ml configuration, and the training and evaluation process completes, the next step in ML project life-cycle is the model deployment/export.

Currently, ANNdotNET defines three export options:

  • Export model result to CSV file,
  • Export model and model result to Excel, and
  • Export model in CNTK file format.

With those three export options, we can achieve many ML scenarios.

Export to CSV

Export to CSV provides exporting actual and predicted values of testing data set to comma separated txt file. In case the testing data set is not provided, the result of validation data set will exported. In case neither testing nor validation dataset is provided, the export process is terminated.

The export process starts by selecting the appropriate mlconfig file. The network model must be trained prior to be exported.

2018-10-22_9-35-07.png

Once the export process completes, the csv file is created on disk. We can import the exported result in Excel, and similar content will be shown as image below:

1265389/2018-10-22_11-40-49.png

Exported result is shown in two columns: the actual and predicted values. In case the classification result is exported, in the header, the information about class values is exported.

Export to Excel

Export to Excel option is more than just exporting the result. In fact, it is deployment of the model into Excel environment. Besides exporting all defined datasets (training, Validation, and Test), the model is also exported. Predicted values are calculated by using ANNdotNET Excel Add-in, which the model evaluation looks like calling ordinary Excel formula.  More information how it works can be found here.

1265389/2018-10-22_12-25-20.png

Exported xlsx file can be opened, and the further analysis for the model and related datasets can be continued. The following image shows exported model for Concrete Slum Test example. Since only two datsets are defined (training and validation), those datasets are exported. As can be seen, the predicted column is not filled, only the row is filled with the formula that must be evaluated by inserting equal sign “=” in front of the formula.

1265389/2018-10-22_12-29-08.png

Once the formula is evaluated for the first row, we can use Excel trick to copy it in the other rows.

The same situation is for other data sets separated in Excel Worksheets.

Export to CNTK

The last option allows to export CNTK trained model in CNTK format. Also, ONNX format will be supported as soon as it is available on CNTK for C# library. This option is handy in situations where trained CNTK model is being  evaluated in other solutions.

For this blog post, there is a short video about the ANNdotNET export options.

https://github.com/bhrnjica/anndotnet/blob/master/Tutorials/export_options_in_anndotnet.mp4

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Bosnia and Herzegovina Bosnia and Herzegovina
Bahrudin Hrnjica holds a Ph.D. degree in Technical Science/Engineering from University in Bihać.
Besides teaching at University, he is in the software industry for more than two decades, focusing on development technologies e.g. .NET, Visual Studio, Desktop/Web/Cloud solutions.

He works on the development and application of different ML algorithms. In the development of ML-oriented solutions and modeling, he has more than 10 years of experience. His field of interest is also the development of predictive models with the ML.NET and Keras, but also actively develop two ML-based .NET open source projects: GPdotNET-genetic programming tool and ANNdotNET - deep learning tool on .NET platform. He works in multidisciplinary teams with the mission of optimizing and selecting the ML algorithms to build ML models.

He is the author of several books, and many online articles, writes a blog at http://bhrnjica.net, regularly holds lectures at local and regional conferences, User groups and Code Camp gatherings, and is also the founder of the Bihac Developer Meetup Group. Microsoft recognizes his work and awarded him with the prestigious Microsoft MVP title for the first time in 2011, which he still holds today.

Comments and Discussions

 
-- There are no messages in this forum --