DTrees.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/ml.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. #import "StatModel.h"
  13. @class Mat;
  14. // C++: enum DTreeFlags (cv.ml.DTrees.Flags)
  15. typedef NS_ENUM(int, DTreeFlags) {
  16. PREDICT_AUTO = 0,
  17. PREDICT_SUM = (1<<8),
  18. PREDICT_MAX_VOTE = (2<<8),
  19. PREDICT_MASK = (3<<8)
  20. };
  21. NS_ASSUME_NONNULL_BEGIN
  22. // C++: class DTrees
  23. /**
  24. * The class represents a single decision tree or a collection of decision trees.
  25. *
  26. * The current public interface of the class allows user to train only a single decision tree, however
  27. * the class is capable of storing multiple decision trees and using them for prediction (by summing
  28. * responses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost)
  29. * use this capability to implement decision tree ensembles.
  30. *
  31. * @see REF: ml_intro_trees
  32. *
  33. * Member of `Ml`
  34. */
  35. CV_EXPORTS @interface DTrees : StatModel
  36. #ifdef __cplusplus
  37. @property(readonly)cv::Ptr<cv::ml::DTrees> nativePtrDTrees;
  38. #endif
  39. #ifdef __cplusplus
  40. - (instancetype)initWithNativePtr:(cv::Ptr<cv::ml::DTrees>)nativePtr;
  41. + (instancetype)fromNative:(cv::Ptr<cv::ml::DTrees>)nativePtr;
  42. #endif
  43. #pragma mark - Methods
  44. //
  45. // int cv::ml::DTrees::getMaxCategories()
  46. //
  47. /**
  48. * @see `-setMaxCategories:`
  49. */
  50. - (int)getMaxCategories NS_SWIFT_NAME(getMaxCategories());
  51. //
  52. // void cv::ml::DTrees::setMaxCategories(int val)
  53. //
  54. /**
  55. * getMaxCategories @see `-getMaxCategories:`
  56. */
  57. - (void)setMaxCategories:(int)val NS_SWIFT_NAME(setMaxCategories(val:));
  58. //
  59. // int cv::ml::DTrees::getMaxDepth()
  60. //
  61. /**
  62. * @see `-setMaxDepth:`
  63. */
  64. - (int)getMaxDepth NS_SWIFT_NAME(getMaxDepth());
  65. //
  66. // void cv::ml::DTrees::setMaxDepth(int val)
  67. //
  68. /**
  69. * getMaxDepth @see `-getMaxDepth:`
  70. */
  71. - (void)setMaxDepth:(int)val NS_SWIFT_NAME(setMaxDepth(val:));
  72. //
  73. // int cv::ml::DTrees::getMinSampleCount()
  74. //
  75. /**
  76. * @see `-setMinSampleCount:`
  77. */
  78. - (int)getMinSampleCount NS_SWIFT_NAME(getMinSampleCount());
  79. //
  80. // void cv::ml::DTrees::setMinSampleCount(int val)
  81. //
  82. /**
  83. * getMinSampleCount @see `-getMinSampleCount:`
  84. */
  85. - (void)setMinSampleCount:(int)val NS_SWIFT_NAME(setMinSampleCount(val:));
  86. //
  87. // int cv::ml::DTrees::getCVFolds()
  88. //
  89. /**
  90. * @see `-setCVFolds:`
  91. */
  92. - (int)getCVFolds NS_SWIFT_NAME(getCVFolds());
  93. //
  94. // void cv::ml::DTrees::setCVFolds(int val)
  95. //
  96. /**
  97. * getCVFolds @see `-getCVFolds:`
  98. */
  99. - (void)setCVFolds:(int)val NS_SWIFT_NAME(setCVFolds(val:));
  100. //
  101. // bool cv::ml::DTrees::getUseSurrogates()
  102. //
  103. /**
  104. * @see `-setUseSurrogates:`
  105. */
  106. - (BOOL)getUseSurrogates NS_SWIFT_NAME(getUseSurrogates());
  107. //
  108. // void cv::ml::DTrees::setUseSurrogates(bool val)
  109. //
  110. /**
  111. * getUseSurrogates @see `-getUseSurrogates:`
  112. */
  113. - (void)setUseSurrogates:(BOOL)val NS_SWIFT_NAME(setUseSurrogates(val:));
  114. //
  115. // bool cv::ml::DTrees::getUse1SERule()
  116. //
  117. /**
  118. * @see `-setUse1SERule:`
  119. */
  120. - (BOOL)getUse1SERule NS_SWIFT_NAME(getUse1SERule());
  121. //
  122. // void cv::ml::DTrees::setUse1SERule(bool val)
  123. //
  124. /**
  125. * getUse1SERule @see `-getUse1SERule:`
  126. */
  127. - (void)setUse1SERule:(BOOL)val NS_SWIFT_NAME(setUse1SERule(val:));
  128. //
  129. // bool cv::ml::DTrees::getTruncatePrunedTree()
  130. //
  131. /**
  132. * @see `-setTruncatePrunedTree:`
  133. */
  134. - (BOOL)getTruncatePrunedTree NS_SWIFT_NAME(getTruncatePrunedTree());
  135. //
  136. // void cv::ml::DTrees::setTruncatePrunedTree(bool val)
  137. //
  138. /**
  139. * getTruncatePrunedTree @see `-getTruncatePrunedTree:`
  140. */
  141. - (void)setTruncatePrunedTree:(BOOL)val NS_SWIFT_NAME(setTruncatePrunedTree(val:));
  142. //
  143. // float cv::ml::DTrees::getRegressionAccuracy()
  144. //
  145. /**
  146. * @see `-setRegressionAccuracy:`
  147. */
  148. - (float)getRegressionAccuracy NS_SWIFT_NAME(getRegressionAccuracy());
  149. //
  150. // void cv::ml::DTrees::setRegressionAccuracy(float val)
  151. //
  152. /**
  153. * getRegressionAccuracy @see `-getRegressionAccuracy:`
  154. */
  155. - (void)setRegressionAccuracy:(float)val NS_SWIFT_NAME(setRegressionAccuracy(val:));
  156. //
  157. // Mat cv::ml::DTrees::getPriors()
  158. //
  159. /**
  160. * @see `-setPriors:`
  161. */
  162. - (Mat*)getPriors NS_SWIFT_NAME(getPriors());
  163. //
  164. // void cv::ml::DTrees::setPriors(Mat val)
  165. //
  166. /**
  167. * getPriors @see `-getPriors:`
  168. */
  169. - (void)setPriors:(Mat*)val NS_SWIFT_NAME(setPriors(val:));
  170. //
  171. // static Ptr_DTrees cv::ml::DTrees::create()
  172. //
  173. /**
  174. * Creates the empty model
  175. *
  176. * The static method creates empty decision tree with the specified parameters. It should be then
  177. * trained using train method (see StatModel::train). Alternatively, you can load the model from
  178. * file using Algorithm::load\<DTrees\>(filename).
  179. */
  180. + (DTrees*)create NS_SWIFT_NAME(create());
  181. //
  182. // static Ptr_DTrees cv::ml::DTrees::load(String filepath, String nodeName = String())
  183. //
  184. /**
  185. * Loads and creates a serialized DTrees from a file
  186. *
  187. * Use DTree::save to serialize and store an DTree to disk.
  188. * Load the DTree from this file again, by calling this function with the path to the file.
  189. * Optionally specify the node for the file containing the classifier
  190. *
  191. * @param filepath path to serialized DTree
  192. * @param nodeName name of node containing the classifier
  193. */
  194. + (DTrees*)load:(NSString*)filepath nodeName:(NSString*)nodeName NS_SWIFT_NAME(load(filepath:nodeName:));
  195. /**
  196. * Loads and creates a serialized DTrees from a file
  197. *
  198. * Use DTree::save to serialize and store an DTree to disk.
  199. * Load the DTree from this file again, by calling this function with the path to the file.
  200. * Optionally specify the node for the file containing the classifier
  201. *
  202. * @param filepath path to serialized DTree
  203. */
  204. + (DTrees*)load:(NSString*)filepath NS_SWIFT_NAME(load(filepath:));
  205. @end
  206. NS_ASSUME_NONNULL_END