Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup python modular graphical examples #3045

Merged
merged 1 commit into from
Mar 6, 2016

Conversation

sanuj
Copy link
Contributor

@sanuj sanuj commented Mar 5, 2016

Most of the examples were working except the following:
so_multiclass_director_BMRM.py:

ImportError: cannot import name DirectorStructuredModel

so_multiclass_BMRM.py:

Traceback (most recent call last):
  File "so_multiclass_BMRM.py", line 78, in <module>
    plt.plot(xrange(res.get_n_iters()), Fps, hold=True)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 3154, in plot
    ret = ax.plot(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 1812, in inner
    return func(ax, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_axes.py", line 1424, in plot
    for line in self._get_lines(*args, **kwargs):
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 386, in _grab_next_args
    for seg in self._plot_args(remaining, kwargs):
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 364, in _plot_args
    x, y = self._xy_from_xy(x, y)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 223, in _xy_from_xy
    raise ValueError("x and y must have same first dimension")
ValueError: x and y must have same first dimension

regression_gaussian_process_demo.py and regression_gaussian_process_modelselection.py:

Traceback (most recent call last):
  File "regression_gaussian_process_demo.py", line 14, in <module>
    from modshogun import GradientModelSelection
ImportError: cannot import name GradientModelSelection

eigenfaces.py:

Reading images ...
Traceback (most recent call last):
  File "eigenfaces.py", line 184, in <module>
    images = readImages(list_filenames);
  File "eigenfaces.py", line 132, in readImages
    images = np.empty( (IMAGE_HEIGHT*IMAGE_WIDHT, (len(list_filenames))-1))
ValueError: negative dimensions are not allowed

interactive_gp_demo.py:

Traceback (most recent call last):
  File "interactive_gp_demo.py", line 218, in plot_gp
    inf.get_negative_marginal_likelihood()
AttributeError: 'ExactInferenceMethod' object has no attribute 'get_negative_marginal_likelihood'

metric_lmnn_objective.py:

IOError: [Errno 2] No such file or directory: '../../data/fm_train_multiclass_digits.dat.gz'

@sanuj
Copy link
Contributor Author

sanuj commented Mar 5, 2016

I'm cloning shogun-data right now. Will run metric_lmnn_objective.py and eigenfaces.py again after that.

@@ -11,10 +11,9 @@
from PyQt4.QtGui import *

import matplotlib
from matplotlib import mpl
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gives import error so removing this.

@sanuj
Copy link
Contributor Author

sanuj commented Mar 5, 2016

I found these bugs while I was playing with KernelRidgeRegression python example and then decided to clean all the graphical examples. I must add, the interactive examples (interactive_svm_demo.py etc) are fun to play with :)

@sanuj
Copy link
Contributor Author

sanuj commented Mar 6, 2016

eigenfaces.py and metric_lmnn_objective.py work with shogun-data.
@karlnapf Please review.

@karlnapf
Copy link
Member

karlnapf commented Mar 6, 2016

Nice thanks for that.

@karlnapf
Copy link
Member

karlnapf commented Mar 6, 2016

BTW we should include these graphical examples in the build, will open an issue

karlnapf added a commit that referenced this pull request Mar 6, 2016
cleanup python modular graphical examples
@karlnapf karlnapf merged commit 9d751d0 into shogun-toolbox:develop Mar 6, 2016
@sanuj sanuj deleted the python_examples_cleanup branch March 7, 2016 03:45
@sanuj sanuj restored the python_examples_cleanup branch March 7, 2016 03:45
@sanuj sanuj deleted the python_examples_cleanup branch March 7, 2016 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants