gmum / mlls2015

Active Learning experiments for Machine Learning in Life Sciences Workshop ECML 2015
16 stars 6 forks source link

fix chen_krause for SVMTan #64

Closed kudkudak closed 9 years ago

kudkudak commented 9 years ago

It should make the projection, while currently it uses raw data.

igorsieradzki commented 9 years ago

Error:

2015-06-10 03:54:39,063 - fit_SVMTAN_chen_krause_cathepsin_ExtFP_20_subfit - ERROR - Traceback (most recent call last):
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../experiments/fit_active_learning.py", line 141, in main
    result = run()
  File "/lhome/home/czarnecki/staszek_tmp/tradeshift/local/lib/python2.7/site-packages/sacred-0.6.3-py2.7.egg/sacred/con
fig/captured_function.py", line 45, in captured_function
    result = wrapped(*args, **kwargs)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../experiments/fit_active_learning.py", line 98, in run
    base_seed=seed, warm_start_percentage=warm_start_percentage)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../experiments/experiment_runner.py", line 72, in fit_AL_on_folds
    model.fit(X, y_obst, test_error_datasets=test_error_datasets)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../models/active_model.py", line 120, in fit
    labeled = self._query_labels(X, y, model=self.grid, rng=rng)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../models/active_model.py", line 228, in _query_labels
    batch_size=self.batch_size, rng=rng, D=D)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../models/strategy.py", line 274, in chen_krause
    H = hit_and_run(X_known, Y_known, rng=rng, w0=w0, N=N, T=T, eps=eps)
  File "/lhome/home/czarnecki/st/al_ecml/experiments/../models/strategy.py", line 207, in hit_and_run
    missed_w0 = float((np.abs(np.sign(w0.dot(X.T)) - Y).sum(axis=1)/2.0)[0])
ValueError: Cannot find a common data type.