Skip to content

Commit

Permalink
Added LPP python modular example
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Nov 5, 2011
1 parent 5280282 commit 59c976a
Showing 1 changed file with 26 additions and 0 deletions.
@@ -0,0 +1,26 @@
from tools.load import LoadMatrix

lm=LoadMatrix()
data = lm.load_numbers('../data/fm_train_real.dat')

parameter_list = [[data,10],[data,20]]

def converter_localitypreservingprojections_modular(data,k):
from shogun.Features import RealFeatures
from shogun.Converter import LocalityPreservingProjections

features = RealFeatures(data)

converter = LocalityPreservingProjections()
converter.set_target_dim(1)
converter.set_k(k)
converter.set_tau(2.0)
converter.apply(features)

return features


if __name__=='__main__':
print 'LocalityPreservingProjections'
converter_localitypreservingprojections_modular(*parameter_list[0])

0 comments on commit 59c976a

Please sign in to comment.