Skip to content

Commit 1abf093

Browse files
committed
changed doctype of get_features_by_type
1 parent be63814 commit 1abf093

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

openml/datasets/dataset.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -320,19 +320,30 @@ def retrieve_class_labels(self, target_name='class'):
320320

321321

322322
def get_features_by_type(self, data_type, exclude=None,
323-
exclude_ignore_attributes=True, exclude_row_id_attribute=True):
323+
exclude_ignore_attributes=True,
324+
exclude_row_id_attribute=True):
324325
'''
325326
Returns indices of features of a given type, e.g., all nominal features.
326327
Can use additional parameters to exclude various features by index or ontology.
327328
328-
:param data_type: The data type to return (e.g., nominal, numeric, date, string)
329-
:param exclude: Indices to exclude (and adapt the return values as if these indices
329+
Parameters
330+
----------
331+
data_type : str
332+
The data type to return (e.g., nominal, numeric, date, string)
333+
exclude : list(int)
334+
Indices to exclude (and adapt the return values as if these indices
330335
are not present)
331-
:param exclude_ignore_attributes: Whether to exclude the defined ignore attributes
332-
(and adapt the return values as if these indices are not present)
333-
:param exclude_row_id_attribute:Whether to exclude the defined row id attributes
334-
(and adapt the return values as if these indices are not present)
335-
:return: a list of indices that have the specified data type
336+
exclude_ignore_attributes : bool
337+
Whether to exclude the defined ignore attributes (and adapt the
338+
return values as if these indices are not present)
339+
exclude_row_id_attribute : bool
340+
Whether to exclude the defined row id attributes (and adapt the
341+
return values as if these indices are not present)
342+
343+
Returns
344+
-------
345+
result : list
346+
a list of indices that have the specified data type
336347
'''
337348
assert data_type in OpenMLDataFeature.LEGAL_DATA_TYPES, "Illegal feature type requested"
338349
if self.ignore_attributes is not None:

0 commit comments

Comments
 (0)