Classify - Maple Help

DeepLearning

 Classify
 train and use classifier for arbitrary data

 Calling Sequence Classify( data, output )

Parameters

 data - DataFrame, Matrix, or list of Matrices or Vectors output - DataSeries, Matrix, or list options - zero or more options as specified below

Options

 • 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.

Description

 • 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.
  (1)
  (2)
 > 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"]);
 ${\mathrm{new_sample}}{≔}\left[\begin{array}{cc}{"SepalLength"}& {4.9}\\ {"SepalWidth"}& {3.1}\\ {"PetalLength"}& {1.5}\\ {"PetalWidth"}& {0.1}\end{array}\right]$ (3)
 > classifier( new_sample );
 > classifier( new_sample, output = probabilities );

Compatibility

 • The DeepLearning[Classify] command was introduced in Maple 2019.