class openml.OpenMLClassificationTask(task_type_id: int, task_type: str, data_set_id: int, target_name: str, estimation_procedure_id: int = 1, estimation_procedure_type: Optional[str] = None, estimation_parameters: Optional[Dict[str, str]] = None, evaluation_measure: Optional[str] = None, data_splits_url: Optional[str] = None, task_id: Optional[int] = None, class_labels: Optional[List[str]] = None, cost_matrix: Optional[numpy.ndarray] = None)

OpenML Classification object.

Inherited from openml.OpenMLSupervisedTask

class_labelsList of str (optional)
cost_matrix: array (optional)
download_split(self) → openml.tasks.split.OpenMLSplit

Download the OpenML split for a given task.

get_X_and_y(self, dataset_format: str = 'array') → Tuple[Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix], Union[numpy.ndarray, pandas.core.series.Series]]

Get data associated with the current task.


Data structure of the returned data. See openml.datasets.OpenMLDataset.get_data() for possible options.

tuple - X and y
get_dataset(self) → openml.datasets.dataset.OpenMLDataset

Download dataset associated with task

property id

The id of the entity, it is unique for its entity type.


Opens the OpenML web page corresponding to this object in your default browser.

property openml_url

The URL of the object on the server, if it was uploaded, else None.

push_tag(self, tag: str)

Annotates this entity with a tag on the server.


Tag to attach to the flow.

remove_tag(self, tag: str)

Removes a tag from this entity on the server.


Tag to attach to the flow.

classmethod url_for_id(id_: int) → str

Return the OpenML URL for the object of the class entity with the given id.