Skip to content

Commit d8cc1b0

Browse files
committed
added relevant documentation
1 parent 39f4e91 commit d8cc1b0

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

openml/evaluations/evaluation.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11

22
class OpenMLEvaluation(object):
3+
'''
4+
Contains all meta-information about a run / evaluation combination,
5+
according to the evaluation/list function
36
7+
Parameters
8+
----------
9+
run_id : int
10+
task_id : int
11+
setup_id : int
12+
flow_id : int
13+
flow_name : str
14+
data_id : int
15+
data_name : str
16+
the name of the dataset
17+
function : str
18+
the evaluation function of this item (e.g., accuracy)
19+
upload_time : str
20+
the time of evaluation
21+
value : float
22+
the value of this evaluation
23+
array_data : str
24+
list of information per class (e.g., in case of precision, auroc, recall)
25+
'''
426
def __init__(self, run_id, task_id, setup_id, flow_id, flow_name,
527
data_id, data_name, function, upload_time, value,
628
array_data=None):

openml/study/functions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ def _multitag_to_list(result_dict, tag):
1313

1414

1515
def get_study(study_id):
16+
'''
17+
Retrieves all relevant information of an OpenML study from the server
18+
Note that some of the (data, tasks, flows, setups) fields can be empty
19+
(depending on information on the server)
20+
'''
1621
xml_string = _perform_api_call("study/%d" %(study_id))
1722
result_dict = xmltodict.parse(xml_string)['oml:study']
1823
id = int(result_dict['oml:id'])

openml/study/study.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11

22
class OpenMLStudy(object):
3+
'''
4+
An OpenMLStudy represents the OpenML concept of a study. It contains
5+
the following information: name, id, description, creation date,
6+
creator id and a set of tags.
7+
8+
According to this list of tags, the study object receives a list of
9+
OpenML object ids (datasets, flows, tasks and setups).
10+
11+
Can be used to obtain all relevant information from a study at once.
12+
13+
Parameters
14+
----------
15+
id : int
16+
the study id
17+
name : str
18+
the name of the study (meta-info)
19+
description : str
20+
brief description (meta-info)
21+
creation_date : str
22+
date of creation (meta-info)
23+
creator : int
24+
openml user id of the owner / creator
25+
tag : list(dict)
26+
The list of tags shows which tags are associated with the study.
27+
Each tag is a dict of (tag) name, window_start and write_access.
28+
data : list
29+
a list of data ids associated with this study
30+
tasks : list
31+
a list of task ids associated with this study
32+
flows : list
33+
a list of flow ids associated with this study
34+
setups : list
35+
a list of setup ids associated with this study
36+
'''
337

438
def __init__(self, id, name, description, creation_date, creator,
539
tag, data, tasks, flows, setups):

0 commit comments

Comments
 (0)