DeepLearning
Classify
train and use classifier for arbitrary data
Calling Sequence
Parameters
Options
Description
Compatibility
Classify( data, output )
data
-
DataFrame, Matrix, or list of Matrices or Vectors
output
DataSeries, Matrix, or list
options
zero or more options as specified below
hidden_units=auto or list(integer)
Specifies the depth and number of interior nodes for the neural network underlying this classifier.
num_classes=auto or posint
Specifies the number of distinct categories into which the data should be classified.
The Classify command accepts a set of training data which has been classified into a finite set of classes, trains a neural network model for this classification, and returns a classifier function which can be applied to arbitrary additional data.
training_set := Import("example/iris_training.csv", base=datadir);
test_set := Import("example/iris_test.csv", base=datadir);
classifier := DeepLearning:-Classify( training_set[1..4], training_set[5] );
classifier( test_set[1..4], test_set[5] );
new_sample := DataSeries([4.9,3.1,1.5,0.1], labels=["SepalLength","SepalWidth","PetalLength","PetalWidth"]);
new_sample≔SepalLength4.9SepalWidth3.1PetalLength1.5PetalWidth0.1
classifier( new_sample );
classifier( new_sample, output = probabilities );
The DeepLearning[Classify] command was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
DeepLearning,DNNClassifier
Download Help Document