Commits

Olivier Grisel committed 262f72c

fix style + train a model by default

Comments (0)

Files changed (1)

experiments/xp_movie_prediction.py

 from gumby.adapter.movie import Movie
 from gumby.adapter.movie import load_movie
 from gumby.adapter.movie import MovieAdapter
+from pysgd import SvmModel
 
 import logging
 logging.config.fileConfig("log.ini")
         #ma.plot_mse_gain_over_identity("gain_mse.png")
 
     end_generation = time.time()
-    log.info("generated %d frames in %03fs", BATCH_SIZE, end_generation-start)
+    log.info("generated %d frames in %03fs",
+             BATCH_SIZE, end_generation - start)
 
     # dump the data set on disk so as to be able to quickly reuse it later
     # without going through brain adapting again
 
     end_conversion = time.time()
     log.info("converted %d frames to %d training points in %03fs",
-             BATCH_SIZE, len(i), end_conversion-end_generation)
+             BATCH_SIZE, len(i), end_conversion - end_generation)
 
     print "saving " + INPUTS_FILENAME
     dump(i, file(INPUTS_FILENAME, 'wb'))
     log.info("loaded %d frames in %0.3fs", len(i),
              time.time() - start)
 
-
+m = SvmModel()
+m.train(i, o)