finmlkit.feature.base module¶
- class finmlkit.feature.base.BaseTransform(input_cols: Sequence[str] | str, output_cols: Sequence[str] | str)[source]¶
Bases:
ABC- abstract property output_name: str | list[str]¶
Get the output names of the transform. This is used to determine the output column names in the DataFrame. Used by prepare_output_nb to create the output Series. :return: Output name or list of output names
- produces: list[str]¶
- requires: list[str]¶
- class finmlkit.feature.base.BinaryOpTransform(left: BaseTransform, right: BaseTransform, op_name: str, op_func: Callable)[source]¶
Bases:
BaseTransformTransform that applies binary operations between two transforms
- property output_name: str | list[str]¶
Get the output names of the transform. This is used to determine the output column names in the DataFrame. Used by prepare_output_nb to create the output Series. :return: Output name or list of output names
- class finmlkit.feature.base.ConstantOpTransform(transform: BaseTransform, constant: float, op_name: str, op_func: Callable)[source]¶
Bases:
BaseTransformTransform that applies operations between a transform and a constant
- property output_name: str | list[str]¶
Get the output names of the transform. This is used to determine the output column names in the DataFrame. Used by prepare_output_nb to create the output Series. :return: Output name or list of output names
- class finmlkit.feature.base.CoreTransform(input_cols: Sequence[str] | str, output_cols: Sequence[str] | str)[source]¶
Bases:
BaseTransform,ABC
- class finmlkit.feature.base.MIMOTransform(input_cols: Sequence[str], output_cols: Sequence[str])[source]¶
Bases:
CoreTransform,ABCImplement a multiple input, multiple output transform on a DataFrame.
- property output_name: list[str]¶
Get the output names of the transform. :return: List of output names
- class finmlkit.feature.base.MISOTransform(input_cols: Sequence[str], output_col: str)[source]¶
Bases:
CoreTransform,ABCImplement a multiple input, single output transform on a DataFrame.
- property output_name: str¶
For MISO transforms, the output name is the same as the produces.
- Returns:
Output name
- class finmlkit.feature.base.MinMaxOpTransform(left: BaseTransform, right: BaseTransform, op_name: str, op_func: Callable)[source]¶
Bases:
BaseTransformTransform that applies min or max operations between two transforms
- property output_name: str | list[str]¶
Get the output names of the transform. This is used to determine the output column names in the DataFrame. Used by prepare_output_nb to create the output Series. :return: Output name or list of output names
- class finmlkit.feature.base.SIMOTransform(input_col: str, output_cols: Sequence[str])[source]¶
Bases:
CoreTransform,ABCImplement a single input, multiple output transform on a DataFrame.
- property output_name: list[str]¶
Get the output names of the transform. For SIMO transforms, the output names are derived from the input column name. :return: List of output names
- class finmlkit.feature.base.SISOTransform(input_col: str, output_col: str)[source]¶
Bases:
CoreTransform,ABCImplement a single input, single output transform on a DataFrame.
- property output_name: str¶
Get the output name of the transform. This is used to determine the output column name in the DataFrame. :return: Output name
- class finmlkit.feature.base.UnaryOpTransform(transform: BaseTransform, op_name: str, op_func: Callable)[source]¶
Bases:
BaseTransformTransform that applies unary operations to a transform
- property output_name: str | list[str]¶
Get the output names of the transform. This is used to determine the output column names in the DataFrame. Used by prepare_output_nb to create the output Series. :return: Output name or list of output names