Class: OpenCV::Cv::Ml::Boost
- Inherits:
-
Object
- Object
- OpenCV::Cv::Ml::Boost
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Constants collapse
- DISCRETE =
0
- REAL =
1
- LOGIT =
2
- GENTLE =
3
Class Method Summary collapse
- .create ⇒ Cv::Ptr::Cv_Ml_Boost
- .load(filepath, node_name = Std::String.new()) ⇒ Cv::Ptr::Cv_Ml_Boost
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #calc_error(data, test, resp) ⇒ Float (also: #calcError)
- #cast_to_algorithm(parse_ownership) ⇒ Cv::Algorithm (also: #castToAlgorithm)
- #cast_to_stat_model(parse_ownership) ⇒ Cv::Ml::StatModel (also: #castToStatModel)
- #cast_tod_trees(parse_ownership) ⇒ Cv::Ml::DTrees (also: #castToDTrees)
- #clear ⇒ Void
- #empty ⇒ Bool
-
#get_boost_type ⇒ Fixnum
(also: #getBoostType)
methods.
- #get_default_name ⇒ Std::String (also: #getDefaultName)
- #get_max_categories ⇒ Fixnum (also: #getMaxCategories)
- #get_max_depth ⇒ Fixnum (also: #getMaxDepth)
- #get_min_sample_count ⇒ Fixnum (also: #getMinSampleCount)
- #get_priors ⇒ Cv::Mat (also: #getPriors)
- #get_regression_accuracy ⇒ Float (also: #getRegressionAccuracy)
- #get_truncate_pruned_tree ⇒ Bool (also: #getTruncatePrunedTree)
- #get_use1se_rule ⇒ Bool (also: #getUse1SERule)
- #get_use_surrogates ⇒ Bool (also: #getUseSurrogates)
- #get_var_count ⇒ Fixnum (also: #getVarCount)
- #get_weak_count ⇒ Fixnum (also: #getWeakCount)
- #get_weight_trim_rate ⇒ Double (also: #getWeightTrimRate)
- #getcv_folds ⇒ Fixnum (also: #getCVFolds)
- #is_classifier ⇒ Bool (also: #isClassifier)
- #is_trained ⇒ Bool (also: #isTrained)
- #predict(samples, results = Cv::Mat.new(), flags = 0) ⇒ Float
- #read(fn) ⇒ Void
- #save(filename) ⇒ Void
- #set_boost_type(val) ⇒ Void (also: #setBoostType)
- #set_max_categories(val) ⇒ Void (also: #setMaxCategories)
- #set_max_depth(val) ⇒ Void (also: #setMaxDepth)
- #set_min_sample_count(val) ⇒ Void (also: #setMinSampleCount)
- #set_priors(val) ⇒ Void (also: #setPriors)
- #set_regression_accuracy(val) ⇒ Void (also: #setRegressionAccuracy)
- #set_truncate_pruned_tree(val) ⇒ Void (also: #setTruncatePrunedTree)
- #set_use1se_rule(val) ⇒ Void (also: #setUse1SERule)
- #set_use_surrogates(val) ⇒ Void (also: #setUseSurrogates)
- #set_weak_count(val) ⇒ Void (also: #setWeakCount)
- #set_weight_trim_rate(val) ⇒ Void (also: #setWeightTrimRate)
- #setcv_folds(val) ⇒ Void (also: #setCVFolds)
-
#to_s ⇒ Object
converts Boost into a string by crawling through all its attributes.
- #train(*args) ⇒ Object
- #write(fs, name = Std::String.new()) ⇒ Void
Class Method Details
.create ⇒ Cv::Ptr::Cv_Ml_Boost
wrapper for static method const cv::Ptrcv::ml::Boost cv::ml::Boost::create()
50569 50570 50571 |
# File 'lib/ropencv/ropencv_types.rb', line 50569 def self.create() Rbind::cv_ml_boost_create() end |
.load(filepath, node_name = Std::String.new()) ⇒ Cv::Ptr::Cv_Ml_Boost
wrapper for static method const cv::Ptrcv::ml::Boost cv::ml::Boost::load(const std::string filepath, const std::string nodeName = String())
50577 50578 50579 |
# File 'lib/ropencv/ropencv_types.rb', line 50577 def self.load(filepath, node_name = Std::String.new()) Rbind::cv_ml_boost_load(filepath, node_name) end |
.new(*args) ⇒ Object
50430 50431 50432 50433 50434 50435 50436 50437 |
# File 'lib/ropencv/ropencv_types.rb', line 50430 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(BoostStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
50426 50427 50428 |
# File 'lib/ropencv/ropencv_types.rb', line 50426 def self.null new(BoostStruct.new) end |
Instance Method Details
#calc_error(data, test, resp) ⇒ Float Also known as: calcError
method wrapper for float cv::ml::Boost::calcError(const cv::Ptrcv::ml::TrainData data, bool test, cv::Mat& resp)
50847 50848 50849 50850 |
# File 'lib/ropencv/ropencv_types.rb', line 50847 def calc_error(data, test, resp) __validate_pointer__ Rbind::cv_ml_boost_calc_error( self, data, test, resp) end |
#cast_to_algorithm(parse_ownership) ⇒ Cv::Algorithm Also known as: castToAlgorithm
method wrapper for cv::Algorithm* cv::ml::Boost::castToAlgorithm(bool parse_ownership)
50866 50867 50868 50869 50870 50871 50872 50873 50874 |
# File 'lib/ropencv/ropencv_types.rb', line 50866 def cast_to_algorithm(parse_ownership) __validate_pointer__ result = Rbind::cv_ml_boost_cast_to_algorithm( self, parse_ownership) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#cast_to_stat_model(parse_ownership) ⇒ Cv::Ml::StatModel Also known as: castToStatModel
method wrapper for cv::ml::StatModel* cv::ml::Boost::castToStatModel(bool parse_ownership)
50756 50757 50758 50759 50760 50761 50762 50763 50764 |
# File 'lib/ropencv/ropencv_types.rb', line 50756 def cast_to_stat_model(parse_ownership) __validate_pointer__ result = Rbind::cv_ml_boost_cast_to_stat_model( self, parse_ownership) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#cast_tod_trees(parse_ownership) ⇒ Cv::Ml::DTrees Also known as: castToDTrees
method wrapper for cv::ml::DTrees* cv::ml::Boost::castToDTrees(bool parse_ownership)
50584 50585 50586 50587 50588 50589 50590 50591 50592 |
# File 'lib/ropencv/ropencv_types.rb', line 50584 def cast_tod_trees(parse_ownership) __validate_pointer__ result = Rbind::cv_ml_boost_cast_tod_trees( self, parse_ownership) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#clear ⇒ Void
method wrapper for void cv::ml::Boost::clear()
50879 50880 50881 50882 |
# File 'lib/ropencv/ropencv_types.rb', line 50879 def clear() __validate_pointer__ Rbind::cv_ml_boost_clear( self) end |
#empty ⇒ Bool
method wrapper for bool cv::ml::Boost::empty()
50777 50778 50779 50780 |
# File 'lib/ropencv/ropencv_types.rb', line 50777 def empty() __validate_pointer__ Rbind::cv_ml_boost_empty( self) end |
#get_boost_type ⇒ Fixnum Also known as: getBoostType
method wrapper for int cv::ml::Boost::getBoostType()
methods
50518 50519 50520 50521 |
# File 'lib/ropencv/ropencv_types.rb', line 50518 def get_boost_type() __validate_pointer__ Rbind::cv_ml_boost_get_boost_type( self) end |
#get_default_name ⇒ Std::String Also known as: getDefaultName
method wrapper for const std::string cv::ml::Boost::getDefaultName()
50911 50912 50913 50914 50915 50916 50917 50918 50919 |
# File 'lib/ropencv/ropencv_types.rb', line 50911 def get_default_name() __validate_pointer__ result = Rbind::cv_ml_boost_get_default_name( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#get_max_categories ⇒ Fixnum Also known as: getMaxCategories
method wrapper for int cv::ml::Boost::getMaxCategories()
50597 50598 50599 50600 |
# File 'lib/ropencv/ropencv_types.rb', line 50597 def get_max_categories() __validate_pointer__ Rbind::cv_ml_boost_get_max_categories( self) end |
#get_max_depth ⇒ Fixnum Also known as: getMaxDepth
method wrapper for int cv::ml::Boost::getMaxDepth()
50614 50615 50616 50617 |
# File 'lib/ropencv/ropencv_types.rb', line 50614 def get_max_depth() __validate_pointer__ Rbind::cv_ml_boost_get_max_depth( self) end |
#get_min_sample_count ⇒ Fixnum Also known as: getMinSampleCount
method wrapper for int cv::ml::Boost::getMinSampleCount()
50631 50632 50633 50634 |
# File 'lib/ropencv/ropencv_types.rb', line 50631 def get_min_sample_count() __validate_pointer__ Rbind::cv_ml_boost_get_min_sample_count( self) end |
#get_priors ⇒ Cv::Mat Also known as: getPriors
method wrapper for const cv::Mat cv::ml::Boost::getPriors()
50733 50734 50735 50736 50737 50738 50739 50740 50741 |
# File 'lib/ropencv/ropencv_types.rb', line 50733 def get_priors() __validate_pointer__ result = Rbind::cv_ml_boost_get_priors( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#get_regression_accuracy ⇒ Float Also known as: getRegressionAccuracy
method wrapper for float cv::ml::Boost::getRegressionAccuracy()
50716 50717 50718 50719 |
# File 'lib/ropencv/ropencv_types.rb', line 50716 def get_regression_accuracy() __validate_pointer__ Rbind::cv_ml_boost_get_regression_accuracy( self) end |
#get_truncate_pruned_tree ⇒ Bool Also known as: getTruncatePrunedTree
method wrapper for bool cv::ml::Boost::getTruncatePrunedTree()
50699 50700 50701 50702 |
# File 'lib/ropencv/ropencv_types.rb', line 50699 def get_truncate_pruned_tree() __validate_pointer__ Rbind::cv_ml_boost_get_truncate_pruned_tree( self) end |
#get_use1se_rule ⇒ Bool Also known as: getUse1SERule
method wrapper for bool cv::ml::Boost::getUse1SERule()
50682 50683 50684 50685 |
# File 'lib/ropencv/ropencv_types.rb', line 50682 def get_use1se_rule() __validate_pointer__ Rbind::cv_ml_boost_get_use1se_rule( self) end |
#get_use_surrogates ⇒ Bool Also known as: getUseSurrogates
method wrapper for bool cv::ml::Boost::getUseSurrogates()
50665 50666 50667 50668 |
# File 'lib/ropencv/ropencv_types.rb', line 50665 def get_use_surrogates() __validate_pointer__ Rbind::cv_ml_boost_get_use_surrogates( self) end |
#get_var_count ⇒ Fixnum Also known as: getVarCount
method wrapper for int cv::ml::Boost::getVarCount()
50769 50770 50771 50772 |
# File 'lib/ropencv/ropencv_types.rb', line 50769 def get_var_count() __validate_pointer__ Rbind::cv_ml_boost_get_var_count( self) end |
#get_weak_count ⇒ Fixnum Also known as: getWeakCount
method wrapper for int cv::ml::Boost::getWeakCount()
50535 50536 50537 50538 |
# File 'lib/ropencv/ropencv_types.rb', line 50535 def get_weak_count() __validate_pointer__ Rbind::cv_ml_boost_get_weak_count( self) end |
#get_weight_trim_rate ⇒ Double Also known as: getWeightTrimRate
method wrapper for double cv::ml::Boost::getWeightTrimRate()
50552 50553 50554 50555 |
# File 'lib/ropencv/ropencv_types.rb', line 50552 def get_weight_trim_rate() __validate_pointer__ Rbind::cv_ml_boost_get_weight_trim_rate( self) end |
#getcv_folds ⇒ Fixnum Also known as: getCVFolds
method wrapper for int cv::ml::Boost::getCVFolds()
50648 50649 50650 50651 |
# File 'lib/ropencv/ropencv_types.rb', line 50648 def getcv_folds() __validate_pointer__ Rbind::cv_ml_boost_getcv_folds( self) end |
#is_classifier ⇒ Bool Also known as: isClassifier
method wrapper for bool cv::ml::Boost::isClassifier()
50792 50793 50794 50795 |
# File 'lib/ropencv/ropencv_types.rb', line 50792 def is_classifier() __validate_pointer__ Rbind::cv_ml_boost_is_classifier( self) end |
#is_trained ⇒ Bool Also known as: isTrained
method wrapper for bool cv::ml::Boost::isTrained()
50784 50785 50786 50787 |
# File 'lib/ropencv/ropencv_types.rb', line 50784 def is_trained() __validate_pointer__ Rbind::cv_ml_boost_is_trained( self) end |
#predict(samples, results = Cv::Mat.new(), flags = 0) ⇒ Float
method wrapper for float cv::ml::Boost::predict(const cv::Mat samples, const cv::Mat results = Mat()/O, int flags = 0)
50858 50859 50860 50861 |
# File 'lib/ropencv/ropencv_types.rb', line 50858 def predict(samples, results = Cv::Mat.new(), flags = 0) __validate_pointer__ Rbind::cv_ml_boost_predict( self, samples, results, flags) end |
#read(fn) ⇒ Void
method wrapper for void cv::ml::Boost::read(const cv::FileNode fn)
50896 50897 50898 50899 |
# File 'lib/ropencv/ropencv_types.rb', line 50896 def read(fn) __validate_pointer__ Rbind::cv_ml_boost_read( self, fn) end |
#save(filename) ⇒ Void
method wrapper for void cv::ml::Boost::save(const std::string filename)
50904 50905 50906 50907 |
# File 'lib/ropencv/ropencv_types.rb', line 50904 def save(filename) __validate_pointer__ Rbind::cv_ml_boost_save( self, filename) end |
#set_boost_type(val) ⇒ Void Also known as: setBoostType
method wrapper for void cv::ml::Boost::setBoostType(int val)
50527 50528 50529 50530 |
# File 'lib/ropencv/ropencv_types.rb', line 50527 def set_boost_type(val) __validate_pointer__ Rbind::cv_ml_boost_set_boost_type( self, val) end |
#set_max_categories(val) ⇒ Void Also known as: setMaxCategories
method wrapper for void cv::ml::Boost::setMaxCategories(int val)
50606 50607 50608 50609 |
# File 'lib/ropencv/ropencv_types.rb', line 50606 def set_max_categories(val) __validate_pointer__ Rbind::cv_ml_boost_set_max_categories( self, val) end |
#set_max_depth(val) ⇒ Void Also known as: setMaxDepth
method wrapper for void cv::ml::Boost::setMaxDepth(int val)
50623 50624 50625 50626 |
# File 'lib/ropencv/ropencv_types.rb', line 50623 def set_max_depth(val) __validate_pointer__ Rbind::cv_ml_boost_set_max_depth( self, val) end |
#set_min_sample_count(val) ⇒ Void Also known as: setMinSampleCount
method wrapper for void cv::ml::Boost::setMinSampleCount(int val)
50640 50641 50642 50643 |
# File 'lib/ropencv/ropencv_types.rb', line 50640 def set_min_sample_count(val) __validate_pointer__ Rbind::cv_ml_boost_set_min_sample_count( self, val) end |
#set_priors(val) ⇒ Void Also known as: setPriors
method wrapper for void cv::ml::Boost::setPriors(const cv::Mat val)
50747 50748 50749 50750 |
# File 'lib/ropencv/ropencv_types.rb', line 50747 def set_priors(val) __validate_pointer__ Rbind::cv_ml_boost_set_priors( self, val) end |
#set_regression_accuracy(val) ⇒ Void Also known as: setRegressionAccuracy
method wrapper for void cv::ml::Boost::setRegressionAccuracy(float val)
50725 50726 50727 50728 |
# File 'lib/ropencv/ropencv_types.rb', line 50725 def set_regression_accuracy(val) __validate_pointer__ Rbind::cv_ml_boost_set_regression_accuracy( self, val) end |
#set_truncate_pruned_tree(val) ⇒ Void Also known as: setTruncatePrunedTree
method wrapper for void cv::ml::Boost::setTruncatePrunedTree(bool val)
50708 50709 50710 50711 |
# File 'lib/ropencv/ropencv_types.rb', line 50708 def set_truncate_pruned_tree(val) __validate_pointer__ Rbind::cv_ml_boost_set_truncate_pruned_tree( self, val) end |
#set_use1se_rule(val) ⇒ Void Also known as: setUse1SERule
method wrapper for void cv::ml::Boost::setUse1SERule(bool val)
50691 50692 50693 50694 |
# File 'lib/ropencv/ropencv_types.rb', line 50691 def set_use1se_rule(val) __validate_pointer__ Rbind::cv_ml_boost_set_use1se_rule( self, val) end |
#set_use_surrogates(val) ⇒ Void Also known as: setUseSurrogates
method wrapper for void cv::ml::Boost::setUseSurrogates(bool val)
50674 50675 50676 50677 |
# File 'lib/ropencv/ropencv_types.rb', line 50674 def set_use_surrogates(val) __validate_pointer__ Rbind::cv_ml_boost_set_use_surrogates( self, val) end |
#set_weak_count(val) ⇒ Void Also known as: setWeakCount
method wrapper for void cv::ml::Boost::setWeakCount(int val)
50544 50545 50546 50547 |
# File 'lib/ropencv/ropencv_types.rb', line 50544 def set_weak_count(val) __validate_pointer__ Rbind::cv_ml_boost_set_weak_count( self, val) end |
#set_weight_trim_rate(val) ⇒ Void Also known as: setWeightTrimRate
method wrapper for void cv::ml::Boost::setWeightTrimRate(double val)
50561 50562 50563 50564 |
# File 'lib/ropencv/ropencv_types.rb', line 50561 def set_weight_trim_rate(val) __validate_pointer__ Rbind::cv_ml_boost_set_weight_trim_rate( self, val) end |
#setcv_folds(val) ⇒ Void Also known as: setCVFolds
method wrapper for void cv::ml::Boost::setCVFolds(int val)
50657 50658 50659 50660 |
# File 'lib/ropencv/ropencv_types.rb', line 50657 def setcv_folds(val) __validate_pointer__ Rbind::cv_ml_boost_setcv_folds( self, val) end |
#to_s ⇒ Object
converts Boost into a string by crawling through all its attributes
50503 50504 50505 |
# File 'lib/ropencv/ropencv_types.rb', line 50503 def to_s "#<cv::ml::Boost >" end |
#train(train_data, flags = 0) ⇒ Bool #train(samples, layout, responses) ⇒ Bool
wrapper for overloaded method train
50809 50810 50811 50812 50813 50814 50815 50816 50817 50818 50819 50820 50821 50822 50823 50824 50825 50826 50827 50828 50829 50830 50831 50832 50833 50834 50835 50836 50837 50838 50839 50840 |
# File 'lib/ropencv/ropencv_types.rb', line 50809 def train(*args) __validate_pointer__ # overloaded method wrapper for bool cv::ml::Boost::train(const cv::Ptr<cv::ml::TrainData> trainData, int flags = 0) @@cv_ml_boost_train_defaults0 ||= [nil, 0] if(args.size >= 1 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_ml_boost_train_defaults0[i] end begin return Rbind::cv_ml_boost_train(self,*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for bool cv::ml::Boost::train(const cv::Mat samples, int layout, const cv::Mat responses) @@cv_ml_boost_train__2_defaults1 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_ml_boost_train__2_defaults1[i] end begin return Rbind::cv_ml_boost_train__2(self,*targs) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#write(fs, name = Std::String.new()) ⇒ Void
method wrapper for void cv::ml::Boost::write(const cv::Ptrcv::FileStorage fs, const std::string name = String())
50888 50889 50890 50891 |
# File 'lib/ropencv/ropencv_types.rb', line 50888 def write(fs, name = Std::String.new()) __validate_pointer__ Rbind::cv_ml_boost_write( self, fs, name) end |