Class CategoricalPropertyConfigBuilder<Config extends CategoricalPropertyConfig,Self extends CategoricalPropertyConfigBuilder>

java.lang.Object
oracle.pgx.api.mllib.CategoricalPropertyConfigBuilder<Config,Self>
Direct Known Subclasses:
EmbeddingTableConfigBuilder, OneHotEncodingConfigBuilder

public class CategoricalPropertyConfigBuilder<Config extends CategoricalPropertyConfig,Self extends CategoricalPropertyConfigBuilder> extends Object
Builder for CategoricalPropertyConfig. One Hot Encoding and Embedding Layer methods are supported.
Since:
23.2
  • Constructor Details

    • CategoricalPropertyConfigBuilder

      public CategoricalPropertyConfigBuilder(String propertyName)
  • Method Details

    • setMaxVocabularySize

      public Self setMaxVocabularySize(int size)
      Set the maximum vocabulary size for categories. The most frequent categories numbering "max vocabulary size" are kept. Category values below this cutoff are not recorded and set to the OOV token.
      Parameters:
      size - maximum vocabulary size
      Returns:
      this
      Since:
      23.2
    • oneHotEncoding

      public final OneHotEncodingConfigBuilder oneHotEncoding()
      Create the builder for a OneHotEncodingConfig.
      Returns:
      this
      Since:
      23.2
    • embeddingTable

      public final EmbeddingTableConfigBuilder embeddingTable()
      Create the builder for an EmbeddingTableConfig.
      Returns:
      this
      Since:
      23.2
    • setShared

      public Self setShared(boolean isShared)
      Set whether the feature is treated as shared globally among vertex/edge types or considered as separate features per type.

      default: CategoricalPropertyConfig.DEFAULT_SHARED

      Parameters:
      isShared - whether the feature is shared
      Returns:
      this
      Since:
      23.2
    • build

      public CategoricalPropertyConfig build()
      Builds the default type of categorical feature configuration if a type was not specified
      Returns:
      built configuration
      Since:
      23.2