Class FeaturePreprocessor.Builder

java.lang.Object
qupath.opencv.ml.FeaturePreprocessor.Builder
Enclosing class:
FeaturePreprocessor

public static class FeaturePreprocessor.Builder extends Object
Builder to create a custom FeaturePreprocessor.
  • Method Details

    • normalize

      public FeaturePreprocessor.Builder normalize(Normalization normalization)
      Define normalization type.
      Parameters:
      normalization -
      Returns:
      this builder
    • missingValue

      public FeaturePreprocessor.Builder missingValue(double missingValue)
      Parameters:
      missingValue -
      Returns:
      this builder
    • pca

      public FeaturePreprocessor.Builder pca(double retainedVariance, boolean pcaNormalize)
      Perform PCA to reduce features.
      Parameters:
      retainedVariance - retained variance, used to determine how many features to keep
      pcaNormalize - if true, normalize the projected features
      Returns:
      this builder
    • build

      public FeaturePreprocessor build(Mat trainingData, boolean applyToTraining)
      Build a FeaturePreprocessor. The training data is expected to contain samples as rows and features as columns.
      Parameters:
      trainingData -
      applyToTraining -
      Returns: