[GRASS-dev] r.randomforest built status

dr.stevenpawley at gmail.com dr.stevenpawley at gmail.com
Sun Dec 18 20:41:14 PST 2016


Thanks for this ā€“ I have made some major changes to r.randomforest recently, including adding options for spatial cross-validation. I will move the import of pandas to a lazy import because Iā€™m only using pandas as a convenient way of saving the cross-validation results to file.

Another question ā€“ r.randomforest is not really an appropriate name for the module anymore. I have been adding features over time, based on my own needs, but now it performs classification and regression using all of the major machine learning methods, with random forests just being one of them. 

Is there a correct protocol for me to rename the script to something like r.scikit.learn, or r.ml?

Steve

From: Vaclav Petras
Sent: Sunday, December 18, 2016 2:42 PM
To: Helmut Kudrnovsky
Cc: grass-dev at lists.osgeo.org
Subject: Re: [GRASS-dev] r.randomforest built status


On Sun, Dec 18, 2016 at 3:40 PM, Helmut Kudrnovsky <hellik at web.de> wrote:
>
> Is there any "best practice" example available?


I've done it in this way :

https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py#L151

accordingly an advice by Vaclav.

Maybe there are some other ways to do it.

Here is a example for more complicated case:

https://trac.osgeo.org/grass/changeset/66482/grass-addons/grass7/vector/v.class.ml
But I don't know what is best practice, perhaps as simple solution as possible - import in main() after parser() will work for most of the short modules and dependencies.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20161218/5d2a8e34/attachment.html>


More information about the grass-dev mailing list