Data To Features
API Classes
For most users the API Classes will provide all the general functionality to create a full AWS ML Pipeline
DataToFeaturesLight: Base Class for Light DataSource to FeatureSet using Pandas
DataToFeaturesLight
Bases: Transform
DataToFeaturesLight: Base Class for Light DataSource to FeatureSet using Pandas
Common Usage
Source code in src/workbench/core/transforms/data_to_features/light/data_to_features_light.py
__init__(data_uuid, feature_uuid)
DataToFeaturesLight Initialization
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_uuid
|
str
|
The UUID of the Workbench DataSource to be transformed |
required |
feature_uuid
|
str
|
The UUID of the Workbench FeatureSet to be created |
required |
Source code in src/workbench/core/transforms/data_to_features/light/data_to_features_light.py
post_transform(id_column, event_time_column=None, one_hot_columns=None, **kwargs)
At this point the output DataFrame should be populated, so publish it as a Feature Set
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_column
|
str
|
The ID column (must be specified, use "auto" for auto-generated IDs). |
required |
event_time_column
|
str
|
The name of the event time column (default: None). |
None
|
one_hot_columns
|
list
|
The list of columns to one-hot encode (default: None). |
None
|
Source code in src/workbench/core/transforms/data_to_features/light/data_to_features_light.py
pre_transform(query=None, **kwargs)
Pull the input DataSource into our Input Pandas DataFrame Args: query(str): Optional query to filter the input DataFrame
Source code in src/workbench/core/transforms/data_to_features/light/data_to_features_light.py
transform_impl(**kwargs)
Transform the input DataFrame into a Feature Set
Source code in src/workbench/core/transforms/data_to_features/light/data_to_features_light.py
MolecularDescriptors: Compute a Feature Set based on RDKit Descriptors
An alternative to using this class is to use the compute_molecular_descriptors
function directly.
df_features = compute_molecular_descriptors(df) to_features = PandasToFeatures("my_feature_set") to_features.set_input(df_features, id_column="id") to_features.set_output_tags(["blah", "whatever"]) to_features.transform()
MolecularDescriptors
Bases: DataToFeaturesLight
MolecularDescriptors: Create a FeatureSet (RDKit Descriptors) from a DataSource
Common Usage
Source code in src/workbench/core/transforms/data_to_features/light/molecular_descriptors.py
__init__(data_uuid, feature_uuid)
MolecularDescriptors Initialization
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_uuid
|
str
|
The UUID of the Workbench DataSource to be transformed |
required |
feature_uuid
|
str
|
The UUID of the Workbench FeatureSet to be created |
required |
Source code in src/workbench/core/transforms/data_to_features/light/molecular_descriptors.py
transform_impl(**kwargs)
Compute a Feature Set based on RDKit Descriptors