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

test_plotScores_raises errors occasionally #11

Closed
jaketmp opened this issue Apr 23, 2018 · 2 comments
Closed

test_plotScores_raises errors occasionally #11

jaketmp opened this issue Apr 23, 2018 · 2 comments
Labels
unittests Issues in the unittest, or code in need of testing

Comments

@jaketmp
Copy link
Member

jaketmp commented Apr 23, 2018

Maybe an be an issue in pyChemometrics cv with small sample nos?

======================================================================
ERROR: test_plotScores_raises (test_plotting.test_plotting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jtpearce/Dropbox (Personal)/Development/nPYc-toolbox/Tests/test_plotting.py", line 849, in test_plotScores_raises
    pcaModel = nPYc.multivariate.exploratoryAnalysisPCA(dataset)
  File "../nPYc/multivariate/exploratoryAnalysisPCA.py", line 86, in exploratoryAnalysisPCA
    raise exp
  File "../nPYc/multivariate/exploratoryAnalysisPCA.py", line 60, in exploratoryAnalysisPCA
    scree_cv = PCAmodel._screecv_optimize_ncomps(data, total_comps=maxComponents, stopping_condition=minQ2, **kwargs)
  File "/Users/jtpearce/Dropbox (Personal)/Development/pyChemometrics/pyChemometrics/ChemometricsPCA.py", line 572, in _screecv_optimize_ncomps
    currmodel.cross_validation(x, outputdist=False, cv_method=cv_method, press_impute=False)
  File "/Users/jtpearce/Dropbox (Personal)/Development/pyChemometrics/pyChemometrics/ChemometricsPCA.py", line 498, in cross_validation
    cv_loads.append(np.array([x[comp] for x in loadings]))
  File "/Users/jtpearce/Dropbox (Personal)/Development/pyChemometrics/pyChemometrics/ChemometricsPCA.py", line 498, in <listcomp>
    cv_loads.append(np.array([x[comp] for x in loadings]))
IndexError: index 8 is out of bounds for axis 0 with size 8

----------------------------------------------------------------------
@jaketmp jaketmp added the unittests Issues in the unittest, or code in need of testing label Apr 23, 2018
@jaketmp
Copy link
Member Author

jaketmp commented Apr 23, 2018

Running test_plotScores_raises 100 x

OK = 88
ERROR = 12

@jaketmp
Copy link
Member Author

jaketmp commented Apr 23, 2018

Problem localised to Gscorreia89/pyChemometrics/issues/8

@jaketmp jaketmp closed this as completed Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unittests Issues in the unittest, or code in need of testing
Projects
None yet
Development

No branches or pull requests

1 participant