Feature List

class datarobot.DatasetFeaturelist(id=None, name=None, features=None, dataset_id=None, dataset_version_id=None, creation_date=None, created_by=None, user_created=None, description=None)

A set of features attached to a dataset in the AI Catalog

Attributes:
idstr

the id of the dataset featurelist

dataset_idstr

the id of the dataset the featurelist belongs to

dataset_version_id: str, optional

the version id of the dataset this featurelist belongs to

namestr

the name of the dataset featurelist

featureslist of str

a list of the names of features included in this dataset featurelist

creation_datedatetime.datetime

when the featurelist was created

created_bystr

the user name of the user who created this featurelist

user_createdbool

whether the featurelist was created by a user or by DataRobot automation

descriptionstr, optional

the description of the featurelist. Only present on DataRobot-created featurelists.

classmethod get(dataset_id, featurelist_id)

Retrieve a dataset featurelist

Parameters:
dataset_idstr

the id of the dataset the featurelist belongs to

featurelist_idstr

the id of the dataset featurelist to retrieve

Returns:
featurelistDatasetFeatureList

the specified featurelist

Return type:

TypeVar(TDatasetFeaturelist, bound= DatasetFeaturelist)

delete()

Delete a dataset featurelist

Featurelists configured into the dataset as a default featurelist cannot be deleted.

Return type:

None

update(name=None)

Update the name of an existing featurelist

Note that only user-created featurelists can be renamed, and that names must not conflict with names used by other featurelists.

Parameters:
namestr, optional

the new name for the featurelist

Return type:

None

class datarobot.models.Featurelist(id=None, name=None, features=None, project_id=None, created=None, is_user_created=None, num_models=None, description=None)

A set of features used in modeling

Attributes:
idstr

the id of the featurelist

namestr

the name of the featurelist

featureslist of str

the names of all the Features in the featurelist

project_idstr

the project the featurelist belongs to

createddatetime.datetime

(New in version v2.13) when the featurelist was created

is_user_createdbool

(New in version v2.13) whether the featurelist was created by a user or by DataRobot automation

num_modelsint

(New in version v2.13) the number of models currently using this featurelist. A model is considered to use a featurelist if it is used to train the model or as a monotonic constraint featurelist, or if the model is a blender with at least one component model using the featurelist.

descriptionstr

(New in version v2.13) the description of the featurelist. Can be updated by the user and may be supplied by default for DataRobot-created featurelists.

classmethod from_data(data)

Overrides the parent method to ensure description is always populated

Parameters:
datadict

the data from the server, having gone through processing

Return type:

TypeVar(TFeaturelist, bound= Featurelist)

classmethod get(project_id, featurelist_id)

Retrieve a known feature list

Parameters:
project_idstr

The id of the project the featurelist is associated with

featurelist_idstr

The ID of the featurelist to retrieve

Returns:
featurelistFeaturelist

The queried instance

Raises:
ValueError

passed project_id parameter value is of not supported type

Return type:

TypeVar(TFeaturelist, bound= Featurelist)

delete(dry_run=False, delete_dependencies=False)

Delete a featurelist, and any models and jobs using it

All models using a featurelist, whether as the training featurelist or as a monotonic constraint featurelist, will also be deleted when the deletion is executed and any queued or running jobs using it will be cancelled. Similarly, predictions made on these models will also be deleted. All the entities that are to be deleted with a featurelist are described as “dependencies” of it. To preview the results of deleting a featurelist, call delete with dry_run=True

When deleting a featurelist with dependencies, users must specify delete_dependencies=True to confirm they want to delete the featurelist and all its dependencies. Without that option, only featurelists with no dependencies may be successfully deleted and others will error.

Featurelists configured into the project as a default featurelist or as a default monotonic constraint featurelist cannot be deleted.

Featurelists used in a model deployment cannot be deleted until the model deployment is deleted.

Parameters:
dry_runbool, optional

specify True to preview the result of deleting the featurelist, instead of actually deleting it.

delete_dependenciesbool, optional

specify True to successfully delete featurelists with dependencies; if left False by default, featurelists without dependencies can be successfully deleted and those with dependencies will error upon attempting to delete them.

Returns:
resultdict
A dictionary describing the result of deleting the featurelist, with the following keys
  • dry_run : bool, whether the deletion was a dry run or an actual deletion

  • can_delete : bool, whether the featurelist can actually be deleted

  • deletion_blocked_reason : str, why the featurelist can’t be deleted (if it can’t)

  • num_affected_models : int, the number of models using this featurelist

  • num_affected_jobs : int, the number of jobs using this featurelist

