Recipes¶
class datarobot.models.recipe.Recipe¶
Data wrangling entity, which contains all information needed to transform dataset and generate SQL.
classmethod update_downsampling(recipe_id, downsampling)¶
Set downsampling for the recipe, applied during publishing.
- Return type:
Recipe
retrieve_preview(max_wait=600, number_of_operations_to_use=None)¶
Retrieve preview and compute it, if absent.
- Parameters:
- max_wait (
int
) – The number of seconds to wait for the result.- number_of_operations_to_use (
Optional[int]
) – Request preview for particular number of operations.- Returns: preview
- Return type:
dict
retrieve_insights(max_wait=600, number_of_operations_to_use=None)¶
Retrieve insights for the sample. When preview is requested, the insights job starts automatically.
- Parameters:
- max_wait (
int
) – The number of seconds to wait for the result.- number_of_operations_to_use (
Optional[int]
) – Retrieves insights for the specified number of operations. First, preview computation for the same number of operations must be submitted.- Return type:
Any
classmethod set_inputs(recipe_id, inputs)¶
Set inputs for the recipe.
- Return type:
Recipe
classmethod set_operations(recipe_id, operations)¶
Set operations for the recipe.
- Return type:
Recipe
classmethod set_recipe_metadata(recipe_id, metadata)¶
Update metadata for the recipe.
- Parameters:
- recipe_id (
str
) – Recipe ID.- metadata (
Dict[str
,str]
) – Dictionary of metadata to be updated.- Returns: recipe – New recipe with updated metadata.
- Return type:
Recipe
get_sql(operations=None)¶
Generate sql for the given recipe in a transient way, recipe is not modified. if operations is None, recipe operations are used to generate sql. if operations = [], recipe operations are ignored during sql generation. if operations is not empty list, generate sql for them.
- Return type:
str
classmethod from_data_store(use_case, data_store, data_source_type, dialect, data_source_inputs, recipe_type=RecipeType.WRANGLING)¶
Create a wrangling recipe from data store.
- Return type:
Recipe
classmethod from_dataset(use_case, dataset, dialect=None, inputs=None, recipe_type=RecipeType.WRANGLING, snapshot_policy=DataWranglingSnapshotPolicy.LATEST)¶
Create a wrangling recipe from dataset.
- Return type:
Recipe
class datarobot.models.recipe.RecipeSettings¶
Settings, for example to apply at downsampling stage.
class datarobot.models.recipe.RecipeDatasetInput¶
Object, describing inputs for recipe transformations.
class datarobot.models.recipe.DatasetInput¶
class datarobot.models.recipe.DataSourceInput¶
Inputs required to create a new recipe from data store.
Recipe Operations¶
class datarobot.models.recipe_operation.WranglingOperation¶
class datarobot.models.recipe_operation.DownsamplingOperation¶
class datarobot.models.recipe_operation.SamplingOperation¶
class datarobot.models.recipe_operation.BaseTimeAwareTask¶
class datarobot.models.recipe_operation.TaskPlanElement¶
class datarobot.models.recipe_operation.CategoricalStats¶
class datarobot.models.recipe_operation.NumericStats¶
class datarobot.models.recipe_operation.Lags¶
class datarobot.models.recipe_operation.LagsOperation¶
Generate lags in a window.
class datarobot.models.recipe_operation.WindowCategoricalStatsOperation¶
Generate rolling statistics in a window for categorical features.
class datarobot.models.recipe_operation.WindowNumericStatsOperation¶
Generate various rolling numeric statistics in a window. Output could be a several columns.
class datarobot.models.recipe_operation.TimeSeriesOperation¶
Operation to generate a dataset ready for time series modeling: with forecast point, forecast distances, known in advance columns, etc.
class datarobot.models.recipe_operation.ComputeNewOperation¶
class datarobot.models.recipe_operation.RenameColumnsOperation¶
class datarobot.models.recipe_operation.FilterCondition¶
class datarobot.models.recipe_operation.FilterOperation¶
Filter rows.
class datarobot.models.recipe_operation.DropColumnsOperation¶
class datarobot.models.recipe_operation.RandomSamplingOperation¶
class datarobot.models.recipe_operation.DatetimeSamplingOperation¶