task
OpenMLClassificationTask
¶
Bases: OpenMLSupervisedTask
OpenML Classification object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type_id
|
TaskType
|
ID of the Classification task type. |
required |
task_type
|
str
|
Name of the Classification task type. |
required |
data_set_id
|
int
|
ID of the OpenML dataset associated with the Classification task. |
required |
target_name
|
str
|
Name of the target variable. |
required |
estimation_procedure_id
|
int
|
ID of the estimation procedure for the Classification task. |
None
|
estimation_procedure_type
|
str
|
Type of the estimation procedure. |
None
|
estimation_parameters
|
dict
|
Estimation parameters for the Classification task. |
None
|
evaluation_measure
|
str
|
Name of the evaluation measure. |
None
|
data_splits_url
|
str
|
URL of the data splits for the Classification task. |
None
|
task_id
|
Union[int, None]
|
ID of the Classification task (if it already exists on OpenML). |
None
|
class_labels
|
List of str
|
A list of class labels (for classification tasks). |
None
|
cost_matrix
|
array
|
A cost matrix (for classification tasks). |
None
|
Source code in openml/tasks/task.py
OpenMLClusteringTask
¶
Bases: OpenMLTask
OpenML Clustering object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type_id
|
TaskType
|
Task type ID of the OpenML clustering task. |
required |
task_type
|
str
|
Task type of the OpenML clustering task. |
required |
data_set_id
|
int
|
ID of the OpenML dataset used in clustering the task. |
required |
estimation_procedure_id
|
int
|
ID of the OpenML estimation procedure. |
None
|
task_id
|
Union[int, None]
|
ID of the OpenML clustering task. |
None
|
estimation_procedure_type
|
str
|
Type of the OpenML estimation procedure used in the clustering task. |
None
|
estimation_parameters
|
dict
|
Parameters used by the OpenML estimation procedure. |
None
|
data_splits_url
|
str
|
URL of the OpenML data splits for the clustering task. |
None
|
evaluation_measure
|
str
|
Evaluation measure used in the clustering task. |
None
|
target_name
|
str
|
Name of the target feature (class) that is not part of the feature set for the clustering task. |
None
|
Source code in openml/tasks/task.py
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
|
get_X(dataset_format='array')
¶
Get data associated with the current task.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_format
|
str
|
Data structure of the returned data. See :meth: |
'array'
|
Returns:
Type | Description |
---|---|
tuple - X and y
|
|
Source code in openml/tasks/task.py
OpenMLLearningCurveTask
¶
Bases: OpenMLClassificationTask
OpenML Learning Curve object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type_id
|
TaskType
|
ID of the Learning Curve task. |
required |
task_type
|
str
|
Name of the Learning Curve task. |
required |
data_set_id
|
int
|
ID of the dataset that this task is associated with. |
required |
target_name
|
str
|
Name of the target feature in the dataset. |
required |
estimation_procedure_id
|
int
|
ID of the estimation procedure to use for evaluating models. |
None
|
estimation_procedure_type
|
str
|
Type of the estimation procedure. |
None
|
estimation_parameters
|
dict
|
Additional parameters for the estimation procedure. |
None
|
data_splits_url
|
str
|
URL of the file containing the data splits for Learning Curve task. |
None
|
task_id
|
Union[int, None]
|
ID of the Learning Curve task. |
None
|
evaluation_measure
|
str
|
Name of the evaluation measure to use for evaluating models. |
None
|
class_labels
|
list of str
|
Class labels for Learning Curve tasks. |
None
|
cost_matrix
|
numpy array
|
Cost matrix for Learning Curve tasks. |
None
|
Source code in openml/tasks/task.py
OpenMLRegressionTask
¶
Bases: OpenMLSupervisedTask
OpenML Regression object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type_id
|
TaskType
|
Task type ID of the OpenML Regression task. |
required |
task_type
|
str
|
Task type of the OpenML Regression task. |
required |
data_set_id
|
int
|
ID of the OpenML dataset. |
required |
target_name
|
str
|
Name of the target feature used in the Regression task. |
required |
estimation_procedure_id
|
int
|
ID of the OpenML estimation procedure. |
None
|
estimation_procedure_type
|
str
|
Type of the OpenML estimation procedure. |
None
|
estimation_parameters
|
dict
|
Parameters used by the OpenML estimation procedure. |
None
|
data_splits_url
|
str
|
URL of the OpenML data splits for the Regression task. |
None
|
task_id
|
Union[int, None]
|
ID of the OpenML Regression task. |
None
|
evaluation_measure
|
str
|
Evaluation measure used in the Regression task. |
None
|
Source code in openml/tasks/task.py
OpenMLSupervisedTask
¶
Bases: OpenMLTask
, ABC
OpenML Supervised Classification object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type_id
|
TaskType
|
ID of the task type. |
required |
task_type
|
str
|
Name of the task type. |
required |
data_set_id
|
int
|
ID of the OpenML dataset associated with the task. |
required |
target_name
|
str
|
Name of the target feature (the class variable). |
required |
estimation_procedure_id
|
int
|
ID of the estimation procedure for the task. |
None
|
estimation_procedure_type
|
str
|
Type of the estimation procedure for the task. |
None
|
estimation_parameters
|
dict
|
Estimation parameters for the task. |
None
|
evaluation_measure
|
str
|
Name of the evaluation measure for the task. |
None
|
data_splits_url
|
str
|
URL of the data splits for the task. |
None
|
task_id
|
int | None
|
Refers to the unique identifier of task. |
None
|
Source code in openml/tasks/task.py
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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
|
estimation_parameters: dict[str, str] | None
property
writable
¶
Return the estimation parameters for the task.
get_X_and_y(dataset_format='array')
¶
Get data associated with the current task.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_format
|
str
|
Data structure of the returned data. See :meth: |
'array'
|
Returns:
Type | Description |
---|---|
tuple - X and y
|
|
Source code in openml/tasks/task.py
OpenMLTask
¶
Bases: OpenMLBase
OpenML Task object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_id
|
int | None
|
Refers to the unique identifier of OpenML task. |
required |
task_type_id
|
TaskType
|
Refers to the type of OpenML task. |
required |
task_type
|
str
|
Refers to the OpenML task. |
required |
data_set_id
|
int
|
Refers to the data. |
required |
estimation_procedure_id
|
int
|
Refers to the type of estimates used. |
1
|
estimation_procedure_type
|
str | None
|
Refers to the type of estimation procedure used for the OpenML task. |
None
|
estimation_parameters
|
dict[str, str] | None
|
Estimation parameters used for the OpenML task. |
None
|
evaluation_measure
|
str | None
|
Refers to the evaluation measure. |
None
|
data_splits_url
|
str | None
|
Refers to the URL of the data splits used for the OpenML task. |
None
|
Source code in openml/tasks/task.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
|
id: int | None
property
¶
Return the OpenML ID of this task.
download_split()
¶
Download the OpenML split for a given task.
Source code in openml/tasks/task.py
get_dataset()
¶
get_split_dimensions()
¶
Get the (repeats, folds, samples) of the split for a given task.
Source code in openml/tasks/task.py
get_train_test_split_indices(fold=0, repeat=0, sample=0)
¶
Get the indices of the train and test splits for a given task.
Source code in openml/tasks/task.py
TaskType
¶
Bases: Enum
Possible task types as defined in OpenML.