gnu-octave / statistics

The Statistics package for GNU Octave
GNU General Public License v3.0
24 stars 22 forks source link

evalclusters fails class not found: ClusterCriterion #119

Closed lostbard closed 7 months ago

lostbard commented 8 months ago

See octave bug #65045

   >>    eva = evalclusters(meas,'kmeans','CalinskiHarabasz','KList',1:6)

error: class not found: ClusterCriterion
error: called from
    <unknown>
    evalclusters at line 294 column 10

    >> 

Issue is that the classdef files (including the superclass) that are created on certain evalclusters calls are in a private folder and so fails lookup on creating the classes.

Functionality changed in octave after 5.2 ? But also according to matlab:

You cannot put class definitions (classdef file) in private folders because doing so would not meet the requirements for class or path folders. [1]

[1] https://www.mathworks.com/help/matlab/matlab_oop/organizing-classes-in-folders.html#br5wlnh

pr0m1th3as commented 8 months ago

Would it word if I move them to a separate folder?

lostbard commented 8 months ago

Separate folder that was in the loadpath - it should

pr0m1th3as commented 7 months ago

@lostbard Just pushed a commit to to address this issue. Please, verify that it works as expected before I close this issue. It would be very helpful if you could add a few BISTs to the 'evalclusters' function to avoid future regressions.

lostbard commented 7 months ago

The examples that were previously failing work now Thanks!

On my fedora machine running pkg test statistics now tests as:

Summary:

PASS 6845 FAIL 19 XFAIL (reported bug) 2 XFAIL (expected failure) 1

..ve/api-v58/packages/statistics-1.6.1/@RegressionGAM/predict.m pass 8/12
FAIL 4 ..l/share/octave/api-v58/packages/statistics-1.6.1/gampredict.m pass 8/23
FAIL 15

It looks that that functionality is still work though so perhaps expected

lostbard commented 7 months ago

added pull request for adding test for evalclusters

https://github.com/gnu-octave/statistics/pull/120

pr0m1th3as commented 7 months ago

Thanks for the PR. I am just trying to fix those issues today (holidays season :smile: ). Hopefully I will push further changes tonight regarding the regressionGAM functions. I am closing this issue.