rialto.maker package
Submodules
rialto.maker.containers module
- class rialto.maker.containers.FeatureFunction(name: str, callable_object: Callable, value_type: ValueType = ValueType.nominal)[source]
Bases:
object
A container for feature generating object
contains a callable object, it’s name, parameters
- metadata() FeatureMetadata [source]
Return functions metadata
- Returns:
metadata dict
- class rialto.maker.containers.FeatureHolder[source]
Bases:
list
A container for FeatureFunctions used in the feature building process
Basically just a plain list with unique type name
- get_metadata() List[FeatureMetadata] [source]
Concats metadata from all functions
- Returns:
List of metadata
rialto.maker.feature_maker module
rialto.maker.utils module
rialto.maker.wrappers module
- rialto.maker.wrappers.depends(feature_functions: Callable | FeatureHolder, dependency: str)[source]
Specify dependency features
The purpose of this wrapper is to define inter-feature dependency and order the execution accordingly :param feature_functions: FeatureHolder or pure function :param dependency: str name of required function :return: FeatureHolder
- rialto.maker.wrappers.desc(feature_functions: Callable | FeatureHolder, desc: str)[source]
Wrap feature with string description, used in metadata
- Parameters:
feature_functions – FeatureHolder or pure function
type – FeatureType enum (numerical, ordinal, nominal)
- Returns:
FeatureHolder
- rialto.maker.wrappers.feature(feature_functions: Callable | FeatureHolder, feature_type: ValueType)[source]
Wrap a feature definitions. Use as the outermost decorator!!!
The purpose of this wrapper is to wrap function that have no other decorator inside FeatureHolder and define feature type :param feature_functions: FeatureHolder or pure function :param feature_type: FeatureType enum (numerical, ordinal, nominal) :return: FeatureHolder
- rialto.maker.wrappers.param(feature_functions: Callable | FeatureHolder, parameter_name: str, values: List)[source]
Wrap a feature function with custom parameter, can be chained
Creates a cartesian product of all previous parameters with new ones :param feature_functions: FeatureHolder or pure function :param parameter_name: string name of the parameter :param values: a list of parameter values :return: FeatureHolder