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 surrogate model with logistic regression and Scikit-Learn

The first step is to build our simulated data. The following code generates the training dataset. The dataset is made up of two columns, wind and power, an array, X_train, and one column array, y_train.

The y_train contains the value 0 when the relation between wind and power is an anomaly and is marked as 1 using an additional variable:

X_train=[]y_train=[]# regular dataX_train.extend( [[x ,wind_turbine_model(x)] for x in range(0,30)] )y_train.extend( [1 for x in range(0,30)] )# anomaly datafor x in range(15,30): X_train.extend([[x, 50 + x*random.random()]]) y_train.extend([0])

To generated the regular data, we used the wind_turbine_model() function. To generate anomaly ...

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