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

Training the tICs instead of the features #6

Open
sbhakat opened this issue Oct 25, 2018 · 2 comments
Open

Training the tICs instead of the features #6

sbhakat opened this issue Oct 25, 2018 · 2 comments

Comments

@sbhakat
Copy link

sbhakat commented Oct 25, 2018

I generated 4 tICs from the 4 dihedral features presented in the attached notebook. Now I want to train the tICs to see which tIC is more dominant over the other. And in this regard I want to generate a plot similar like SVM co-efficients vs Feature index mentioned in this notebook https://github.com/msultan/SML_CV/blob/master/alanine_example/01-svm_example.ipynb .

First question:

I tried something like that just substituting the original script a bit to train the tICA features


X=np.vstack(plot_feat)
train_X=np.vstack(tica_features)

y=np.concatenate([np.zeros(len(plot_feat[0])),
            np.ones(len(plot_feat[0]))])

if train:
    clf.fit(train_X,y)

train_X.sum(axis=1)[300:].std()

What is the meaning of this line train_X.sum(axis=1)[300:].std() and the output 2.2081068901447987

The I plotted the tIC0 vs SVM co-efficient using the following script and got an output like following

plot([0,1,2,3],clf.coef_[0],color=sns.color_palette("colorblind")[0],marker='o',label=r'$\alpha_L$ vs $\beta$')
xticks([0,1,2,3],[r'tic0',r'tic1',r'tic2',r'tic3'],size=20)
xlabel("tICs Index")
ylabel(r'$SVM_{cv}$ Coefficients')
legend()

image

Simple question: How do I get the exact value of SVM coefficient for each tICs. It is a bit hard to see from the plot. Any script?

@msultan
Copy link
Owner

msultan commented Oct 25, 2018

Simple question: How do I get the exact value of SVM coefficient for each tICs. It is a bit hard to see from the plot. Any script?

I am confused here. Have you tried printing out the coefficients instead of plotting them?

@msultan
Copy link
Owner

msultan commented Oct 25, 2018

What is the meaning of this line train_X.sum(axis=1)[300:].std() and the output 2.2081068901447987

I was calculating the standard deviation of each feature after summing them together. I am not sure I remember why exactly tbh.

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

No branches or pull requests

2 participants