models.py
def dv2f(self, dv, dv0, x):
    '''
    Computes the features used in the StackModel. These are:
    the decision value (DV) and max DV by row under the UniformOVA
    model; the DV and max DV by row under RidgePCA model; the 
    median dv for positive and negative instances of each class;
    the estimated counts under the count model. 
    '''
    rowmax = dv.max(1)
    row_dv = (dv.transpose() - rowmax).transpose()
    rowmax0 = dv0.max(1)
    row_dv0 = (dv0.transpose() - rowmax0).transpose()
    rates = np.tile(self.yrate, (dv.shape[0], 1) )
    posdv = np.tile(self.posdv, (dv.shape[0], 1) )
    posdv0 = np.tile(self.posdv0, (dv.shape[0], 1) )
    negdv = np.tile(self.negdv, (dv.shape[0], 1) )
    cts = self.count_model.predict(x)
    cts = np.tile(cts, (dv.shape[1], 1)).transpose()
    f = np.column_stack( (dv.ravel(),
                          row_dv.ravel(),
                          dv0.ravel(),
                          row_dv0.ravel(),
                          rates.ravel(),
                          posdv.ravel(),
                          posdv0.ravel(),
                          negdv.ravel(),
                          cts.ravel()) )
    return f

    Computes the features used in the StackModel. These are:
    the decision value (DV) and max DV by row under the UniformOVA
    model; the DV and max DV by row under RidgePCA model; the 
    median dv for positive and negative instances of each class;
    the estimated counts under the count model. 
    
Computes the features used in the StackModel. These are:
the decision value (DV) and max DV by row under the UniformOVA
model; the DV and max DV by row under RidgePCA model; the
median dv for positive and negative instances of each class;
the estimated counts under the count model.
Computes the features used in the StackModel . These are : the decision value ( DV ) and max DV by row under the UniformOVA model ; the DV and max DV by row under RidgePCA model ; the median dv for positive and negative instances of each class ; the estimated counts under the count model .
def dv2f(self, dv, dv0, x):
    rowmax = dv.max(1)
    row_dv = (dv.transpose() - rowmax).transpose()
    rowmax0 = dv0.max(1)
    row_dv0 = (dv0.transpose() - rowmax0).transpose()
    rates = np.tile(self.yrate, (dv.shape[0], 1) )
    posdv = np.tile(self.posdv, (dv.shape[0], 1) )
    posdv0 = np.tile(self.posdv0, (dv.shape[0], 1) )
    negdv = np.tile(self.negdv, (dv.shape[0], 1) )
    cts = self.count_model.predict(x)
    cts = np.tile(cts, (dv.shape[1], 1)).transpose()
    f = np.column_stack( (dv.ravel(),
                          row_dv.ravel(),
                          dv0.ravel(),
                          row_dv0.ravel(),
                          rates.ravel(),
                          posdv.ravel(),
                          posdv0.ravel(),
                          negdv.ravel(),
                          cts.ravel()) )
    return f
def dv2f ( self , dv , dv0 , x ) : rowmax = dv . max ( 1 ) row_dv = ( dv . transpose ( ) - rowmax ) . transpose ( ) rowmax0 = dv0 . max ( 1 ) row_dv0 = ( dv0 . transpose ( ) - rowmax0 ) . transpose ( ) rates = np . tile ( self . yrate , ( dv . shape [ 0 ] , 1 ) ) posdv = np . tile ( self . posdv , ( dv . shape [ 0 ] , 1 ) ) posdv0 = np . tile ( self . posdv0 , ( dv . shape [ 0 ] , 1 ) ) negdv = np . tile ( self . negdv , ( dv . shape [ 0 ] , 1 ) ) cts = self . count_model . predict ( x ) cts = np . tile ( cts , ( dv . shape [ 1 ] , 1 ) ) . transpose ( ) f = np . column_stack ( ( dv . ravel ( ) , row_dv . ravel ( ) , dv0 . ravel ( ) , row_dv0 . ravel ( ) , rates . ravel ( ) , posdv . ravel ( ) , posdv0 . ravel ( ) , negdv . ravel ( ) , cts . ravel ( ) ) ) return f
Computes the features used in the StackModel.
Computes the features used in the StackModel .
'''
    Computes the features used in the StackModel. These are:
    the decision value (DV) and max DV by row under the UniformOVA
    model; the DV and max DV by row under RidgePCA model; the 
    median dv for positive and negative instances of each class;
    the estimated counts under the count model. 
    '''
self
dv
dv0
x