Beispiel #1
0
 /**
  * As regression data set dataset.
  *
  * @param featurizer the featurizer
  * @param labelAttributeType the label attribute
  * @return the dataset
  */
 default Dataset<Instance> asRegressionDataSet(
     @NonNull Featurizer<HString> featurizer, @NonNull AttributeType labelAttributeType) {
   return Dataset.regression()
       .type(getDataSetType())
       .source(asLabeledStream(labelAttributeType).map(featurizer::extractLabeled))
       .build();
 }
Beispiel #2
0
 /**
  * As regression data set dataset.
  *
  * @param featurizer the featurizer
  * @param labelFunction the label function
  * @return the dataset
  */
 default Dataset<Instance> asRegressionDataSet(
     @NonNull Featurizer<HString> featurizer,
     @NonNull SerializableFunction<HString, Double> labelFunction) {
   return Dataset.regression()
       .type(getDataSetType())
       .source(asLabeledStream(labelFunction).map(featurizer::extractLabeled))
       .build();
 }
Beispiel #3
0
 /**
  * As regression data set dataset.
  *
  * @param featurizer the featurizer
  * @return the dataset
  */
 default Dataset<Instance> asRegressionDataSet(@NonNull Featurizer<HString> featurizer) {
   return Dataset.regression()
       .type(getDataSetType())
       .source(stream().map(featurizer::extract))
       .build();
 }