@Test(expected = NoLabelVectorException.class) @SuppressWarnings("unchecked") public void testSetLabelInvalid() { new LabeledVectorSet(new LabeledVector[1]).setLabel(0, 2.0); }
public void setLabel(int idx, double lb) { LabeledVector<Double> labeledVector = data[idx]; if (labeledVector != null) labeledVector.setLabel(lb); else throw new NoLabelVectorException(idx); }
LabeledVectorSet extends Dataset<Row> implements AutoCloseable { public void setLabel(int idx, double lb) { LabeledVector<Double> labeledVector = data[idx]; if (labeledVector != null) labeledVector.setLabel(lb); else throw new NoLabelVectorException(idx); } }
LabeledVectorSet extends Dataset<Row> implements AutoCloseable { public void setLabel(int idx, double lb) { LabeledVector<Double> labeledVector = data[idx]; if (labeledVector != null) labeledVector.setLabel(lb); else throw new NoLabelVectorException(idx); } LabeledVectorSet();  LabeledVectorSet(int rowSize, int colSize, boolean isDistributed);  LabeledVectorSet(int rowSize, int colSize);  LabeledVectorSet(int rowSize, int colSize, String[] featureNames, boolean isDistributed);  LabeledVectorSet(Row[] data);  LabeledVectorSet(Row[] data, int colSize);  LabeledVectorSet(double[][] mtx, double[] lbs);  LabeledVectorSet(double[][] mtx, double[] lbs, String[] featureNames, boolean isDistributed); }
LabeledVectorSet extends Dataset<Row> implements AutoCloseable { public void setLabel(int idx, double lb) { LabeledVector<Double> labeledVector = data[idx]; if (labeledVector != null) labeledVector.setLabel(lb); else throw new NoLabelVectorException(idx); } LabeledVectorSet();  LabeledVectorSet(int rowSize, int colSize, boolean isDistributed);  LabeledVectorSet(int rowSize, int colSize);  LabeledVectorSet(int rowSize, int colSize, String[] featureNames, boolean isDistributed);  LabeledVectorSet(Row[] data);  LabeledVectorSet(Row[] data, int colSize);  LabeledVectorSet(double[][] mtx, double[] lbs);  LabeledVectorSet(double[][] mtx, double[] lbs, String[] featureNames, boolean isDistributed); double label(int idx); double[] labels(); void setLabel(int idx, double lb); static Vector emptyVector(int size, boolean isDistributed); LabeledVectorSet copy(); @Override void close(); }
LabeledVectorSet extends Dataset<Row> implements AutoCloseable { public void setLabel(int idx, double lb) { LabeledVector<Double> labeledVector = data[idx]; if (labeledVector != null) labeledVector.setLabel(lb); else throw new NoLabelVectorException(idx); } LabeledVectorSet();  LabeledVectorSet(int rowSize, int colSize, boolean isDistributed);  LabeledVectorSet(int rowSize, int colSize);  LabeledVectorSet(int rowSize, int colSize, String[] featureNames, boolean isDistributed);  LabeledVectorSet(Row[] data);  LabeledVectorSet(Row[] data, int colSize);  LabeledVectorSet(double[][] mtx, double[] lbs);  LabeledVectorSet(double[][] mtx, double[] lbs, String[] featureNames, boolean isDistributed); double label(int idx); double[] labels(); void setLabel(int idx, double lb); static Vector emptyVector(int size, boolean isDistributed); LabeledVectorSet copy(); @Override void close();  }