Skip to Content
Analytics for the Internet of Things (IoT)
book

Analytics for the Internet of Things (IoT)

by Andrew Minteer
July 2017
Beginner to intermediate
378 pages
10h 26m
English
Packt Publishing
Content preview from Analytics for the Internet of Things (IoT)

Random forest R examples

Again, this is where R shines (and also is dangerous), as it can do a lot of the tuning for you. We will show some example code to demonstrate what a few lines of R code can do. But the author recommends careful testing and data exploration before settling on the parameters and methods.

This code takes the imputed values from the mice section and predicts if the temperature is warmer than the average (which we categorize as hot) or cooler than the average (cold), based on the values for Wind, Ozone, and Solar radiation:

#Add classes to the imputed data based on Temperature.#This is what will be the target variable for the random forest modelcs_example_data$tempClass <- ifelse(cs_example_data$Temp > 0,"hot","cold") ...
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

Big Data Analytics for Internet of Things

Big Data Analytics for Internet of Things

Tausifa Jan Saleem, Mohammad Ahsan Chishti
Hands-On Industrial Internet of Things

Hands-On Industrial Internet of Things

Giacomo Veneri, Antonio Capasso
Internet of Things

Internet of Things

Mayur Ramgir

Publisher Resources

ISBN: 9781787120730Supplemental Content