Predict
Predict[{in1out1,in2out2,…}]
generates a PredictorFunction[…] based on the example input-output pairs given.
Predict[{in1,in2,…}{out1,out2,…}]
generates the same result.
Predict[training,input]
attempts to predict the output associated with input from the training examples given.
Predict["name",input]
uses the built-in predictor function represented by "name".
Predict[…,input,prop]
gives the specified property of the prediction associated with input.
Details and Options
- Predict can be used on many types of data, including numerical, textual, sounds and images, as well as combinations of these.
- Each inputi can be a single data element, a list of data elements, an association of data elements or a Dataset object. In Predict[training,…], training can be a Dataset object.
- Predict[training] returns a PredictorFunction[…] that can then be applied to specific data.
- In Predict[…,input], input can be a single item or a list of items.
- In Predict[…,input,prop], properties are as given in PredictorFunction[…]; they include:
-
"Decision" best prediction according to distribution and utility function "Distribution" distribution of value conditioned on input "Properties" list of all properties available - Examples of built-in predictor functions include:
-
"NameAge" age of a person, given their first name - The following options can be given:
-
FeatureExtractor Identity how to extract features from which to learn FeatureNames Automatic feature names to assign for input data FeatureTypes Automatic feature types to assume for input data IndeterminateThreshold 0 below what probability density to return Indeterminate Method Automatic which regression algorithm to use PerformanceGoal Automatic aspects of performance to try to optimize TimeGoal Automatic how long to spend training the classifier TrainingProgressReporting Automatic how to report progress during training RandomSeeding 1234 what seeding of pseudorandom generators should be done internally UtilityFunction Automatic utility as function of actual and predicted value ValidationSet Automatic data on which to validate the model generated - Possible settings for PerformanceGoal include:
-
"Memory" minimize storage requirements of the predictor "Quality" maximize accuracy of the predictor "Speed" maximize speed of the predictor "TrainingSpeed" minimize time spent producing the predictor Automatic automatic tradeoff among speed, accuracy, and memory {goal1,goal2,…} automatically combine goal1, goal2, etc. - Possible settings for Method include:
-
"DecisionTree" predict using a decision tree "GradientBoostedTrees" predict using an ensemble of trees trained with gradient boosting "LinearRegression" predict from linear combinations of features "NearestNeighbors" predict from nearest neighboring examples "NeuralNetwork" predict using an artificial neural network "RandomForest" predict from Breiman–Cutler ensembles of decision trees "GaussianProcess" predict using a Gaussian process prior over functions - The following settings for TrainingProgressReporting can be used:
-
"Panel" show a dynamically updating graphical panel "Print" periodically report information using Print "ProgressIndicator" show a simple ProgressIndicator "SimplePanel" dynamically updating panel without learning curves None do not report any information - Possible settings for RandomSeeding include:
-
Automatic automatically reseed every time the function is called Inherited use externally seeded random numbers seed use an explicit integer or strings as a seed - Predict[{assoc1,assoc2,…}"key",…] can be used to specify that the output is given by the value of "key" in each association associ.
- Predict[{list1,list2,…}n,…] can be used to specify that the output is given by the value of part n in each list listi.
- Predict[Dataset[…]part,…] can be used to specify that the outputs are given by the value of part of each row of the dataset.
- Predict[…,FeatureExtractor"Minimal"] indicates that the internal preprocessing should be as simple as possible.
Examples
open allclose allBasic Examples (2)
Train a predictor function on a set of examples:
| In[1]:= |
Predict the value of a new example, given its feature:
Get the conditional distribution of the value, given the example feature:
Plot the predicted values as a function of the feature value and show the training examples:
Train a predictor on a dataset with multiple features:
Predict the value of a new example, given its features:
Predict the value of a new example that has a missing feature:
Scope (8)
Options (17)
Applications (4)
Properties & Relations (1)
Possible Issues (1)
Neat Examples (2)
See Also
PredictorFunction PredictorMeasurements PredictorInformation Classify ActivePrediction SequencePredict Interpolation FindFit Nearest DimensionReduce FindFormula BayesianMinimization