Fix mistakes in function comments

This commit is contained in:
2020-11-11 19:14:36 +01:00
parent 1c869e154e
commit 475ad7e752

View File

@@ -284,9 +284,8 @@ class Splitter:
:type data: np.array (m, n_classes)
:param y: vector of labels (classes)
:type y: np.array (m,)
:return: vector with the class assigned to each sample values
(can be 0, 1, ...) -1 if none produces information gain
:rtype: np.array shape (m,)
:return: column of dataset to be taken into account to split dataset
:rtype: int
"""
max_gain = 0
selected = -1
@@ -307,8 +306,8 @@ class Splitter:
:type data: np.array (m, n_classes)
:param y: vector of labels (classes)
:type y: np.array (m,)
:return: vector with distances to hyperplane (can be positive or neg.)
:rtype: np.array shape (m,)
:return: column of dataset to be taken into account to split dataset
:rtype: int
"""
# select the class with max number of samples
_, samples = np.unique(y, return_counts=True)