Merge remote-tracking branch 'upstream/3.4' into merge-3.4
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 5 Sep 2020 18:53:51 +0000 (18:53 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 5 Sep 2020 19:37:38 +0000 (19:37 +0000)
1  2 
modules/dnn/src/layers/permute_layer.cpp
modules/dnn/src/onnx/onnx_importer.cpp
modules/dnn/test/test_layers.cpp
modules/ml/include/opencv2/ml.hpp
modules/ml/src/rtrees.cpp

Simple merge
@@@ -1292,8 -1292,17 +1292,17 @@@ public
          @param results Array where the result of the calculation will be written.
          @param flags Flags for defining the type of RTrees.
      */
 -    CV_WRAP void getVotes(InputArray samples, OutputArray results, int flags) const;
 +    CV_WRAP virtual void getVotes(InputArray samples, OutputArray results, int flags) const = 0;
  
 -#if CV_VERSION_MAJOR == 3
 -    CV_WRAP double getOOBError() const;
+     /** Returns the OOB error value, computed at the training stage when calcOOBError is set to true.
+      * If this flag was set to false, 0 is returned. The OOB error is also scaled by sample weighting.
+      */
++#if CV_VERSION_MAJOR == 4
++    CV_WRAP virtual double getOOBError() const { return 0; }
+ #else
+     /*CV_WRAP*/ virtual double getOOBError() const = 0;
+ #endif
      /** Creates the empty model.
      Use StatModel::train to train the model, StatModel::train to create and train the model,
      Algorithm::load to load the pre-trained model.
@@@ -500,6 -510,12 +505,8 @@@ public
      const vector<Node>& getNodes() const CV_OVERRIDE { return impl.getNodes(); }
      const vector<Split>& getSplits() const CV_OVERRIDE { return impl.getSplits(); }
      const vector<int>& getSubsets() const CV_OVERRIDE { return impl.getSubsets(); }
 -#if CV_VERSION_MAJOR == 3
 -    double getOOBError_() const { return impl.getOOBError(); }
 -#else
+     double getOOBError() const CV_OVERRIDE { return impl.getOOBError(); }
 -#endif
  
      DTreesImplForRTrees impl;
  };