functions
__list_studies(api_call)
¶
Retrieves the list of OpenML studies and returns it in a dictionary or a Pandas DataFrame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_call
|
str
|
The API call for retrieving the list of OpenML studies. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
A Pandas DataFrame of OpenML studies |
Source code in openml/study/functions.py
attach_to_study(study_id, run_ids)
¶
Attaches a set of runs to a study.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study_id
|
int
|
OpenML id of the study |
required |
run_ids
|
list(int)
|
List of entities to link to the collection |
required |
Returns:
| Type | Description |
|---|---|
int
|
new size of the study (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
attach_to_suite(suite_id, task_ids)
¶
Attaches a set of tasks to a benchmarking suite.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
suite_id
|
int
|
OpenML id of the study |
required |
task_ids
|
list(int)
|
List of entities to link to the collection |
required |
Returns:
| Type | Description |
|---|---|
int
|
new size of the suite (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
create_benchmark_suite(name, description, task_ids, alias=None)
¶
Creates an OpenML benchmark suite (collection of entity types, where the tasks are the linked entity)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
the name of the study (meta-info) |
required |
description
|
str
|
brief description (meta-info) |
required |
task_ids
|
list
|
a list of task ids associated with this study
more can be added later with |
required |
alias
|
str(optional)
|
a string ID, unique on server (url-friendly) |
None
|
Returns:
| Type | Description |
|---|---|
OpenMLStudy
|
A local OpenML study object (call publish method to upload to server) |
Source code in openml/study/functions.py
create_study(name, description, run_ids=None, alias=None, benchmark_suite=None)
¶
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)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
benchmark_suite
|
int(optional)
|
the benchmark suite (another study) upon which this study is ran. |
None
|
name
|
str
|
the name of the study (meta-info) |
required |
description
|
str
|
brief description (meta-info) |
required |
run_ids
|
list
|
a list of run ids associated with this study,
these can also be added later with |
None
|
alias
|
str(optional)
|
a string ID, unique on server (url-friendly) |
None
|
benchmark_suite
|
int | None
|
the ID of the suite for which this study contains run results |
None
|
Returns:
| Type | Description |
|---|---|
OpenMLStudy
|
A local OpenML study object (call publish method to upload to server) |
Source code in openml/study/functions.py
delete_study(study_id)
¶
Deletes a study from the OpenML server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study_id
|
int
|
OpenML id of the study |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True iff the deletion was successful. False otherwise |
Source code in openml/study/functions.py
delete_suite(suite_id)
¶
Deletes a study from the OpenML server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
suite_id
|
int
|
OpenML id of the study |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True iff the deletion was successful. False otherwise |
Source code in openml/study/functions.py
detach_from_study(study_id, run_ids)
¶
Detaches a set of run ids from a study.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study_id
|
int
|
OpenML id of the study |
required |
run_ids
|
list(int)
|
List of entities to unlink from the collection |
required |
Returns:
| Type | Description |
|---|---|
int
|
new size of the study (in terms of explicitly linked entities) |
Source code in openml/study/functions.py
detach_from_suite(suite_id, task_ids)
¶
Detaches a set of task ids from a suite.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
suite_id
|
int
|
OpenML id of the study |
required |
task_ids
|
list(int)
|
List of entities to unlink from the collection |
required |
Returns:
| Type | Description |
|---|---|
int
|
|
new size of the study (in terms of explicitly linked entities)
|
|
Source code in openml/study/functions.py
get_study(study_id, arg_for_backwards_compat=None)
¶
Retrieves all relevant information of an OpenML study from the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study
|
study id (numeric or alias) |
required | |
arg_for_backwards_compat
|
str
|
The example given in https://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. |
None
|
Returns:
| Type | Description |
|---|---|
OpenMLStudy
|
The OpenML study object |
Source code in openml/study/functions.py
get_suite(suite_id)
¶
Retrieves all relevant information of an OpenML benchmarking suite from the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study
|
study id (numeric or alias) |
required |
Returns:
| Type | Description |
|---|---|
OpenMLSuite
|
The OpenML suite object |
Source code in openml/study/functions.py
list_studies(offset=None, size=None, status=None, uploader=None, benchmark_suite=None)
¶
Return a list of all studies which are on OpenML.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
int
|
The number of studies to skip, starting from the first. |
None
|
size
|
int
|
The maximum number of studies to show. |
None
|
status
|
str
|
Should be {active, in_preparation, deactivated, all}. By default active studies are returned. |
None
|
uploader
|
list(int)
|
Result filter. Will only return studies created by these users. |
None
|
benchmark_suite
|
int
|
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
datasets |
dataframe
|
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. |
Source code in openml/study/functions.py
list_suites(offset=None, size=None, status=None, uploader=None)
¶
Return a list of all suites which are on OpenML.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
int
|
The number of suites to skip, starting from the first. |
None
|
size
|
int
|
The maximum number of suites to show. |
None
|
status
|
str
|
Should be {active, in_preparation, deactivated, all}. By default active suites are returned. |
None
|
uploader
|
list(int)
|
Result filter. Will only return suites created by these users. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
datasets |
dataframe
|
Every row is represented by a dictionary containing the following information: - id - alias (optional) - name - main_entity_type - status - creator - creation_date |
Source code in openml/study/functions.py
update_study_status(study_id, status)
¶
Updates the status of a study to either 'active' or 'deactivated'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study_id
|
int
|
The data id of the dataset |
required |
status
|
(str,)
|
'active' or 'deactivated' |
required |
Source code in openml/study/functions.py
update_suite_status(suite_id, status)
¶
Updates the status of a study to either 'active' or 'deactivated'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
suite_id
|
int
|
The data id of the dataset |
required |
status
|
(str,)
|
'active' or 'deactivated' |
required |