openml.tasks
.create_task¶
- openml.tasks.create_task(task_type: TaskType, dataset_id: int, estimation_procedure_id: int, target_name: str | None = None, evaluation_measure: str | None = None, **kwargs) OpenMLClassificationTask | OpenMLRegressionTask | OpenMLLearningCurveTask | OpenMLClusteringTask ¶
Create a task based on different given attributes.
Builds a task object with the function arguments as attributes. The type of the task object built is determined from the task type id. More information on how the arguments (task attributes), relate to the different possible tasks can be found in the individual task objects at the openml.tasks.task module.
- Parameters:
- task_typeTaskType
Id of the task type.
- dataset_idint
The id of the dataset for the task.
- target_namestr, optional
The name of the feature used as a target. At the moment, only optional for the clustering tasks.
- estimation_procedure_idint
The id of the estimation procedure.
- evaluation_measurestr, optional
The name of the evaluation measure.
- kwargsdict, optional
Other task attributes that are not mandatory for task upload.
- Returns:
- OpenMLClassificationTask, OpenMLRegressionTask,
- OpenMLLearningCurveTask, OpenMLClusteringTask