Skip to content

Commit

Permalink
Fixed swissroll example
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 20, 2011
1 parent 2fec2bb commit a7f397a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/undocumented/python_modular/graphical/swissroll.py
@@ -1,4 +1,5 @@
import numpy
numpy.random.seed(40)
tt = numpy.genfromtxt('../../../../data/toy/swissroll_color.dat',unpack=True).T
X = numpy.genfromtxt('../../../../data/toy/swissroll.dat',unpack=True).T
N = X.shape[1]
Expand All @@ -25,7 +26,7 @@

lisomap = Isomap()
lisomap.set_landmark(True)
lisomap.set_landmark_number(500)
lisomap.set_landmark_number(20)
lisomap.set_k(9)
preprocs.append((lisomap,"Landmark Isomap with k=%d, %d landmarks" % (lisomap.get_k(),lisomap.get_landmark_number())))

Expand Down Expand Up @@ -56,7 +57,7 @@
from shogun.Features import RealFeatures

for (i, (preproc, label)) in enumerate(preprocs):
X = numpy.genfromtxt('../../../../../data/toy/swissroll.dat',unpack=True).T
X = numpy.genfromtxt('../../../../data/toy/swissroll.dat',unpack=True).T
features = RealFeatures(X)
preproc.set_target_dim(2)
new_feats = preproc.apply_to_feature_matrix(features)
Expand Down

0 comments on commit a7f397a

Please sign in to comment.