<div dir="ltr">Hello Moritz,<div><br></div><div>This time I asked a vector to be created with the stats and used this to extract training polygons in QGIS and imported the training map in GRASS. </div><div>I had to do some interventions regarding the column names to make sure they are the same except for the class.</div><div>I still get an error, and the only thing I could trace is the fact that values are missing in some rows  for both vectors. I am not sure if I should correct this/ retry it all.</div><div><br></div><div>This is the command output:</div><div><br></div><div><div>(Fri Jun 08 15:48:28 2018)                                                      </div><div>v.class.mlR -i --overwrite segments_map=Segments_vector_Stats_Ben_test@haarlooj_Ben_Test training_map=Training_Ben5@haarlooj_Ben_Test raster_segments_map=best5_myregion1_at_haarlooj_Ben_Test_rank1@haarlooj_Ben_Test train_class_column=Ecosystem 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</div><div>Running R now. Following output is R output.</div><div>During startup - Warning messages:</div><div>1: Setting LC_CTYPE=en_US.cp1252 failed </div><div>2: Setting LC_COLLATE=en_US.cp1252 failed </div><div>3: Setting LC_TIME=en_US.cp1252 failed </div><div>4: Setting LC_MONETARY=en_US.cp1252 failed </div><div>Loading required package: caret</div><div>Loading required package: lattice</div><div>Loading required package: ggplot2</div><div>Loading required package: foreach</div><div>Loading required package: iterators</div><div>Loading required package: parallel</div><div>During startup - Warning messages:</div><div>1: Setting LC_CTYPE=en_US.cp1252 failed </div><div>2: Setting LC_COLLATE=en_US.cp1252 failed </div><div>3: Setting LC_TIME=en_US.cp1252 failed </div><div>4: Setting LC_MONETARY=en_US.cp1252 failed </div><div>During startup - Warning messages:</div><div>1: Setting LC_CTYPE=en_US.cp1252 failed </div><div>2: Setting LC_COLLATE=en_US.cp1252 failed </div><div>3: Setting LC_TIME=en_US.cp1252 failed </div><div>4: Setting LC_MONETARY=en_US.cp1252 failed </div><div>During startup - Warning messages:</div><div>1: Setting LC_CTYPE=en_US.cp1252 failed </div><div>2: Setting LC_COLLATE=en_US.cp1252 failed </div><div>3: Setting LC_TIME=en_US.cp1252 failed </div><div>4: Setting LC_MONETARY=en_US.cp1252 failed </div><div>Warning message:</div><div>In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :</div><div>  There were missing values in resampled performance measures.</div><div>Error in `$<-.data.frame`(`*tmp*`, vote_qbwwv, value = numeric(0)) : </div><div>  replacement has 0 rows, data has 1965</div><div>Calls: $<- -> $<-.data.frame</div><div>Execution halted</div><div>ERROR: There was an error in the execution of the R script.</div><div>Please check the R output.</div><div>(Fri Jun 08 15:49:32 2018) Command finished (1 min 4 sec)                       </div></div><div><br></div><div><br></div><div>Best,</div><div>Jamille</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 7, 2018 at 11:09 AM, Jamille Haarloo <span dir="ltr"><<a href="mailto:j.r.haarloo@gmail.com" target="_blank">j.r.haarloo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Moritz,</div><div><br></div>No worries. Thankful these modules are made available for newbies in RS like me and also happy these interactions are possible for learning. <div>Hope to get back soon after some adjustments. </div><div><br></div><div>Best,</div><div>Jamille</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 7, 2018 at 10:44 AM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks<span><br>
<br>
On 07/06/18 15:17, Jamille Haarloo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The first 20+ lines of Stats_Training_Ben_test:<br>
<br>
cat,area,perimeter,compact_cir<wbr>cle,compact_square,fd,WV_Benat<wbr>imofo_1_min,WV_Benatimofo_1_ma<wbr>x,WV_Benatimofo_1_range,WV_Ben<wbr>atimofo_1_mean,WV_Benatimofo_<wbr>1_stddev,WV_Benatimofo_1_varia<wbr>nce,WV_Benatimofo_1_coeff_var,<wbr>WV_Benatimofo_1_sum,WV_<wbr>Benatimofo_1_first_quart,WV_<wbr>Benatimofo_1_median,WV_Benatim<wbr>ofo_1_third_quart,WV_Benatimof<wbr>o_2_min,WV_Benatimofo_2_max,<wbr>WV_Benatimofo_2_range,WV_Benat<wbr>imofo_2_mean,WV_Benatimofo_2_<wbr>stddev,WV_Benatimofo_2_varianc<wbr>e,WV_Benatimofo_2_coeff_var,<wbr>WV_Benatimofo_2_sum,WV_<wbr>Benatimofo_2_first_quart,WV_<wbr>Benatimofo_2_median,WV_Benatim<wbr>ofo_2_third_quart,WV_Benatimof<wbr>o_3_min,WV_Benatimofo_3_max,<wbr>WV_Benatimofo_3_range,WV_Benat<wbr>imofo_3_mean,WV_Benatimofo_3_<wbr>stddev,WV_Benatimofo_3_varianc<wbr>e,WV_Benatimofo_3_coeff_var,<wbr>WV_Benatimofo_3_sum,WV_<wbr>Benatimofo_3_first_quart,WV_<wbr>Benatimofo_3_median,WV_Benatim<wbr>ofo_3_third_quart,WV_Benatimof<wbr>o_4_min,WV_Benatimofo_4_max,<wbr>WV_Benatimofo_4_range,WV_Benat<wbr>imofo_4_mean,WV_Benatimofo_4_<wbr>stddev,WV_Benatimofo_4_varianc<wbr>e,WV_Benatimofo_4_coeff_var,<wbr>WV_Benatimofo_4_sum,WV_<wbr>Benatimofo_4_first_quart,WV_<wbr>Benatimofo_4_median,WV_Benatim<wbr>ofo_4_third_quart<br>
1144,3832.000000,1256.000000,5<wbr>.723635,0.197144,1.729624,13,7<wbr>6,63,46.4097077244259,9.984549<wbr>11351384,99.69122100017,21.513<wbr>9237092391,177842,40,47,53,40,<wbr>138,98,90.2687891440501,15.250<wbr>0825418009,232.565017531741,<wbr>16.8940812061464,345910,81,92,<wbr>100,15,61,46,40.8582985386221,<wbr>7.82663897784868,61.2562776895<wbr>802,19.1555675536767,156569,<wbr>36,42,47,28,124,96,68.42536534<wbr>44676,13.5774536655369,184.<wbr>347248039801,19.8427200164517,<wbr>262206,59,68,77<br>
1145,12092.000000,2282.000000,<wbr>5.854120,0.192750,1.645226,13,<wbr>94,81,51.386288455177,10.52943<wbr>76761475,110.869057775874,20.4<wbr>907534532914,621363,45,52,59,2<wbr>1,220,199,114.230731061859,23.<wbr>3590328249442,545.644414516822<wbr>,20.4489917973953,1381278,101,<wbr>114,128,7,76,69,46.42193185577<wbr>24,8.42747122371732,71.<wbr>0222712265835,18.1540726264915<wbr>,561334,42,48,52,17,198,181,<wbr>97.2732385047966,22.4923135692<wbr>47,505.904169697333,23.<wbr>1228176577445,1176228,84,97,<wbr>110<br>
<br>
</blockquote></span>
[...]<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---------------------<br>
All the lines of the output of v.db.select Training_Ben2@haarlooj_Ben_Tes<wbr>t:<br>
<br>
cat|id|Type|code<br>
1|4|B29|18<br>
2|5|B31|19<br>
3|3|B28|17<br>
</blockquote>
<br>
<br></span>
Again a lack of clear documentation on my side: both the training and the segment info should contain the same attributes, with only additional one column ('code' in your case) present in the training data.<br>
<br>
It should be possible to do this differently, i.e. provide the module with the features of all segments, and only the id/cat of each training segment with the relevant class and have the module merge the two, but this is not implemented, yet.<br>
<br>
I also just notice that you have the word 'Training' in both names.<br>
<br>
The segment_file/segment_map contains the info (cat + all feature variables) of all segments you wish to classify, either in the form of a csv file or in the form of a vector map with the info in the attribute table.<br>
<br>
The training_file/training_map contains the info (cat + all feature variables + class) of the training data. Often this is an extract of the former, but not necessarily.<br>
<br>
All columns in the training file have to be present in the segment file, except for the class column (your 'code').<br>
<br>
Sorry for the lack of docs. This module has mostly been used internally here and so we are not always aware of the unclear and missing parts. Having your feedback has been very useful !<span class="m_3337839953709565139HOEnZb"><font color="#888888"><br>
<br>
Moritz<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>