Basic Examples
Basic Examples
Retrieve the resource:
ResourceObject["Wind Speed Measurements"]
ResourceObject
|
Retrieve the default content:
ResourceData["Wind Speed Measurements"]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Analysis
Analysis
Shuffle the dataset randomly and remove the unit labels:
r=QuantityMagnitude/@RandomSample[ResourceData["Wind Speed Measurements"]]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a training dataset using 80% of the original dataset:
training=r[[;;Round[Times[Length[ResourceData["Wind Speed Measurements"]],.8]]]]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a testing dataset using the remaining 20% of the original dataset:
testing=r[[Round[Times[Length[ResourceData["Wind Speed Measurements"]],.8]]+1;;]]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Train a predictor function using "MalinHead" as the target variable:
p=Predict[training"MalinHead"]
PredictorFunction
|
Obtain general information about the predictor:
PredictorInformation[p]
Predictor information | ||||||||||
|
Test the predictor:
pm=PredictorMeasurements[p,testing"MalinHead"]
PredictorMeasurementsObject
|
Visualize the accuracy of the predictor:
pm["ComparisonPlot"]
|
