@Test public void testBuild_WithMissingValues() throws Exception { DataSetDefinition definition = new DataSetDefinition("MissingValuesDataSet"); definition.addAttribute(Attribute.createNumericAttribute("feature_1") .setMissingValuesProbability(0.3)); definition.addAttribute(Attribute.createNominalAttribute("feature_2", new String[]{"n1", "n2", "n3", "n4"})); definition.addAttribute(Attribute.createLabelAttribute("label_1") .setMissingValuesProbability(0.3)); definition.addAttribute(Attribute.createLabelAttribute("label_2")); definition.addAttribute(Attribute.createLabelAttribute("label_3") .setMissingValuesProbability(0.5)); definition.addAttribute(Attribute.createLabelAttribute("label_4")); MultiLabelInstances mlDataSet = DataSetBuilder.CreateDataSet(definition); getLearner().build(mlDataSet); }
public final void build(MultiLabelInstances trainingSet) throws Exception { if (trainingSet == null) { throw new ArgumentNullException("trainingSet"); } isModelInitialized = false; numLabels = trainingSet.getNumLabels(); labelIndices = trainingSet.getLabelIndices(); labelNames = trainingSet.getLabelNames(); featureIndices = trainingSet.getFeatureIndices(); buildInternal(trainingSet); isModelInitialized = true; }
MultiLabelLearnerBase implements TechnicalInformationHandler, MultiLabelLearner, Serializable { public final void build(MultiLabelInstances trainingSet) throws Exception { if (trainingSet == null) { throw new ArgumentNullException("trainingSet"); } isModelInitialized = false; numLabels = trainingSet.getNumLabels(); labelIndices = trainingSet.getLabelIndices(); labelNames = trainingSet.getLabelNames(); featureIndices = trainingSet.getFeatureIndices(); buildInternal(trainingSet); isModelInitialized = true; } }
MultiLabelLearnerBase implements TechnicalInformationHandler, MultiLabelLearner, Serializable { public final void build(MultiLabelInstances trainingSet) throws Exception { if (trainingSet == null) { throw new ArgumentNullException("trainingSet"); } isModelInitialized = false; numLabels = trainingSet.getNumLabels(); labelIndices = trainingSet.getLabelIndices(); labelNames = trainingSet.getLabelNames(); featureIndices = trainingSet.getFeatureIndices(); buildInternal(trainingSet); isModelInitialized = true; }  }
MultiLabelLearnerBase implements TechnicalInformationHandler, MultiLabelLearner, Serializable { public final void build(MultiLabelInstances trainingSet) throws Exception { if (trainingSet == null) { throw new ArgumentNullException("trainingSet"); } isModelInitialized = false; numLabels = trainingSet.getNumLabels(); labelIndices = trainingSet.getLabelIndices(); labelNames = trainingSet.getLabelNames(); featureIndices = trainingSet.getFeatureIndices(); buildInternal(trainingSet); isModelInitialized = true; }  boolean isUpdatable(); final void build(MultiLabelInstances trainingSet); final MultiLabelOutput makePrediction(Instance instance); void setDebug(boolean debug); boolean getDebug(); MultiLabelLearner makeCopy(); abstract TechnicalInformation getTechnicalInformation(); }
MultiLabelLearnerBase implements TechnicalInformationHandler, MultiLabelLearner, Serializable { public final void build(MultiLabelInstances trainingSet) throws Exception { if (trainingSet == null) { throw new ArgumentNullException("trainingSet"); } isModelInitialized = false; numLabels = trainingSet.getNumLabels(); labelIndices = trainingSet.getLabelIndices(); labelNames = trainingSet.getLabelNames(); featureIndices = trainingSet.getFeatureIndices(); buildInternal(trainingSet); isModelInitialized = true; }  boolean isUpdatable(); final void build(MultiLabelInstances trainingSet); final MultiLabelOutput makePrediction(Instance instance); void setDebug(boolean debug); boolean getDebug(); MultiLabelLearner makeCopy(); abstract TechnicalInformation getTechnicalInformation();  }