O'Reilly logo

R: Mining Spatial, Text, Web, and Social Media Data by Richard Heimann, Nathan Danneman, Pradeepta Mishra, Bater Makhabel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Neural networks for prediction

The use of neural networks for prediction requires the dependent/target/output variable to be numeric, and all the input/independent/feature variables can be of any type. From the ArtPiece dataset, we are going to predict what is going to be the current auction average price based on all the parameters available. Before applying a neural-network-based model, it is important to preprocess the data, by excluding the missing values and any transformation if required; hence, let's preprocess the data:

library(neuralnet)

art<- read.csv("ArtPiece_1.csv")

str(art)

#data conversion for categorical features

art$Art.Auction.House<-as.factor(art$Art.Auction.House)

art$IsGood.Purchase<-as.factor(art$IsGood.Purchase)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required