[GRASS-user] v.class.mlR Error
Moritz Lennert
mlennert at club.worldonline.be
Thu Jun 7 05:39:52 PDT 2018
On 07/06/18 13:45, Jamille Haarloo wrote:
> I see. That was one of the big problems then. I knew it used R-resources
> but wasn't sure the software itself was required. Must have overlooked
> it in the documentation and other user- topics as I was reading about
> the module.
You are right that it is never explicitely stated that it is the user's
responsibility to install R. I just committed a patch to the man page
which explains this in the Dependencies section.
>
> Now I have R-3.5, but still get an error:
>
> v.class.mlR --overwrite training_map=Training_Ben2 at haarlooj_Ben_Test
> segments_file=C:\Users\haarlooj\Documents\CELOS\Stats_Training_Ben_test
> raster_segments_map=best_myregion1_at_haarlooj_Ben_Test_rank1 at haarlooj_Ben_Test
> train_class_column=code output_class_column=vote output_prob_column=prob
> classifiers=svmRadial,rf,C5.0 folds=5 partitions=10 tunelength=10
> weighting_modes=smv,qbwwv weighting_metric=accuracy
> classification_results=C:\Users\haarlooj\Documents\CELOS\v.class.mIRR_optional_output\Ben_test_Classifier-results
> accuracy_file=C:\Users\haarlooj\Documents\CELOS\v.class.mIRR_optional_output\Ben_test_Classifier-accuracy
> model_details=C:\Users\haarlooj\Documents\CELOS\v.class.mIRR_optional_output\Ben_test_Classifier-module-runs
> bw_plot_file=C:\Users\haarlooj\Documents\CELOS\v.class.mIRR_optional_output\Ben_test_Classifier-performance
> r_script_file=C:\Users\haarlooj\Documents\CELOS\v.class.mIRR_optional_output\Ben_test_R_script
> processes=3
[...]
> Error in eval(predvars, data, env) : object 'id' not found
This seems to be the relevant error, but I'm not sure I understand where
it comes from.
Could you provide us with the first 20 lines of
C:\Users\haarlooj\Documents\CELOS\Stats_Training_Ben_test
and the first 20 lines of the output of
v.db.select Training_Ben2 at haarlooj_Ben_Test
?
> Calls: data.frame ... predict.train -> model.frame ->
> model.frame.default -> eval -> eval
> Execution halted
> ERROR: There was an error in the execution of the R script.
> Please check the R output.
> Error in atexit._run_exitfuncs:
> Traceback (most recent call last):
> File "C:\Program Files\GRASS GIS
> 7.4.0\Python27\lib\atexit.py", line 24, in _run_exitfuncs
> func(*targs, **kargs)
> File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
> pts/v.class.mlR.py <http://v.class.mlR.py>", line 236, in cleanup
> gscript.try_remove(model_output_csv)
> NameError: global name 'model_output_csv' is not defined
> Error in sys.exitfunc:
> Traceback (most recent call last):
> File "C:\Program Files\GRASS GIS
> 7.4.0\Python27\lib\atexit.py", line 24, in _run_exitfuncs
> func(*targs, **kargs)
> File "C:\Users\haarlooj\AppData\Roaming\GRASS7\addons/scri
> pts/v.class.mlR.py <http://v.class.mlR.py>", line 236, in cleanup
> gscript.try_remove(model_output_csv)
> NameError: global name 'model_output_csv' is not defined
This last error should not be happening anymore since yesterday. Could
you reinstall using g.extension ?
Moritz
More information about the grass-user
mailing list