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

NameError: name 'color_result' is not defined #54

Open
grace3999 opened this issue Aug 9, 2022 · 1 comment
Open

NameError: name 'color_result' is not defined #54

grace3999 opened this issue Aug 9, 2022 · 1 comment

Comments

@grace3999
Copy link

Error when trying to create PCA biplot with target label. Following this tutorial:
https://www.reneshbedre.com/blog/principal-component-analysis.html

pca_scores = PCA().fit_transform(X_st)
cluster.biplot(cscore=pca_scores, loadings=loadings, labels=X.columns.values, var1=round(pca_out.explained_variance_ratio_[0]*100, 2),
var2=round(pca_out.explained_variance_ratio_[1]*100, 2), colorlist=target)


NameError Traceback (most recent call last)
in
7 pca_scores = PCA().fit_transform(X_st)
8 cluster.biplot(cscore=pca_scores, loadings=loadings, labels=X.columns.values, var1=round(pca_out.explained_variance_ratio_[0]*100, 2),
----> 9 var2=round(pca_out.explained_variance_ratio_[1]*100, 2), colorlist=target)

~/opt/anaconda3/envs/analysis/lib/python3.6/site-packages/bioinfokit/visuz.py in biplot(cscore, loadings, labels, var1, var2, var3, axlabelfontsize, axlabelfontname, figtype, r, show, markerdot, dotsize, valphadot, colordot, arrowcolor, valphaarrow, arrowlinestyle, arrowlinewidth, centerlines, colorlist, legendpos, datapoints, dim)
1604
1605 # only if y axis is positive
-> 1606 if pv:
1607 if y_pos > 0:
1608 pv_symb = general.pvalue_symbol(pv[i], sign_symbol_opts['symbol'])

NameError: name 'color_result' is not defined

@reneshbedre
Copy link
Owner

which version of bioinfokit you are using? Is it possible for you to share your data to replicate error?

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