[GRASS-user] v.class.mlR Error

Jamille Haarloo j.r.haarloo at gmail.com
Fri Jun 1 11:26:23 PDT 2018


Hi Moritz and Helmut,

Great proactive energy. Highly appreciated!

For clarity, tomorrow I should install the v.class.mlR again and test it?
Should I also install the needed packages first in R as stated in one of
the messages?
I will not have access to the same computer this weekend, but I can try to
test on another station.

Best,
Jamille



On Fri, Jun 1, 2018 at 2:02 PM, Helmut Kudrnovsky <hellik at web.de> wrote:

> >I committed a patch in r72758 which now correctly applies the replace()
> >call to all tempfiles created. Please test.
>
> tested now with export to files:
>
> -------------------
> v.class.mlR -i segments_map=lsat7_segs_stats at user1
> training_map=training at user1 train_class_column=class
> output_class_column=vote1 output_prob_column=prob1 folds=5 partitions=10
> tunelength=10 weighting_metric=accuracy
> classification_results=D:\temp\vclassr\f1.txt
> accuracy_file=D:\temp\vclassr\f2.txt model_details=D:\temp\vclassr\f3.txt
> bw_plot_file=D:\temp\vclassr\bw.png
> r_script_file=D:\temp\vclassr\myRscript.R processes=4
> Running R now. Following output is R output.
> Loading required package: caret
> Loading required package: lattice
> Loading required package: ggplot2
> Loading required package: foreach
> Loading required package: iterators
> Loading required package: parallel
> Warning message:
> In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :
>   There were missing values in resampled performance measures.
> Error in file(file, ifelse(append, "a", "w")) :
>   cannot open the connection
> Calls: write.csv -> eval.parent -> eval -> eval -> write.table -> file
> In addition: Warning message:
> In file(file, ifelse(append, "a", "w")) :
>   cannot open file 'D:  emp classr 1.txt': Invalid argument
> 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:\OSGEO4~1\apps\Python27\lib\atexit.py", line 24,
> in _run_exitfuncs
>     func(*targs, **kargs)
>   File "C:\Users\hkmyr\AppData\Roaming\GRASS7\addons/scripts
> /v.class.mlR.py", line 237, in cleanup
>     gscript.try_remove(model_output_csvt)
> NameError: global name 'model_output_csvt' is not defined
> Error in sys.exitfunc:
> Traceback (most recent call last):
>   File "C:\OSGEO4~1\apps\Python27\lib\atexit.py", line 24,
> in _run_exitfuncs
>     func(*targs, **kargs)
>   File "C:\Users\hkmyr\AppData\Roaming\GRASS7\addons/scripts
> /v.class.mlR.py", line 237, in cleanup
>     gscript.try_remove(model_output_csvt)
> NameError: global name 'model_output_csvt' is not defined
> (Fri Jun 01 18:55:30 2018) Command finished (2 min 22 sec)
> ------------------
>
> it seems the path to the first file f1.txt can't be resolved.
>
> looking into myRscript.R
>
> ----
> write.csv(resultsdf, 'D:\temp\vclassr\f1.txt', row.names=FALSE,
> quote=FALSE)
> df_means <- data.frame(method=names(models.cv),accuracy=accuracy_means,
> kappa=kappa_means)
> write.csv(df_means, 'D:\temp\vclassr\f2.txt', row.names=FALSE, quote=FALSE)
> sink('D:\temp\vclassr\f3.txt')
> ----
>
> it seems also here is a / needed instead of \ within the path.
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180601/458497a1/attachment.html>


More information about the grass-user mailing list