Skip to Content
Hands-On Industrial Internet of Things
book

Hands-On Industrial Internet of Things

by Giacomo Veneri, Antonio Capasso
November 2018
Intermediate to advanced
556 pages
14h 42m
English
Packt Publishing
Content preview from Hands-On Industrial Internet of Things

Building the training model

To deploy our model on the cloud, we need to write a simple Python file, train.py, with the code of our logistic regression model. For our convenience, we have reported the accuracy to the Azure portal using the logging function of the Azure ML service. The code to do this is as follows:

run = Run.get_context()run.log('accuracy', np.float(acc))

When the model has been built and trained, we can dump it in the Azure ML repository, so that we can restore it during the init() method of core.py:

from sklearn.externals import joblibjoblib.dump(value=logreg, filename='outputs/sklearn_windturbine_model.pkl')
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Internet of Things

Internet of Things

S. Velliangiri, Sathish A.P. Kumar, P. Karthikeyan
Industrial Internet Application Development

Industrial Internet Application Development

Alena Traukina, Jayant Thomas, Prashant Tyagi, Veera Kishore Reddipalli

Publisher Resources

ISBN: 9781789537222Supplemental Content