use of org.deeplearning4j.datasets.fetchers.IrisDataFetcher in project deeplearning4j by deeplearning4j.
the class DataSets method iris.
public static DataSet iris(int num) {
IrisDataFetcher fetcher = new IrisDataFetcher();
fetcher.fetch(num);
return fetcher.next();
}
use of org.deeplearning4j.datasets.fetchers.IrisDataFetcher in project deeplearning4j by deeplearning4j.
the class RBMTests method testIrisRectifiedHidden.
@Test
public void testIrisRectifiedHidden() {
IrisDataFetcher fetcher = new IrisDataFetcher();
fetcher.fetch(150);
DataNormalization norm = new NormalizerStandardize();
DataSet d = fetcher.next();
norm.fit(d);
norm.transform(d);
INDArray params = Nd4j.create(1, 4 * 3 + 4 + 3);
RBM rbm = getRBMLayer(4, 3, HiddenUnit.RECTIFIED, VisibleUnit.LINEAR, params, true, false, 1, LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD);
rbm.fit(d.getFeatureMatrix());
}
use of org.deeplearning4j.datasets.fetchers.IrisDataFetcher in project deeplearning4j by deeplearning4j.
the class RBMTests method testIrisGaussianHidden.
@Test
public void testIrisGaussianHidden() {
IrisDataFetcher fetcher = new IrisDataFetcher();
fetcher.fetch(150);
DataNormalization norm = new NormalizerStandardize();
DataSet d = fetcher.next();
norm.fit(d);
norm.transform(d);
INDArray params = Nd4j.create(1, 4 * 3 + 4 + 3);
RBM rbm = getRBMLayer(4, 3, HiddenUnit.GAUSSIAN, VisibleUnit.GAUSSIAN, params, true, false, 1, LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD);
rbm.fit(d.getFeatureMatrix());
}
Aggregations