Package ml :: Package lib :: Package scikit :: Module features_file_utils
[hide private]
[frames] | no frames]

Module features_file_utils

source code

Created on Aug 29, 2012


Author: desouza

Functions [hide private]
 
read_labels_file(path, delim, encoding='utf-8')
Reads the labels of each column in the training and test files (features and reference files).
source code
 
read_reference_file(path, delim, encoding='utf-8')
Parses the file that contains the references and stores it in a numpy array.
source code
 
read_features_file(path, delim, encoding='utf-8')
Reads the features for each instance and stores it on an numpy array.
source code
Variables [hide private]
  __package__ = 'ml.lib.scikit'
Function Details [hide private]

read_labels_file(path, delim, encoding='utf-8')

source code 

Reads the labels of each column in the training and test files (features and reference files).

Parameters:
  • path - the path of the labels file
  • delim - the character used to separate the label strings.
  • encoding - the character encoding used to read the file. Default is 'utf-8'.
Returns:
a list of strings representing each feature column.

read_reference_file(path, delim, encoding='utf-8')

source code 

Parses the file that contains the references and stores it in a numpy array.

@param path the path of the file. @delim char the character used to separate values.

Returns:
a numpy array representing each instance response value

read_features_file(path, delim, encoding='utf-8')

source code 

Reads the features for each instance and stores it on an numpy array.

Parameters:
  • path - the path to the file containing the feature set.
  • delim - the character used to separate the values in the file pointed by path.
  • encoding - the character encoding used to read the file.
Returns:
an numpy array where the columns are the features and the rows are the instances.