DBLearner

dbn.classifier.neural

## Class DBLearner

- java.lang.Object
- - mulan.classifier.MultiLabelLearnerBase
  - - dbn.classifier.neural.Learner
    - - dbn.classifier.neural.DBLearner

- All Implemented Interfaces:
    java.io.Serializable, mulan.classifier.MultiLabelLearner, weka.core.TechnicalInformationHandler

      public class DBLearner
      extends Learner

  An implementation of `Learner` that trains a `DeepBeliefNetwork`. This control class implements all the abstract methods of `Learner` and `MultiLabelLearnerBase`. It has all the important tasks, like building the neural network and predicting multi-label output from a dataset.
  See Also:
    `Learner`, `DeepBeliefNetwork`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class dbn.classifier.neural.Learner

      `_bpEpochs, _greedyEpochs, _nn, _threshold`

    - ### Fields inherited from class mulan.classifier.MultiLabelLearnerBase

      `featureIndices, labelIndices, numLabels`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBLearner()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `buildInternal(mulan.data.MultiLabelInstances mli)` This method builds the neural network internal.
    `protected void` | `buildSupervised(double[][] dataset, double[][] targets, double lr)` This method builds the neural network in supervised.
    `protected void` | `buildUnsupervised(double[][] dataset, double lr)` This method builds the neural network in un-supervised.
    `weka.core.TechnicalInformation` | `getTechnicalInformation()`
    `java.lang.String` | `globalInfo()`
    `protected mulan.classifier.MultiLabelOutput` | `makePredictionInternal(weka.core.Instance inst)` This method is used to predict a `MultiLabelOutput` using the trained `DeepBeliefNetwork`.

    - ### Methods inherited from class dbn.classifier.neural.Learner

      `getEpochs, getLeanedDBN, getLearningRate, getMomentum, getThreshold, getWeightCost, isSetNN, makePrediction, setBPEpochs, setDBN, setLearningRate, setMomentum, setPreTrainingEpochs, setThreshold, setWeightCost`

    - ### Methods inherited from class mulan.classifier.MultiLabelLearnerBase

      `build, debug, getDebug, isModelInitialized, isUpdatable, makeCopy, makePrediction, setDebug`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DBLearner

          public DBLearner()

  - ### Method Detail

    - #### buildInternal

          protected void buildInternal(mulan.data.MultiLabelInstances mli)
                                throws java.lang.Exception

      This method builds the neural network internal. It is used by the method `build(`MultiLabelInstances` mli)` for building the classifier. It trains the `DeepBeliefNetwork` to predict data like these on the parameter `mli`.
      Specified by:
        `buildInternal` in class `mulan.classifier.MultiLabelLearnerBase`
      Parameters:
        `mli` - a `MultiLabelInstances` dataset that is used for the training task
      Throws:
        `java.lang.Exception`

    - #### buildUnsupervised

          protected void buildUnsupervised(double[][] dataset,
                               double lr)

      This method builds the neural network in un-supervised. It is used by the method `buildInternal(`MultiLabelInstances` mli)` for building the classifier. It trains the `DeepBeliefNetwork` to reduce the dimensionality of the input pattern.
      Parameters:
        `dataset` - the dataset with which the NN will be trained.
        `lr` - the un-supervised learners learning rate

    - #### buildSupervised

          protected void buildSupervised(double[][] dataset,
                             double[][] targets,
                             double lr)

      This method builds the neural network in supervised. It is used by the method `buildInternal(`MultiLabelInstances` mli)` for building the classifier. It trains the `DeepBeliefNetwork` to predict multi-label instances using the datasets labels.
      Parameters:
        `dataset` - the dataset with which the NN will be trained.
        `targets` - the labels of the dataset
        `lr` - the supervised learners learning rate

    - #### makePredictionInternal

          protected mulan.classifier.MultiLabelOutput makePredictionInternal(weka.core.Instance inst)
                                                                      throws java.lang.Exception,
                                                                             mulan.classifier.InvalidDataException

      This method is used to predict a `MultiLabelOutput` using the trained `DeepBeliefNetwork`. It takes as input the data `instnc` and give as output the `MultiLabelOutput` output.
      It causes two exceptions:
      `InvalidDataException` when the data are not the appropriate format or null.
      `Exception` when another error is occurred.
      Specified by:
        `makePredictionInternal` in class `mulan.classifier.MultiLabelLearnerBase`
      Parameters:
        `inst` - the input vector
      Returns:
        the labels in a `MultiLabelOutput` form
      Throws:
        `java.lang.Exception`
        `mulan.classifier.InvalidDataException`

    - #### getTechnicalInformation

          public weka.core.TechnicalInformation getTechnicalInformation()

      Specified by:
        `getTechnicalInformation` in interface `weka.core.TechnicalInformationHandler`
      Specified by:
        `getTechnicalInformation` in class `mulan.classifier.MultiLabelLearnerBase`

    - #### globalInfo

          public java.lang.String globalInfo()

      Specified by:
        `globalInfo` in class `mulan.classifier.MultiLabelLearnerBase`