[GRASS-dev] RandomForest classifier for imagery groups add-on

Vaclav Petras wenzeslaus at gmail.com
Sat Mar 26 11:00:54 PDT 2016

On Sat, Mar 26, 2016 at 1:42 PM, Paulo van Breugel <p.vanbreugel at gmail.com>

> *2nd try - input random sample of 100 points, 1 (12) and 0 (88), with b
> flag*
> r.randomforest -b igroup=predictors at SampleSize roi=test2
> output=test2_output ntrees=500 mfeatures=-1 minsplit=2 randst=1 lines=100
> Group <predictors> references the following raster maps:
> Traceback (most recent call last):
>   File "/home/paulo/.grass7/addons/scripts/r.randomforest",
> line 335, in <module>
>     main()
>   File "/home/paulo/.grass7/addons/scripts/r.randomforest",
> line 243, in main
>     class_weight = "balanced", max_features = mfeatures,
> min_samples_split = minsplit, random_state = randst)
> TypeError: __init__() got an unexpected keyword argument
> 'class_weight'
> Removing raster <tmp_jNyNcqZa>

Of course, another great addition to the module code is a test suite [1].
The basic test can be on small random data and it may not event test the
correctness of result. It is enough when it just tests that the modules
does not fail and gives some results.

[1] https://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160326/277ede56/attachment.html>

More information about the grass-dev mailing list