/** * Clears the outcome matrix setting a new number of labels * * @param labels the number of labels/columns in the outcome matrix * Note that this clears the labels for each example */ @Override public void setNewNumberOfLabels(int labels) { int examples = numExamples(); INDArray newOutcomes = Nd4j.create(examples, labels); setLabels(newOutcomes); }
first.setLabels(labels.get(interval(0, numHoldout), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all())); break; case 3: first.setLabels(labels.get(interval(0, numHoldout), all(), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all(), all())); break; case 4: first.setLabels(labels.get(interval(0, numHoldout), all(), all(), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all(), all(), all())); break; default:
setLabels(newLabelMatrix);
first.setLabels(labels.get(interval(0, numHoldout), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all())); break; case 3: first.setLabels(labels.get(interval(0, numHoldout), all(), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all(), all())); break; case 4: first.setLabels(labels.get(interval(0, numHoldout), all(), all(), all())); second.setLabels(labels.get(interval(numHoldout, numExamples), all(), all(), all())); break; default:
/** * Returns the next element in the iteration. * * @return the next element in the iteration */ @Override public DataSet next() { DataSet next = iter.next(); next.setLabels(next.getFeatureMatrix()); return next; }
/** * Returns the next element in the iteration. * * @return the next element in the iteration */ @Override public DataSet next() { DataSet next = iter.next(); next.setLabels(next.getFeatures()); return next; }
/** * Clears the outcome matrix setting a new number of labels * * @param labels the number of labels/columns in the outcome matrix * Note that this clears the labels for each example */ @Override public void setNewNumberOfLabels(int labels) { int examples = numExamples(); INDArray newOutcomes = Nd4j.create(examples, labels); setLabels(newOutcomes); }
/** * Like the standard next method but allows a * customizable number of examples returned * * @param num the number of examples * @return the next data applyTransformToDestination */ @Override public DataSet next(int num) { DataSet ret = iter.next(num); ret.setLabels(ret.getFeatures()); return ret; }
/** * Like the standard next method but allows a * customizable number of examples returned * * @param num the number of examples * @return the next data applyTransformToDestination */ @Override public DataSet next(int num) { DataSet ret = iter.next(num); ret.setLabels(ret.getFeatureMatrix()); return ret; }
setLabels(newLabelMatrix);
ds.setLabels(ds.getFeatures());
ds.setLabels(ds.getFeatures());