Skip to content

Commit

Permalink
Fix some warnings in data-mining-library docs
Browse files Browse the repository at this point in the history
  • Loading branch information
astaric committed Apr 27, 2017
1 parent 21922db commit 2f23ef2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 22 deletions.
3 changes: 3 additions & 0 deletions Orange/evaluation/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def compute_score(self, results):
class F1(Score):
"""
${sklpar}
Parameters
----------
results : Orange.evaluation.Results
Expand Down Expand Up @@ -144,6 +145,7 @@ def compute_score(self, results):
class AUC(Score):
"""
${sklpar}
Parameters
----------
results : Orange.evaluation.Results
Expand Down Expand Up @@ -200,6 +202,7 @@ def compute_score(self, results, target=None):
class LogLoss(Score):
"""
${sklpar}
Parameters
----------
results : Orange.evaluation.Results
Expand Down
11 changes: 6 additions & 5 deletions Orange/evaluation/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,12 @@ def get_augmented_data(self, model_names, include_attrs=True, include_prediction
def fit(self, train_data, test_data=None):
"""Fits `self.learners` using folds sampled from the provided data.
Args:
train_data (Table): table to sample train folds
test_data (Optional[Table]): tap to sample test folds
of None then `train_data` will be used
Parameters
----------
train_data : Table
table to sample train folds
test_data : Optional[Table]
tap to sample test folds of None then `train_data` will be used
"""
test_data = test_data or train_data
self.setup_indices(train_data, test_data)
Expand Down
37 changes: 22 additions & 15 deletions Orange/regression/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ class TreeLearner(Learner):
If the tree is not binary, it can contain zero-branches.
Args:
binarize: if `True` the inducer will find optimal split into two
subsets for values of discrete attributes. If `False` (default),
each value gets its branch.
min_samples_leaf: the minimal number of data instances in a leaf
min_samples_split: the minimal number of data instances that is split
into subgroups
max_depth: the maximal depth of the tree
Returns:
instance of OrangeTreeModel
Parameters
----------
binarize
if `True` the inducer will find optimal split into two
subsets for values of discrete attributes. If `False` (default),
each value gets its branch.
min_samples_leaf
the minimal number of data instances in a leaf
min_samples_split
the minimal number of data instances that is split
into subgroups
max_depth
the maximal depth of the tree
Returns
-------
instance of OrangeTreeModel
"""
__returns__ = TreeModel

Expand All @@ -57,10 +63,11 @@ def __init__(
def _select_attr(self, data):
"""Select the attribute for the next split.
Returns:
tuple with an instance of Node and a numpy array indicating
the branch index for each data instance, or -1 if data instance
is dropped
Returns
-------
tuple with an instance of Node and a numpy array indicating
the branch index for each data instance, or -1 if data instance
is dropped
"""
# Prevent false warnings by pylint
attr = attr_no = None
Expand Down
2 changes: 1 addition & 1 deletion doc/data-mining-library/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down
2 changes: 1 addition & 1 deletion doc/data-mining-library/source/reference/data.variable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Base class
.. automethod:: str_val
.. automethod:: to_val
.. automethod:: val_from_str_add
.. automethod:: compute_value
.. autoattribute:: compute_value

Method `compute_value` is usually invoked behind the scenes in
conversion of domains::
Expand Down

0 comments on commit 2f23ef2

Please sign in to comment.