Skip to main content

types

Classes concerning data types.

Classes

CategoricalRecord

class CategoricalRecord(encoder: Optional[_ExtendableLabelEncoder] = None, **kwargs: Any):

Stores information for a categorical feature in the schema.

Arguments

  • encoder: An encoder for the different categories. Defaults to None.

Ancestors

  • bitfount.data.types._SemanticTypeRecord

Static methods


def add_record_to_schema(schema: TableSchema, **constructor_arguments: Any)> None:

Create a categorical record and add it to the schema features.

Arguments

  • schema: A TableSchema object.
  • `constructor_arguments`**: Additional arguments to pass to the schema class.

Variables

  • semantic_type : [SemanticType](#semantictype) - Property for the relevant `SemanticType` for the class.

    Returns: The categorical SemanticType.

ContinuousRecord

class ContinuousRecord(    feature_name: str, dtype: Union[Dtype, np.dtype], description: Optional[str] = None,):

Stores information for a continuous feature in the schema.

Ancestors

  • bitfount.data.types._SemanticTypeRecord

Static methods


def add_record_to_schema(schema: TableSchema, **constructor_arguments: Any)> None:

Create a continuous record and add it to schema features.

Arguments

  • schema: A TableSchema object.
  • `constructor_arguments`**: Additional arguments to pass to the schema class.

Variables

  • semantic_type : [SemanticType](#semantictype) - Property for the relevant `SemanticType` for the class.

    Returns: The continuous SemanticType.

DataPathModifiers

class DataPathModifiers(*args, **kwargs):

TypedDict class for path modifiers.

NotRequired indicates that the keys don't all need to be present. But the keys that are present need to be one of the ones listed below.

Arguments

  • suffix: The suffix to be used for modifying a path.
  • prefix: The prefix to be used for modifying a path.

Ancestors

  • builtins.dict

Variables

  • static prefix : typing_extensions.NotRequired[str]
  • static suffix : typing_extensions.NotRequired[str]

DataSplit

class DataSplit(value, names=None, *, module=None, qualname=None, type=None, start=1):

Enum corresponding to the available data splits.

Ancestors

Variables

  • static TEST
  • static TRAIN
  • static VALIDATION

ImageRecord

class ImageRecord(    dimensions: Optional[Counter] = None,    modes: Optional[Counter] = None,    formats: Optional[Counter] = None,    **kwargs: Any,):

Stores information for an image feature in the schema.

Stores information for an image feature in the schema.

Arguments

  • dimensions: The dimensions of the different images in the column. Defaults to None.
  • modes: The modes of the different images in the column. Defaults to None.
  • formats: The formats of the different images in the column. Defaults to None.

Ancestors

  • bitfount.data.types._SemanticTypeRecord

Static methods


def add_record_to_schema(schema: TableSchema, **constructor_arguments: Any)> None:

Create an image record and add it to schema features.

Arguments

  • schema: A TableSchema object.
  • `constructor_arguments`**: Additional arguments to pass to the schema class.

Variables

  • semantic_type : [SemanticType](#semantictype) - Property for the relevant `SemanticType` for the class.

    Returns: The image SemanticType.

SemanticType

class SemanticType(value, names=None, *, module=None, qualname=None, type=None, start=1):

Simple wrapper for some basic data types.

Ancestors

Variables

  • static CATEGORICAL
  • static CONTINUOUS
  • static IMAGE
  • static TEXT

StrDictField

class StrDictField(    *,    load_default: typing.Any = <marshmallow.missing>,    missing: typing.Any = <marshmallow.missing>,    dump_default: typing.Any = <marshmallow.missing>,    default: typing.Any = <marshmallow.missing>,    data_key: str | None = None,    attribute: str | None = None,    validate: None | (typing.Callable[[typing.Any], typing.Any] | typing.Iterable[typing.Callable[[typing.Any], typing.Any]]) = None,    required: bool = False,    allow_none: bool | None = None,    load_only: bool = False,    dump_only: bool = False,    error_messages: dict[str, str] | None = None,    metadata: typing.Mapping[str, typing.Any] | None = None,    **additional_metadata,):

Field that can be str or dict.

Ancestors

TextRecord

class TextRecord(    feature_name: str, dtype: Union[Dtype, np.dtype], description: Optional[str] = None,):

Stores information for a text feature in the schema.

Ancestors

  • bitfount.data.types._SemanticTypeRecord

Static methods


def add_record_to_schema(schema: TableSchema, **constructor_arguments: Any)> None:

Create a text record and add it to schema features.

Arguments

  • schema: A TableSchema object.
  • `constructor_arguments`**: Additional arguments to pass to the schema class.

Variables

  • semantic_type : [SemanticType](#semantictype) - Property for the relevant `SemanticType` for the class.

    Returns: The text SemanticType.