/** * Asserts that all of the dimensionalities of the input vectors in the * given set of input-output pairs are the same. * * @param data * A collection of input-output pairs. * @throws DimensionalityMismatchException * If the dimensionalities are not all equal. */ public static void assertInputDimensionalitiesAllEqual( final Iterable<? extends InputOutputPair<? extends Vectorizable, ?>> data) { assertInputDimensionalitiesAllEqual(data, getInputDimensionality(data)); }
/** * Asserts that all of the dimensionalities of the input vectors in the * given set of input-output pairs are the same. * * @param data * A collection of input-output pairs. * @throws DimensionalityMismatchException * If the dimensionalities are not all equal. */ public static void assertInputDimensionalitiesAllEqual( final Iterable<? extends InputOutputPair<? extends Vectorizable, ?>> data) { assertInputDimensionalitiesAllEqual(data, getInputDimensionality(data)); }
/** * Asserts that all of the dimensionalities of the input vectors in the * given set of input-output pairs are the same. * * @param data * A collection of input-output pairs. * @throws DimensionalityMismatchException * If the dimensionalities are not all equal. */ public static void assertInputDimensionalitiesAllEqual( final Iterable<? extends InputOutputPair<? extends Vectorizable, ?>> data) { assertInputDimensionalitiesAllEqual(data, getInputDimensionality(data)); }
@Override protected boolean initializeAlgorithm() { if (this.getData() == null) { // Error: No data to learn on. return false; } // Computer the dimensionality of the data and ensure it is correct. int dimensionality = DatasetUtil.getInputDimensionality(this.getData()); if (dimensionality < 0) { // There was no data. return false; } DatasetUtil.assertInputDimensionalitiesAllEqual(this.getData()); // Initialize the result object. this.setResult(new LinearBinaryCategorizer( this.getVectorFactory().createVector(dimensionality), 0.0)); return true; }
@Override protected boolean initializeAlgorithm() { if (this.getData() == null) { // Error: No data to learn on. return false; } // Computer the dimensionality of the data and ensure it is correct. int dimensionality = DatasetUtil.getInputDimensionality(this.getData()); if (dimensionality < 0) { // There was no data. return false; } DatasetUtil.assertInputDimensionalitiesAllEqual(this.getData()); // Initialize the result object. this.setResult(new LinearBinaryCategorizer( this.getVectorFactory().createVector(dimensionality), 0.0)); return true; }
@Override protected boolean initializeAlgorithm() { if (this.getData() == null) { // Error: No data to learn on. return false; } // Computer the dimensionality of the data and ensure it is correct. int dimensionality = DatasetUtil.getInputDimensionality(this.getData()); if (dimensionality < 0) { // There was no data. return false; } DatasetUtil.assertInputDimensionalitiesAllEqual(this.getData()); // Initialize the result object. this.setResult(new LinearBinaryCategorizer( this.getVectorFactory().createVector(dimensionality), 0.0)); return true; }