Package pycv :: Package cs :: Package ml :: Package cla :: Module score :: Class ScoringCDataset
[hide private]
[frames] | no frames]

Class ScoringCDataset

source code

ml.Dataset --+    
             |    
  cla.CDataset --+
                 |
                ScoringCDataset

A binary CDataset with score s[i] associated with sample i.

Instance Methods [hide private]
 
__init__(self, separated_input_data, separated_scores=None) source code
 
new(self)
Make a copy of ScoringCDataset with a copy of scores and a reference to input_data.
source code
 
set_scores(self, value=0)
Set all weight values to 'value', initialize if necessary
source code
 
dofilter(self, j, filterarray)
Filter away some samples in class j.
source code
 
concat(self, j, input_data, scores)
Concatenate a few samples to class j.
source code
Method Details [hide private]

__init__(self, separated_input_data, separated_scores=None)
(Constructor)

source code 
Overrides: cla.CDataset.__init__

dofilter(self, j, filterarray)

source code 
Filter away some samples in class j.
Parameters:
  • j (int) - class j
  • filterarray (a 'bool' numpy.array of size self.nspc[j]) - for each element, True if the associating example is to be kept
Returns:
fr: filtering rate, the new number of samples of class j divided
by the old number of samples of class j. The class is updated.
Overrides: cla.CDataset.dofilter

concat(self, j, input_data, scores)

source code 

Concatenate a few samples to class j.

Output:
The class is updated.
Parameters:
  • j (int) - class j
  • input_data (an array of samples) - new samples to be concatenated
  • scores (an array of scores) - new scores to be concatenated
Overrides: cla.CDataset.concat