|
OpenCV 2.4.4 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.ml.CvStatModel
public class CvStatModel
Base class for statistical models in ML.
class CvStatModel
// C++ code:
public:
/ * CvStatModel(); * /
/ * CvStatModel(const Mat& train_data...); * /
virtual ~CvStatModel();
virtual void clear()=0;
/ * virtual bool train(const Mat& train_data, [int tflag,]..., const
Mat& responses,...,
[const Mat& var_idx,]..., [const Mat& sample_idx,]...
[const Mat& var_type,]..., [const Mat& missing_mask,]
/ * virtual float predict(const Mat& sample...) const=0; * /
virtual void save(const char* filename, const char* name=0)=0;
virtual void load(const char* filename, const char* name=0)=0;
virtual void write(CvFileStorage* storage, const char* name)=0;
virtual void read(CvFileStorage* storage, CvFileNode* node)=0;
};
In this declaration, some methods are commented off. These are methods for which there is no unified API (with the exception of the default constructor). However, there are many similarities in the syntax and semantics that are briefly described below in this section, as if they are part of the base class.
Method Summary | |
---|---|
void |
load(java.lang.String filename)
Loads the model from a file. |
void |
load(java.lang.String filename,
java.lang.String name)
Loads the model from a file. |
void |
save(java.lang.String filename)
Saves the model to a file. |
void |
save(java.lang.String filename,
java.lang.String name)
Saves the model to a file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void load(java.lang.String filename)
Loads the model from a file.
The method load
loads the complete model state with the
specified name (or default model-dependent name) from the specified XML or
YAML file. The previous model state is cleared by "CvStatModel.clear".
filename
- a filenamepublic void load(java.lang.String filename, java.lang.String name)
Loads the model from a file.
The method load
loads the complete model state with the
specified name (or default model-dependent name) from the specified XML or
YAML file. The previous model state is cleared by "CvStatModel.clear".
filename
- a filenamename
- a namepublic void save(java.lang.String filename)
Saves the model to a file.
The method save
saves the complete model state to the specified
XML or YAML file with the specified name or default name (which depends on a
particular class). *Data persistence* functionality from CxCore
is used.
filename
- a filenamepublic void save(java.lang.String filename, java.lang.String name)
Saves the model to a file.
The method save
saves the complete model state to the specified
XML or YAML file with the specified name or default name (which depends on a
particular class). *Data persistence* functionality from CxCore
is used.
filename
- a filenamename
- a name
|
OpenCV 2.4.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |