<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
    On 26-03-16 18:42, Paulo van Breugel wrote:<br>
    <blockquote cite="mid:56F6CA17.1040008@gmail.com" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div><br>
        </div>
        <b>2nd try - input random sample of 100 points, 1 (12) and 0
          (88), with b flag</b><br>
        r.randomforest -b igroup=predictors@SampleSize roi=test2
        output=test2_output ntrees=500 mfeatures=-1 minsplit=2 randst=1
        lines=100<br>
        Group <predictors> references the following raster maps:<br>
        Traceback (most recent call last):<br>
          File "/home/paulo/.grass7/addons/scripts/r.randomforest",<br>
        line 335, in <module><br>
            main()<br>
          File "/home/paulo/.grass7/addons/scripts/r.randomforest",<br>
        line 243, in main<br>
            class_weight = "balanced", max_features = mfeatures,<br>
        min_samples_split = minsplit, random_state = randst)<br>
        TypeError: __init__() got an unexpected keyword argument<br>
        'class_weight'<br>
        Removing raster <tmp_jNyNcqZa><br>
        <br>
        <br>
      </div>
    </blockquote>
    Hi Steven,<br>
    <br>
    I finally found out the above-mentioned problem. I was using an old
    version of the skikit package. In first instance I failed to realize
    this because I had actually upgraded it using:<br>
    <pre>sudo pip install --upgrade scikit-learn</pre>
    Just in case others encounter the same problem, the problem was that
    some point I must have installed it through the Synaps package
    manager (I am on Ubuntu), which is a old version. Apparently the
    version installed this way overrides the version installed via pip.
    Removing the package in Synaps package manager (one can of course
    use apt-get remove) resolved it.<br>
    <br>
    Cheers,<br>
    <br>
    Paulo<br>
    <br>
    <br>
  </body>
</html>