Using pre-trained scikit-learn (sklearn) model in AzureML
The purpose of this AzureML template is to demonstrate how to use a pre-trained scikit-learn (sklearn) model in AzureML.
While playing with AzureML features, I found that there is no option to save a trained python model. The work-around I found for the same is to build a model offline using sklearn; bundle and attach as a data-set to AzureML. The bundle will contain a script to unpickle the trained model and make prediction. To test this I used the Boston data-set and created a LinearRegression model with sklearn. Viola it worked with the work-around inside AzureML.
To test the template you have to enter the Boston data with-out the medv variable in the "Enter Data" module. Run the experiment. Check the result data-set from the "Execute Python" module.
E.g:
crim,zn,indus,chas,nox,rm,age,dis,rad,tax,ptratio,black,lstat
0.00632,18.0,2.31,0,0.5379999999999999,6.575,65.2,4.09,1,296,15.3,396.9,4.98
The Python code used for this experiment with the trained model is available at:
https://github.com/jaganadhg/azureml-pretrained-sklearn.
The one problem which I was not able to crack is with publishing web-service API. I will spend some time later and will crack the same too :-).