NormalBayesClassifier.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class NormalBayesClassifier
  16. /**
  17. * Bayes classifier for normally distributed data.
  18. *
  19. * @see REF: ml_intro_bayes
  20. *
  21. * Member of `Ml`
  22. */
  23. CV_EXPORTS @interface NormalBayesClassifier : StatModel
  24. #ifdef __cplusplus
  25. @property(readonly)cv::Ptr<cv::ml::NormalBayesClassifier> nativePtrNormalBayesClassifier;
  26. #endif
  27. #ifdef __cplusplus
  28. - (instancetype)initWithNativePtr:(cv::Ptr<cv::ml::NormalBayesClassifier>)nativePtr;
  29. + (instancetype)fromNative:(cv::Ptr<cv::ml::NormalBayesClassifier>)nativePtr;
  30. #endif
  31. #pragma mark - Methods
  32. //
  33. // float cv::ml::NormalBayesClassifier::predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
  34. //
  35. /**
  36. * Predicts the response for sample(s).
  37. *
  38. * The method estimates the most probable classes for input vectors. Input vectors (one or more)
  39. * are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one
  40. * output vector outputs. The predicted class for a single input vector is returned by the method.
  41. * The vector outputProbs contains the output probabilities corresponding to each element of
  42. * result.
  43. */
  44. - (float)predictProb:(Mat*)inputs outputs:(Mat*)outputs outputProbs:(Mat*)outputProbs flags:(int)flags NS_SWIFT_NAME(predictProb(inputs:outputs:outputProbs:flags:));
  45. /**
  46. * Predicts the response for sample(s).
  47. *
  48. * The method estimates the most probable classes for input vectors. Input vectors (one or more)
  49. * are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one
  50. * output vector outputs. The predicted class for a single input vector is returned by the method.
  51. * The vector outputProbs contains the output probabilities corresponding to each element of
  52. * result.
  53. */
  54. - (float)predictProb:(Mat*)inputs outputs:(Mat*)outputs outputProbs:(Mat*)outputProbs NS_SWIFT_NAME(predictProb(inputs:outputs:outputProbs:));
  55. //
  56. // static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::create()
  57. //
  58. /**
  59. * Creates empty model
  60. * Use StatModel::train to train the model after creation.
  61. */
  62. + (NormalBayesClassifier*)create NS_SWIFT_NAME(create());
  63. //
  64. // static Ptr_NormalBayesClassifier cv::ml::NormalBayesClassifier::load(String filepath, String nodeName = String())
  65. //
  66. /**
  67. * Loads and creates a serialized NormalBayesClassifier from a file
  68. *
  69. * Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
  70. * Load the NormalBayesClassifier from this file again, by calling this function with the path to the file.
  71. * Optionally specify the node for the file containing the classifier
  72. *
  73. * @param filepath path to serialized NormalBayesClassifier
  74. * @param nodeName name of node containing the classifier
  75. */
  76. + (NormalBayesClassifier*)load:(NSString*)filepath nodeName:(NSString*)nodeName NS_SWIFT_NAME(load(filepath:nodeName:));
  77. /**
  78. * Loads and creates a serialized NormalBayesClassifier from a file
  79. *
  80. * Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
  81. * Load the NormalBayesClassifier from this file again, by calling this function with the path to the file.
  82. * Optionally specify the node for the file containing the classifier
  83. *
  84. * @param filepath path to serialized NormalBayesClassifier
  85. */
  86. + (NormalBayesClassifier*)load:(NSString*)filepath NS_SWIFT_NAME(load(filepath:));
  87. @end
  88. NS_ASSUME_NONNULL_END