Package de.jungblut.classification.nn
Class RBMCostFunction
- java.lang.Object
-
- de.jungblut.math.minimize.AbstractMiniBatchCostFunction
-
- de.jungblut.classification.nn.RBMCostFunction
-
- All Implemented Interfaces:
CostFunction
public final class RBMCostFunction extends AbstractMiniBatchCostFunction
Restricted Boltzmann machine implementation using Contrastive Divergence 1 (CD1). This algorithm is based on what has been teached by Prof. Hinton in the Coursera course "Neural Networks for Machine Learning" '12. This is an unsupervised learning algorithm to train high level feature detectors. NOTE: Sutskever and Tieleman have shown that it is not following the gradient of any function (Sutskever and Tieleman, 2010). So this isn't minimizable using line searching optimizers likeFmincg,GradientDescentis doing a great job though as it doesn't care if you're moving into the right direction down hill.- Author:
- thomas.jungblut
-
-
Constructor Summary
Constructors Constructor Description RBMCostFunction(de.jungblut.math.DoubleVector[] currentTrainingSet, int batchSize, int numThreads, int numHiddenUnits, ActivationFunction activationFunction, TrainingType type, double lambda, long seed, boolean stochastic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CostGradientTupleevaluateBatch(de.jungblut.math.DoubleVector input, de.jungblut.math.DoubleMatrix data, de.jungblut.math.DoubleMatrix outcomeBatch)Evaluate the batch.-
Methods inherited from class de.jungblut.math.minimize.AbstractMiniBatchCostFunction
evaluateCost
-
-
-
-
Constructor Detail
-
RBMCostFunction
public RBMCostFunction(de.jungblut.math.DoubleVector[] currentTrainingSet, int batchSize, int numThreads, int numHiddenUnits, ActivationFunction activationFunction, TrainingType type, double lambda, long seed, boolean stochastic)
-
-
Method Detail
-
evaluateBatch
protected CostGradientTuple evaluateBatch(de.jungblut.math.DoubleVector input, de.jungblut.math.DoubleMatrix data, de.jungblut.math.DoubleMatrix outcomeBatch)
Description copied from class:AbstractMiniBatchCostFunctionEvaluate the batch.- Specified by:
evaluateBatchin classAbstractMiniBatchCostFunction- Parameters:
input- the parameters to use.data- the batch matrix as input (already contains a bias!).outcomeBatch- the batch matrix denoting the output.- Returns:
- the cost/gradient tuple usually used when using
AbstractMiniBatchCostFunction.evaluateCost(DoubleVector).
-
-