functions
openml.tasks.functions
#
__list_tasks
#
Returns a Pandas DataFrame with information about OpenML tasks.
| PARAMETER | DESCRIPTION |
|---|---|
api_call
|
The API call specifying which tasks to return.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
A Pandas DataFrame with information about OpenML tasks.
|
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
|
KeyError
|
If an invalid key is found in the XML for a task. |
Source code in openml/tasks/functions.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | |
create_task
#
create_task(task_type: TaskType, dataset_id: int, estimation_procedure_id: int, target_name: str | None = None, evaluation_measure: str | None = None, **kwargs: Any) -> 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.
| PARAMETER | DESCRIPTION |
|---|---|
task_type
|
Id of the task type.
TYPE:
|
dataset_id
|
The id of the dataset for the task.
TYPE:
|
target_name
|
The name of the feature used as a target. At the moment, only optional for the clustering tasks.
TYPE:
|
estimation_procedure_id
|
The id of the estimation procedure.
TYPE:
|
evaluation_measure
|
The name of the evaluation measure.
TYPE:
|
kwargs
|
Other task attributes that are not mandatory for task upload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
(OpenMLClassificationTask, OpenMLRegressionTask)
|
|
(OpenMLLearningCurveTask, OpenMLClusteringTask)
|
|
Source code in openml/tasks/functions.py
delete_task
#
Delete task with id task_id from the OpenML server.
You can only delete tasks which you created and have no runs associated with them.
| PARAMETER | DESCRIPTION |
|---|---|
task_id
|
OpenML id of the task
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the deletion was successful. False otherwise. |
Source code in openml/tasks/functions.py
get_task
#
get_task(task_id: int, download_splits: bool = False, **get_dataset_kwargs: Any) -> OpenMLTask
Download OpenML task for a given task ID.
Downloads the task representation.
Use the download_splits parameter to control whether the splits are downloaded.
Moreover, you may pass additional parameter (args or kwargs) that are passed to
:meth:openml.datasets.get_dataset.
| PARAMETER | DESCRIPTION |
|---|---|
task_id
|
The OpenML task id of the task to download.
TYPE:
|
download_splits
|
Whether to download the splits as well.
TYPE:
|
get_dataset_kwargs
|
Args and kwargs can be used pass optional parameters to :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
task
|
TYPE:
|
Source code in openml/tasks/functions.py
get_tasks
#
get_tasks(task_ids: list[int], download_data: bool | None = None, download_qualities: bool | None = None) -> list[OpenMLTask]
Download tasks.
This function iterates :meth:openml.tasks.get_task.
| PARAMETER | DESCRIPTION |
|---|---|
task_ids
|
A list of task ids to download.
TYPE:
|
download_data
|
Option to trigger download of data along with the meta data.
TYPE:
|
download_qualities
|
Option to download 'qualities' meta-data in addition to the minimal dataset description.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list
|
|
Source code in openml/tasks/functions.py
list_tasks
#
list_tasks(task_type: TaskType | None = None, offset: int | None = None, size: int | None = None, tag: str | None = None, data_tag: str | None = None, status: str | None = None, data_name: str | None = None, data_id: int | None = None, number_instances: int | None = None, number_features: int | None = None, number_classes: int | None = None, number_missing_values: int | None = None) -> DataFrame
Return a number of tasks having the given tag and task_type
| PARAMETER | DESCRIPTION |
|---|---|
Filter
|
|
it
|
|
type
|
|
offset
|
the number of tasks to skip, starting from the first
TYPE:
|
task_type
|
Refers to the type of task.
TYPE:
|
size
|
the maximum number of tasks to show
TYPE:
|
tag
|
the tag to include
TYPE:
|
data_tag
|
the tag of the dataset
TYPE:
|
data_id
|
TYPE:
|
status
|
TYPE:
|
data_name
|
TYPE:
|
number_instances
|
TYPE:
|
number_features
|
TYPE:
|
number_classes
|
TYPE:
|
number_missing_values
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dataframe
|
All tasks having the given task_type and the give tag. Every task is represented by a row in the data frame containing the following information as columns: task id, dataset id, task_type and status. If qualities are calculated for the associated dataset, some of these are also returned. |