Package TEES :: Package Core :: Module Split
[hide private]

Module Split

source code

Functions for dividing data into random sets.


Version: $Revision: 1.3 $

Functions [hide private]
 
getSample(popSize, sampleFraction, seed=0)
Generates a list of 1/0 values for defining a random sample for a list of length popSize.
source code
 
getFolds(popSize, folds, seed=0)
Divides the population into n folds of roughly equal size.
source code
Variables [hide private]
  __package__ = 'TEES.Core'
Function Details [hide private]

getSample(popSize, sampleFraction, seed=0)

source code 

Generates a list of 1/0 values for defining a random sample for a list of length popSize. List elements with value 0 belong to the sample.

Parameters:
  • popSize (int) - The length of the list from which the sample is drawn.
  • sampleFraction (float) - The fraction [0,1] of the population to be included in the sample
  • seed (a seed value for the Python random number generator) - int

getFolds(popSize, folds, seed=0)

source code 

Divides the population into n folds of roughly equal size.

Parameters:
  • popSize (int) - The length of the list from which the sample is drawn.
  • folds (int >= 1) - the number of folds to divide the population into
  • seed (a seed value for the Python random number generator) - int