Package classifiers :: Module data_splitter :: Class bluedata
[frames] | no frames]

Class bluedata

source code


This is an extension of gmisclib.blue_data_selector.bluedata which is aware of the classids of data. It tries to split the data to take the same fraction of each class.

Instance Methods
 
__init__(self, data, blueness=2.0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
split(self, n, seed=0)
Split the stored data into a group of n and the remainder.
source code
 
__len__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, data, blueness=2.0)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • data (a sequence of datum_tr objects.)
Overrides: object.__init__

split(self, n, seed=0)

source code 

Split the stored data into a group of n and the remainder. Successive calls to split() will tend to (as nearly as possible) put different data into the first list.

Parameters:
  • n (int or float)
Returns:
tuple(list of length n(or nearly), list of remainder)