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