Return type:

DeleteFeatureListResult

classmethod from_server_data(data, keep_attrs=None)

Instantiate an object of this class using the data directly from the server, meaning that the keys may have the wrong camel casing

Parameters:
datadict

The directly translated dict of JSON from the server. No casing fixes have taken place

keep_attrsiterable

List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None

Return type:

TypeVar(T, bound= APIObject)

update(name=None, description=None)

Update the name or description of an existing featurelist

Note that only user-created featurelists can be renamed, and that names must not conflict with names used by other featurelists.

Parameters:
namestr, optional

the new name for the featurelist

descriptionstr, optional

the new description for the featurelist

Return type:

None

class datarobot.models.ModelingFeaturelist(id=None, name=None, features=None, project_id=None, created=None, is_user_created=None, num_models=None, description=None)

A set of features that can be used to build a model

In time series projects, a new set of modeling features is created after setting the partitioning options. These features are automatically derived from those in the project’s dataset and are the features used for modeling. Modeling features are only accessible once the target and partitioning options have been set. In projects that don’t use time series modeling, once the target has been set, ModelingFeaturelists and Featurelists will behave the same.

For more information about input and modeling features, see the time series documentation.

Attributes:
idstr

the id of the modeling featurelist

project_idstr

the id of the project the modeling featurelist belongs to

namestr

the name of the modeling featurelist

featureslist of str

a list of the names of features included in this modeling featurelist

createddatetime.datetime

(New in version v2.13) when the featurelist was created

is_user_createdbool

(New in version v2.13) whether the featurelist was created by a user or by DataRobot automation

num_modelsint

(New in version v2.13) the number of models currently using this featurelist. A model is considered to use a featurelist if it is used to train the model or as a monotonic constraint featurelist, or if the model is a blender with at least one component model using the featurelist.

descriptionstr

(New in version v2.13) the description of the featurelist. Can be updated by the user and may be supplied by default for DataRobot-created featurelists.

classmethod get(project_id, featurelist_id)

Retrieve a modeling featurelist

Modeling featurelists can only be retrieved once the target and partitioning options have been set.

Parameters:
project_idstr

the id of the project the modeling featurelist belongs to

featurelist_idstr

the id of the modeling featurelist to retrieve

Returns:
featurelistModelingFeaturelist

the specified featurelist

Return type:

TypeVar(TModelingFeaturelist, bound= ModelingFeaturelist)

update(name=None, description=None)

Update the name or description of an existing featurelist

Note that only user-created featurelists can be renamed, and that names must not conflict with names used by other featurelists.

Parameters:
namestr, optional

the new name for the featurelist

descriptionstr, optional

the new description for the featurelist

Return type:

None

delete(dry_run=False, delete_dependencies=False)

Delete a featurelist, and any models and jobs using it

All models using a featurelist, whether as the training featurelist or as a monotonic constraint featurelist, will also be deleted when the deletion is executed and any queued or running jobs using it will be cancelled. Similarly, predictions made on these models will also be deleted. All the entities that are to be deleted with a featurelist are described as “dependencies” of it. To preview the results of deleting a featurelist, call delete with dry_run=True

When deleting a featurelist with dependencies, users must specify delete_dependencies=True to confirm they want to delete the featurelist and all its dependencies. Without that option, only featurelists with no dependencies may be successfully deleted and others will error.

Featurelists configured into the project as a default featurelist or as a default monotonic constraint featurelist cannot be deleted.

Featurelists used in a model deployment cannot be deleted until the model deployment is deleted.

Parameters:
dry_runbool, optional

specify True to preview the result of deleting the featurelist, instead of actually deleting it.

delete_dependenciesbool, optional

specify True to successfully delete featurelists with dependencies; if left False by default, featurelists without dependencies can be successfully deleted and those with dependencies will error upon attempting to delete them.

Returns:
resultdict
A dictionary describing the result of deleting the featurelist, with the following keys
  • dry_run : bool, whether the deletion was a dry run or an actual deletion

  • can_delete : bool, whether the featurelist can actually be deleted

  • deletion_blocked_reason : str, why the featurelist can’t be deleted (if it can’t)

  • num_affected_models : int, the number of models using this featurelist

  • num_affected_jobs : int, the number of jobs using this featurelist

Return type:

DeleteFeatureListResult

class datarobot.models.featurelist.DeleteFeatureListResult(*args, **kwargs)