[GRASS-user] v.class.mlR Error

Helmut Kudrnovsky hellik at web.de
Thu May 31 13:14:39 PDT 2018


Moritz Lennert wrote
> On 31/05/18 14:25, Helmut Kudrnovsky wrote:
>> Helmut Kudrnovsky wrote
>>>> Yes, obviously. Sorry for that.
>>>
>>> no problem.
>>>
>>> patch applied:
>>>
>>> -------------
>>> v.class.mlR --verbose segments_map=lsat7_segs_stats
>>> training_map=training
>>> train_class_colum=class processes=3
>>> 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: '\g' is an unrecognized escape in character string starting
>>> "'D:\g"
>>>
>>> ------------
>>>
>>> Error: '\g' is an unrecognized escape in character string starting
>>> "'D:\g"
>>>
>>> there seems to be a path issue with shlashes
>> 
>> added a g.message about the temporary file:
>> 
>> v.class.mlR --verbose segments_map=lsat7_segs_stats training_map=training
>> train_class_colum=class processes=3
>> temporary file:
>> D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\10300.3.csv
>> 
>> AFAIR R in windows needs slashes, e.g.
>> 
>>> getwd()
>> [1] "C:/Users/myuser/Documents"
> 
> 
> Right.
> 
> Would replacing tempfile() with tempfile().replace('\\', '/') in line 
> 486 help ?
> 
> ISTR that there was a function for this somewhere, but can't find it in 
> a quick search.
> 
> Attached the again entire patch, but with the above change.

yes, looks good now:

-------------------------
v.class.mlR --verbose segments_map=lsat7_segs_stats training_map=training
train_class_colum=class processes=3
temporary file: D:/grassdata/nc_spm_08_grass7/user1/.tmp/unknown/13920.3.csv
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.
Finished running R.
Loading results into attribute table
(Thu May 31 22:12:30 2018) Command finished (2 min 45 sec) 
-------------------------  



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


More information about the grass-user mailing list