private static INDArray getData() {
   Random r = new Random(1);
   int[] result = new int[window];
   for (int i = 0; i < window; i++) {
     result[i] = r.nextInt(nIn);
   }
   return FeatureUtil.toOutcomeMatrix(result, nIn);
 }
Пример #2
0
 /**
  * Fit the model
  *
  * @param examples the examples to classify (one example in each row)
  * @param labels the labels for each example (the number of labels must match
  */
 @Override
 public void fit(INDArray examples, int[] labels) {
   INDArray outcomeMatrix = FeatureUtil.toOutcomeMatrix(labels, numLabels());
   fit(examples, outcomeMatrix);
 }