Class RegressionFactory

java.lang.Object
org.tribuo.regression.RegressionFactory
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<OutputFactoryProvenance>, Serializable, OutputFactory<Regressor>

public final class RegressionFactory extends Object implements OutputFactory<Regressor>
A factory for creating Regressors and RegressionInfos.

It parses the regression dimensions by toStringing the input and calling Regressor.parseString(java.lang.String), unless the input is a collection, in which case it extracts the elements.

This OutputFactory has mutable state, namely the character which the dimension input is split on. In most cases the default DEFAULT_SPLIT_CHAR is fine.

See Also:
  • Field Details

    • DEFAULT_SPLIT_CHAR

      public static final char DEFAULT_SPLIT_CHAR
      The default character to split the string form of a multidimensional regressor.
      See Also:
    • UNKNOWN_REGRESSOR

      public static final Regressor UNKNOWN_REGRESSOR
      The sentinel unknown regressor, used when there is no ground truth regressor value.
    • UNKNOWN_MULTIPLE_REGRESSOR

      @Deprecated public static final Regressor UNKNOWN_MULTIPLE_REGRESSOR
      Deprecated.
      Deprecated when regression was made multidimensional by default. Use UNKNOWN_REGRESSOR instead.
  • Constructor Details

    • RegressionFactory

      public RegressionFactory()
      Builds a regression factory using the default split character DEFAULT_SPLIT_CHAR.
    • RegressionFactory

      public RegressionFactory(char splitChar)
      Sets the split character used to parse Regressor instances from Strings.
      Parameters:
      splitChar - The split character.
  • Method Details