-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
IPython Notebook for HessianLLE. #3540
Conversation
I think we should put the content into the existing notebook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I have to say that the exaples in scikits notebook look much cooler than the plot here ;)
Can we have something similar?
"from mpl_toolkits.mplot3d import Axes3D\n", | ||
"\n", | ||
"\n", | ||
"mat = loadmat('usps.mat')\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to make sure this works when executed from its folde ron our servers. See the other notebooks for the relative path of the usps data
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than putting all content into a single cell, split it into multiple ones.
Then dont use source code comments to explain what you are doing, but the notebook markdown in separate cells
"#print Xall_.shape\n", | ||
"Yall = np.array(mat['label'].squeeze(), dtype=np.double)\n", | ||
"Yall_ = np.resize(Yall, (1024, ))\n", | ||
"def plot(data, embedded_data, colors='m'):\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please define functions in their own cells
Also give every function a proper name, and put a minimal docstring
"Xall_ = np.resize(Xall, (256, 1024))\n", | ||
"#The number of training examples have been reduced to make it feasible to run.\n", | ||
"\n", | ||
"#print Xall_\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please no commented out code in patches
"\tplt.axis('tight'); plt.axis('off')\n", | ||
"\tplt.show()\n", | ||
"\n", | ||
"from modshogun import StochasticProximityEmbedding, RealFeatures, HessianLocallyLinearEmbedding\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls do
import modshogun as sg
and do all imports in a single cell
"\n", | ||
"#print converter.get_reconstruction_shift()\n", | ||
"\n", | ||
"plot(data, embedded_data, colors)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every plot needs a title and axis labels.
In addition, it should have some description of what we can see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that, I made some comments
ill close for now, feel free to reopen if you have updates |
This addresses the #2674
This notebook is a SHOGUN analog of the scikit tutorial given here. Note that I have included the tutorial only for one of the manifold learning methods i.e.
Hessian LLE
. More would be included once this is reviewed better.The output of the notebook (along with the plot, of course) is here.
@karlnapf Review.