"NeuralNetwork"
(Machine Learning Method)

  • Method for Classify and Predict.
  • Models class probabilities or predicts the value distribution using a neural network.
  • Details & Suboptions
  • A neural network consists of stacked layers, each performing a simple computation. Information is processed layer by layer from the input layer to the output layer. The neural network is trained to minimize a loss function on the training set using gradient descent.
  • The following options can be given:
  • MaxTrainingRoundsAutomaticthe maximum training rounds before training stops
    "ActivationFunction"Automaticthe activation function to use between layers
    "L2Regularization"Automaticthe parameter multipling the L2 term
    "NetworkType"Automaticthe type of network module to use
    "NetworkDepth"Automaticthe depth of the network
    "NumberOfParameters"Automaticthe total number of the network's trainable parameters
    "OptimizationMethod"Automaticthe optimization method to use during training
  • Possible settings for "NetworkType" include:
  • "FullyConnected"neural network based on LinearLayer
    "Convolutional"neural network based on ConvolutionLayer
    "Recurrent"neural network based on recurrent layers
  • Possible settings for "ActivationFunction" include:
  • Rampthe Ramp function
    LogisticSigmoidthe LogisticSigmoid function
    Tanhthe Tanh function
  • Possible settings for "OptimizationMethod" include:
  • "ADAM"stochastic gradient descent using an adaptive learning rate that is invariant to diagonal rescaling of the gradients
    "SGD"ordinary stochastic gradient descent with momentum
  • Examples

    open allclose all

    Basic Examples  (2)

    Train a classifier function on labeled examples:

    In[1]:=
    Click for copyable input
    Out[1]=

    Look at its ClassifierInformation:

    In[2]:=
    Click for copyable input
    Out[2]=

    Classify a new example:

    In[3]:=
    Click for copyable input
    Out[3]=

    Generate some data and visualize it:

    In[1]:=
    Click for copyable input
    Out[1]=

    Train a predictor function on it:

    In[2]:=
    Click for copyable input
    Out[2]=

    Compare the data with the predicted values and look at the standard deviation:

    In[3]:=
    Click for copyable input
    Out[3]=

    Options  (6)

    See Also

    Classify  Predict  ClassifierFunction  PredictorFunction  ClassifierMeasurements  PredictorMeasurements  ClassifierInformation  PredictorInformation  SequencePredict  ClusterClassify

    Related Demonstrations

    Related Methods