functions
openml.study.functions
#
__list_studies
#
Retrieves the list of OpenML studies and returns it in a dictionary or a Pandas DataFrame.
| PARAMETER | DESCRIPTION |
|---|---|
api_call
|
The API call for retrieving the list of OpenML studies.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DataFrame
|
A Pandas DataFrame of OpenML studies |
Source code in openml/study/functions.py
attach_to_study
#
Attaches a set of runs to a study.
| PARAMETER | DESCRIPTION |
|---|---|
study_id
|
OpenML id of the study
TYPE:
|
run_ids
|
List of entities to link to the collection
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
new size of the study (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
attach_to_suite
#
Attaches a set of tasks to a benchmarking suite.
| PARAMETER | DESCRIPTION |
|---|---|
suite_id
|
OpenML id of the study
TYPE:
|
task_ids
|
List of entities to link to the collection
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
new size of the suite (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
create_benchmark_suite
#
create_benchmark_suite(name: str, description: str, task_ids: list[int], alias: str | None = None) -> OpenMLBenchmarkSuite
Creates an OpenML benchmark suite (collection of entity types, where the tasks are the linked entity)
| PARAMETER | DESCRIPTION |
|---|---|
name
|
the name of the study (meta-info)
TYPE:
|
description
|
brief description (meta-info)
TYPE:
|
task_ids
|
a list of task ids associated with this study
more can be added later with
TYPE:
|
alias
|
a string ID, unique on server (url-friendly)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLStudy
|
A local OpenML study object (call publish method to upload to server) |
Source code in openml/study/functions.py
create_study
#
create_study(name: str, description: str, run_ids: list[int] | None = None, alias: str | None = None, benchmark_suite: int | None = None) -> OpenMLStudy
Creates an OpenML study (collection of data, tasks, flows, setups and run), where the runs are the main entity (collection consists of runs and all entities (flows, tasks, etc) that are related to these runs)
| PARAMETER | DESCRIPTION |
|---|---|
benchmark_suite
|
the benchmark suite (another study) upon which this study is ran.
TYPE:
|
name
|
the name of the study (meta-info)
TYPE:
|
description
|
brief description (meta-info)
TYPE:
|
run_ids
|
a list of run ids associated with this study,
these can also be added later with
TYPE:
|
alias
|
a string ID, unique on server (url-friendly)
TYPE:
|
benchmark_suite
|
the ID of the suite for which this study contains run results
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLStudy
|
A local OpenML study object (call publish method to upload to server) |
Source code in openml/study/functions.py
delete_study
#
Deletes a study from the OpenML server.
| PARAMETER | DESCRIPTION |
|---|---|
study_id
|
OpenML id of the study
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True iff the deletion was successful. False otherwise |
Source code in openml/study/functions.py
delete_suite
#
Deletes a study from the OpenML server.
| PARAMETER | DESCRIPTION |
|---|---|
suite_id
|
OpenML id of the study
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True iff the deletion was successful. False otherwise |
Source code in openml/study/functions.py
detach_from_study
#
Detaches a set of run ids from a study.
| PARAMETER | DESCRIPTION |
|---|---|
study_id
|
OpenML id of the study
TYPE:
|
run_ids
|
List of entities to unlink from the collection
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
new size of the study (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
detach_from_suite
#
Detaches a set of task ids from a suite.
| PARAMETER | DESCRIPTION |
|---|---|
suite_id
|
OpenML id of the study
TYPE:
|
task_ids
|
List of entities to unlink from the collection
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
|
new size of the study (in terms of explicitly linked entities)
|
|
Source code in openml/study/functions.py
get_study
#
get_study(study_id: int | str, arg_for_backwards_compat: str | None = None) -> OpenMLStudy
Retrieves all relevant information of an OpenML study from the server.
| PARAMETER | DESCRIPTION |
|---|---|
study
|
study id (numeric or alias)
|
arg_for_backwards_compat
|
The example given in arxiv.org/pdf/1708.03731.pdf uses an older version of the API which required specifying the type of study, i.e. tasks. We changed the implementation of studies since then and split them up into suites (collections of tasks) and studies (collections of runs) so this argument is no longer needed.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLStudy
|
The OpenML study object |
Source code in openml/study/functions.py
get_suite
#
get_suite(suite_id: int | str) -> OpenMLBenchmarkSuite
Retrieves all relevant information of an OpenML benchmarking suite from the server.
| PARAMETER | DESCRIPTION |
|---|---|
study
|
study id (numeric or alias)
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLSuite
|
The OpenML suite object |
Source code in openml/study/functions.py
list_studies
#
list_studies(offset: int | None = None, size: int | None = None, status: str | None = None, uploader: list[str] | None = None, benchmark_suite: int | None = None) -> DataFrame
Return a list of all studies which are on OpenML.
| PARAMETER | DESCRIPTION |
|---|---|
offset
|
The number of studies to skip, starting from the first.
TYPE:
|
size
|
The maximum number of studies to show.
TYPE:
|
status
|
Should be {active, in_preparation, deactivated, all}. By default active studies are returned.
TYPE:
|
uploader
|
Result filter. Will only return studies created by these users.
TYPE:
|
benchmark_suite
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
datasets
|
Every dataset is represented by a dictionary containing the following information: - id - alias (optional) - name - benchmark_suite (optional) - status - creator - creation_date If qualities are calculated for the dataset, some of these are also returned.
TYPE:
|
Source code in openml/study/functions.py
list_suites
#
list_suites(offset: int | None = None, size: int | None = None, status: str | None = None, uploader: list[int] | None = None) -> DataFrame
Return a list of all suites which are on OpenML.
| PARAMETER | DESCRIPTION |
|---|---|
offset
|
The number of suites to skip, starting from the first.
TYPE:
|
size
|
The maximum number of suites to show.
TYPE:
|
status
|
Should be {active, in_preparation, deactivated, all}. By default active suites are returned.
TYPE:
|
uploader
|
Result filter. Will only return suites created by these users.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
datasets
|
Every row is represented by a dictionary containing the following information: - id - alias (optional) - name - main_entity_type - status - creator - creation_date
TYPE:
|
Source code in openml/study/functions.py
update_study_status
#
Updates the status of a study to either 'active' or 'deactivated'.
| PARAMETER | DESCRIPTION |
|---|---|
study_id
|
The data id of the dataset
TYPE:
|
status
|
'active' or 'deactivated'
TYPE:
|
Source code in openml/study/functions.py
update_suite_status
#
Updates the status of a study to either 'active' or 'deactivated'.
| PARAMETER | DESCRIPTION |
|---|---|
suite_id
|
The data id of the dataset
TYPE:
|
status
|
'active' or 'deactivated'
TYPE:
|