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

Clustering prediction crossval error #142

Open
RichardScottOZ opened this issue Mar 4, 2021 · 2 comments
Open

Clustering prediction crossval error #142

RichardScottOZ opened this issue Mar 4, 2021 · 2 comments

Comments

@RichardScottOZ
Copy link
Contributor

RichardScottOZ commented Mar 4, 2021

I hadn't used the clustering function before, on prediction, got this:-

Uncaught exception on processor 0
Traceback (most recent call last):
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\rscott\AppData\Local\Continuum\anaconda3\envs\gdaltest\Scripts\uncoverml.exe\__main__.py", line 7, in <module>
    sys.exit(cli())
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\uncoverml\scripts\__init__.py", line 162, in predict
    predict_cli.main(config_file, partitions, mask, retain)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\uncoverml\scripts\predict_cli.py", line 152, in main
    model, config, config.metadata_file)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\uncoverml\mpiops.py", line 105, in run_once
    f_result = f(*args, **kwargs)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\uncoverml\scripts\predict_cli.py", line 167, in write_prediction_metadata
    mobj = MetadataSummary(model, config)
  File "c:\users\rscott\appdata\local\continuum\anaconda3\envs\gdaltest\lib\site-packages\uncoverml\metadata_profiler.py", line 92, in __init__
    if config.cross_validate and os.path.exists(config.crossval_scores_file):
AttributeError: 'Config' object has no attribute 'cross_validate'
@RichardScottOZ
Copy link
Contributor Author

Had no crossval data as I just used the sample config as a base - the prediction wrote out though - produced a cluster class map, model and thumbnail. So just a small bug in checking for a config that isn't needed in this case?

@RichardScottOZ
Copy link
Contributor Author

This seemed to work fine though as a dummy

clustering:
n_classes: 30
oversample_factor: 5

validation:
k-fold:
folds: 5
parallel: False
random_seed: 42

features:

  • type: ordinal
    files:

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

1 participant