Recommended Models
- class datarobot.models.ModelRecommendation(project_id, model_id, recommendation_type)
A collection of information about a recommended model for a project.
- Attributes:
- project_idstr
the id of the project the model belongs to
- model_idstr
the id of the recommended model
- recommendation_typestr
the type of model recommendation
- classmethod get(project_id, recommendation_type=None)
Retrieves the default or specified by recommendation_type recommendation.
- Parameters:
- project_idstr
The project’s id.
- recommendation_typeenums.RECOMMENDED_MODEL_TYPE
The type of recommendation to get. If None, returns the default recommendation.
- Returns:
- recommended_modelModelRecommendation
- Return type:
Optional
[ModelRecommendation
]
- classmethod get_all(project_id)
Retrieves all of the current recommended models for the project.
- Parameters:
- project_idstr
The project’s id.
- Returns:
- recommended_modelslist of ModelRecommendation
- Return type:
List
[ModelRecommendation
]
- classmethod get_recommendation(recommended_models, recommendation_type)
Returns the model in the given list with the requested type.
- Parameters:
- recommended_modelslist of ModelRecommendation
- recommendation_typeenums.RECOMMENDED_MODEL_TYPE
the type of model to extract from the recommended_models list
- Returns:
- recommended_modelModelRecommendation or None if no model with the requested type exists
- Return type:
Optional
[ModelRecommendation
]
- get_model()
Returns the Model associated with this ModelRecommendation.
- Returns:
- recommended_modelModel or DatetimeModel if the project is datetime-partitioned
- Return type:
Union
[DatetimeModel
,Model
]