Classes | Functions
ml_lib::dataset Namespace Reference

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.

Function Documentation

def ml_lib.dataset.bootstrap_samples (   dataset,
  number_samples,
  points_per_sample 
)

Makes bootstrap samples.

Parameters:
datasetDataset object
number_samplesnumber of bootstrap set to generate
points_per_samplenumber of points in each sample
Returns:
an iterator over bootstrap samples

Definition at line 94 of file dataset.py.

Calculates entropy in a dataset's output labels.

Parameters:
dataset

Definition at line 146 of file dataset.py.

Caculates the discrete entropy of a data vector.

Parameters:
data1xn 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.

Parameters:
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.

Parameters:
attributeattribute to split on
split_pointvalue 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]

Parameters:
datanxm matrix where each column is a data vector
attribute_numberrow to find unique values in

Definition at line 120 of file dataset.py.



ml_lib
Author(s): haidai
autogenerated on Wed Nov 27 2013 11:46:34