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/sageworks/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 SageWorks DataSource to be transformed |
required |
feature_uuid
|
str
|
The UUID of the SageWorks FeatureSet to be created |
required |
Source code in src/sageworks/core/transforms/data_to_features/light/data_to_features_light.py
post_transform(id_column=None, 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 Args: id_column(str) Optional: The name of the id column in the output DataFrame (default: None) event_time_column(str) Optional: The name of the event time column in the output DataFrame (default: None) one_hot_columns(list) Optional: The list of columns to one-hot encode (default: None)
Source code in src/sageworks/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/sageworks/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/sageworks/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) 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/sageworks/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 SageWorks DataSource to be transformed |
required |
feature_uuid
|
str
|
The UUID of the SageWorks FeatureSet to be created |
required |
Source code in src/sageworks/core/transforms/data_to_features/light/molecular_descriptors.py
transform_impl(**kwargs)
Compute a Feature Set based on RDKit Descriptors