Classes | |
class | AttributeDescriptor |
class | Dataset |
Functions | |
def | bootstrap_samples |
Makes bootstrap samples. | |
def | dataset_entropy_discrete |
Calculates entropy in a dataset's output labels. | |
def | entropy_discrete |
Caculates the discrete entropy of a data vector. | |
def | leave_one_out |
Good for leave one out cross validation loops. | |
def | split_continuous |
Splits up a dataset based on value in a particular attribute. | |
def | unique_values |
Common quantities calculated from datasets. |
def ml_lib.dataset.bootstrap_samples | ( | dataset, | |
number_samples, | |||
points_per_sample | |||
) |
Makes bootstrap samples.
dataset | Dataset object |
number_samples | number of bootstrap set to generate |
points_per_sample | number of points in each sample |
Definition at line 94 of file dataset.py.
def ml_lib.dataset.dataset_entropy_discrete | ( | dataset | ) |
Calculates entropy in a dataset's output labels.
dataset |
Definition at line 146 of file dataset.py.
def ml_lib.dataset.entropy_discrete | ( | data | ) |
Caculates the discrete entropy of a data vector.
data | 1xn matrix of discrete values |
Definition at line 132 of file dataset.py.
def ml_lib.dataset.leave_one_out | ( | dataset, | |
index | |||
) |
Good for leave one out cross validation loops.
dataset | |
index |
Definition at line 52 of file dataset.py.
def ml_lib.dataset.split_continuous | ( | dataset, | |
attribute, | |||
split_point | |||
) |
Splits up a dataset based on value in a particular attribute.
attribute | attribute to split on |
split_point | value in that attribute to split on |
Definition at line 63 of file dataset.py.
def ml_lib.dataset.unique_values | ( | data, | |
attribute_number = 0 |
|||
) |
Common quantities calculated from datasets.
Returns unique values represented by an attribute
ex. unique_values(np.matrix([1, 2, 3, 4, 4, 4, 5]), 0) returns [1,2,3,4,5]
data | nxm matrix where each column is a data vector |
attribute_number | row to find unique values in |
Definition at line 120 of file dataset.py.