Documentation of 'jsat.classifiers.neuralnetwork.DReDNetSimple' Java class
DReDNetSimple
jsat.classifiers.neuralnetwork

Class DReDNetSimple

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized


    public class DReDNetSimple
    extends java.lang.Object
    implements Classifier, Parameterized
    This class provides a neural network based on Geoffrey Hinton's Deep Rectified Dropout Nets. It is parameterized to be "simpler" in that the default batch size and gradient updating method should require no tuning to get decent results

    NOTE: Training neural networks is computationally expensive, you may want to consider a GPU implementation from another source.
    See Also:
    Serialized Form
    • Constructor Detail

      • DReDNetSimple

        public DReDNetSimple()
        Creates a new DRedNet that uses two hidden layers with 1024 neurons each. A batch size of 256 and 100 epochs will be used.
      • DReDNetSimple

        public DReDNetSimple(int... hiddenLayerSizes)
        Create a new DReDNet that uses the specified number of hidden layers. A batch size of 256 and 100 epochs will be used.
        Parameters:
        hiddenLayerSizes - the length indicates the number of hidden layers, and the value in each index is the number of neurons in that layer
    • Method Detail

      • setHiddenSizes

        public void setHiddenSizes(int[] hiddenSizes)
        Sets the hidden layer sizes for this network. The size of the array is the number of hidden layers and the value in each index denotes the size of that layer.
        Parameters:
        hiddenSizes -
      • getHiddenSizes

        public int[] getHiddenSizes()
        Returns:
        the array of hidden layer sizes
      • setBatchSize

        public void setBatchSize(int batchSize)
        Sets the batch size for updates
        Parameters:
        batchSize - the number of items to compute the gradient from
      • getBatchSize

        public int getBatchSize()
        Returns:
        the number of data points to use for one gradient computation
      • setEpochs

        public void setEpochs(int epochs)
        Sets the number of epochs to perform
        Parameters:
        epochs - the number of training iterations through the whole data set
      • getEpochs

        public int getEpochs()
        Returns:
        the number of training iterations through the data set
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        Parameters:
        data - the data point to classify
        Returns:
        the results of the classification.
      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.
      • supportsWeightedData

        public boolean supportsWeightedData()
        Description copied from interface: Classifier
        Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.
        Specified by:
        supportsWeightedData in interface Classifier
        Returns:
        true if the model supports weighted data, false otherwise

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.