abacusai.api_class.feature_group
================================

.. py:module:: abacusai.api_class.feature_group


Classes
-------

.. autoapisummary::

   abacusai.api_class.feature_group.ApiClass
   abacusai.api_class.feature_group._ApiClassFactory
   abacusai.api_class.feature_group.SamplingConfig
   abacusai.api_class.feature_group.NSamplingConfig
   abacusai.api_class.feature_group.PercentSamplingConfig
   abacusai.api_class.feature_group._SamplingConfigFactory
   abacusai.api_class.feature_group.MergeConfig
   abacusai.api_class.feature_group.LastNMergeConfig
   abacusai.api_class.feature_group.TimeWindowMergeConfig
   abacusai.api_class.feature_group._MergeConfigFactory


Module Contents
---------------

.. py:class:: ApiClass

   Bases: :py:obj:`abc.ABC`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: _upper_snake_case_keys
      :type:  bool


   .. py:attribute:: _support_kwargs
      :type:  bool


   .. py:method:: __post_init__()


   .. py:method:: _get_builder()
      :classmethod:



   .. py:method:: __str__()

      Return str(self).



   .. py:method:: _repr_html_()


   .. py:method:: __getitem__(item)


   .. py:method:: __setitem__(item, value)


   .. py:method:: _unset_item(item)


   .. py:method:: get(item, default = None)


   .. py:method:: pop(item, default = NotImplemented)


   .. py:method:: to_dict()

      Standardizes converting an ApiClass to dictionary.
      Keys of response dictionary are converted to camel case.
      This also validates the fields ( type, value, etc ) received in the dictionary.



   .. py:method:: from_dict(input_dict)
      :classmethod:



.. py:class:: _ApiClassFactory

   Bases: :py:obj:`abc.ABC`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: config_abstract_class
      :value: None



   .. py:attribute:: config_class_key
      :value: None



   .. py:attribute:: config_class_map


   .. py:method:: from_dict(config)
      :classmethod:



.. py:class:: SamplingConfig

   Bases: :py:obj:`abacusai.api_class.abstract.ApiClass`


   An abstract class for the sampling config of a feature group


   .. py:attribute:: sampling_method
      :type:  abacusai.api_class.enums.SamplingMethodType


   .. py:method:: _get_builder()
      :classmethod:



   .. py:method:: __post_init__()


.. py:class:: NSamplingConfig

   Bases: :py:obj:`SamplingConfig`


   The number of distinct values of the key columns to include in the sample, or number of rows if key columns not specified.

   :param sampling_method: N_SAMPLING
   :type sampling_method: SamplingMethodType
   :param sample_count: The number of rows to include in the sample
   :type sample_count: int
   :param key_columns: The feature(s) to use as the key(s) when sampling
   :type key_columns: List[str]


   .. py:attribute:: sample_count
      :type:  int


   .. py:attribute:: key_columns
      :type:  List[str]


   .. py:method:: __post_init__()


.. py:class:: PercentSamplingConfig

   Bases: :py:obj:`SamplingConfig`


   The fraction of distinct values of the feature group to include in the sample.

   :param sampling_method: PERCENT_SAMPLING
   :type sampling_method: SamplingMethodType
   :param sample_percent: The percentage of the rows to sample
   :type sample_percent: float
   :param key_columns: The feature(s) to use as the key(s) when sampling
   :type key_columns: List[str]


   .. py:attribute:: sample_percent
      :type:  float


   .. py:attribute:: key_columns
      :type:  List[str]


   .. py:method:: __post_init__()


.. py:class:: _SamplingConfigFactory

   Bases: :py:obj:`abacusai.api_class.abstract._ApiClassFactory`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: config_class_key
      :value: 'sampling_method'



   .. py:attribute:: config_abstract_class


   .. py:attribute:: config_class_map


.. py:class:: MergeConfig

   Bases: :py:obj:`abacusai.api_class.abstract.ApiClass`


   An abstract class for the merge config of a feature group


   .. py:attribute:: merge_mode
      :type:  abacusai.api_class.enums.MergeMode


   .. py:method:: _get_builder()
      :classmethod:



   .. py:method:: __post_init__()


.. py:class:: LastNMergeConfig

   Bases: :py:obj:`MergeConfig`


   Merge LAST N chunks/versions of an incremental dataset.

   :param merge_mode: LAST_N
   :type merge_mode: MergeMode
   :param num_versions: The number of versions to merge. num_versions == 0 means merge all versions.
   :type num_versions: int
   :param include_version_timestamp_column: If set, include a column with the creation timestamp of source FG versions.
   :type include_version_timestamp_column: bool


   .. py:attribute:: num_versions
      :type:  int


   .. py:attribute:: include_version_timestamp_column
      :type:  bool


   .. py:method:: __post_init__()


.. py:class:: TimeWindowMergeConfig

   Bases: :py:obj:`MergeConfig`


   Merge rows within a given timewindow of the most recent timestamp

   :param merge_mode: TIME_WINDOW
   :type merge_mode: MergeMode
   :param feature_name: Time based column to index on
   :type feature_name: str
   :param time_window_size_ms: Range of merged rows will be [MAX_TIME - time_window_size_ms, MAX_TIME]
   :type time_window_size_ms: int
   :param include_version_timestamp_column: If set, include a column with the creation timestamp of source FG versions.
   :type include_version_timestamp_column: bool


   .. py:attribute:: feature_name
      :type:  str


   .. py:attribute:: time_window_size_ms
      :type:  int


   .. py:attribute:: include_version_timestamp_column
      :type:  bool


   .. py:method:: __post_init__()


.. py:class:: _MergeConfigFactory

   Bases: :py:obj:`abacusai.api_class.abstract._ApiClassFactory`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: config_class_key
      :value: 'merge_mode'



   .. py:attribute:: config_abstract_class


   .. py:attribute:: config_class_map


