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@lists.osgeo.org
Subject: Re: [GRASS-dev] r.randomforest built status


On Sun, Dec 18, 2016 at 3:40 PM, Helmut Kudrnovsky <hel...@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.

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to