DeepLearning - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : DeepLearning Package : Estimators : Constructing Estimators : DeepLearning/Estimator

DeepLearning

  

Estimator

  

estimator object

 

Description

Generating Estimators

Operations with Estimators

Examples

Compatibility

Description

• 

An Estimator is an object which encapsulates a high-level interface which encapsulates tasks for training, evaluation, and prediction with machine learning models.

Generating Estimators

• 

To construct an Estimator object encapsulating a certain classification or regression task, see the DeepLearning Overview section on Estimators.

Operations with Estimators

• 

The following functions can be performed with an Estimator.

Evaluate

Predict

Train

 

Examples

Train a deep neural network classifier to recognize whether a point is within a circle centered at the origin with radius 1. We begin by generating some input data to train the model.

N1000:

XStatistics:-RandomVariableUniform1.,1.:

training_dataDataFrameStatistics:-SampleX,N,2,columns=x,y:

classDataSeriesseq`if`training_dataxi2+training_datayi2<1&comma;1&comma;0&comma;i=1..N&colon;

We can now define an Estimator, in this case a DNNClassifier, to process the input.

withDeepLearning&colon;

fcseqNumericColumnu&comma;shape=1&comma;uinx&comma;y

fcFeature ColumnNumericColumn(key='x', shape=(1,), default_value=None, dtype=tf.float32, normalizer_fn=None)&comma;Feature ColumnNumericColumn(key='y', shape=(1,), default_value=None, dtype=tf.float32, normalizer_fn=None)

(1)

classifierDNNClassifierfc&comma;hidden_units=10&comma;20&comma;10&comma;num_classes=2

classifierDeepLearning Estimator<tensorflow_estimator.python.estimator.canned.dnn.DNNClassifier object at 0x7f7a7dee6e10>

(2)

classifier:-Traintraining_data&comma;class&comma;steps=2000&comma;num_epochs=none&comma;shuffle=true

DeepLearning TensorName: noneShape: undefinedData Type: undefined

(3)

With our classifier thus trained, we can make predictions about additional points.

test_dataDataFrameStatistics:-SampleX&comma;5&comma;2&comma;columns=x&comma;y&colon;

resultclassifier:-Predicttest_data&comma;num_epochs=1&comma;shuffle=false&colon;

Compatibility

• 

The DeepLearning[Estimator] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

DeepLearning Overview