Esempio n. 1
0
    def sivmselect(self):
        sivmmdl = SIVM(self.data, num_bases=self._nsub, compute_w=True, compute_h=False, dist_measure='cosine')

        sivmmdl.initialization()    
        sivmmdl.factorize()
        idx = sivmmdl.select
        return idx
Esempio n. 2
0
 def sample(self, A, c):
     # for optimizing the volume of the submatrix, set init to 'origin' (otherwise the volume of
     # the ordinary simplex would be optimized) 
     sivm_mdl = SIVM(A, num_bases=c, dist_measure=self._dist_measure,  
                         init=self.init)                        
     sivm_mdl.factorize(show_progress=False, compute_w=True, niter=1,
                        compute_h=False, compute_err=False)
     
     return sivm_mdl.select