Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
eddcfdcf
Commit
eddcfdcf
authored
11 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
DOC: update doxygen of MachineLearningModel
parent
67582651
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Learning/otbMachineLearningModel.h
+52
-6
52 additions, 6 deletions
Code/Learning/otbMachineLearningModel.h
with
52 additions
and
6 deletions
Code/Learning/otbMachineLearningModel.h
+
52
−
6
View file @
eddcfdcf
...
...
@@ -25,6 +25,40 @@
namespace
otb
{
/** \class MachineLearningModel
* \brief MachineLearningModel is the base class for all classifier objects (SVM, KNN,
* Random Forests, Artificial Neural Network, ...) implemented in the supervised classification framework of the OTB.
*
* MachineLearningModel is an abstract object that specifies behavior and
* interface of supervised classifiers (SVM, KNN, Random Forests, Artificial
* Neural Network, ...) in the generic supervised classification framework of the OTB.
* The main generic virtual methods specifically implemented in each classifier
* derived from the MachineLearningModel class are two learning-related methods:
* Train() and Save(), and two classification-related methods: Load() and Predict().
*
* Thus, each classifier derived from the MachineLearningModel class
* computes its corresponding model with Train() and exports it with
* the help of the Save() method.
*
* It is also possible to classify any input sample composed of several
* features (or any number of bands in the case of a pixel extracted
* from a multi-band image) with the help of the Predict() method which
* needs a previous loading of the classification model with the Load() method.
*
* \sa MachineLearningModelFactory
* \sa LibSVMMachineLearningModel
* \sa SVMMachineLearningModel
* \sa BoostMachineLearningModel
* \sa KNearestNeighborsMachineLearningModel
* \sa DecisionTreeMachineLearningModel
* \sa RandomForestsMachineLearningModel
* \sa GradientBoostedTreeMachineLearningModel
* \sa NormalBayesMachineLearningModel
* \sa NeuralNetworkMachineLearningModel
* \sa ImageClassificationFilter
*
*/
template
<
class
TInputValue
,
class
TTargetValue
>
class
ITK_EXPORT
MachineLearningModel
:
public
itk
::
Object
...
...
@@ -54,29 +88,41 @@ public:
/** Predict values using the model */
virtual
TargetSampleType
Predict
(
const
InputSampleType
&
input
)
const
=
0
;
/** Classify all samples in InputListSample and fill TargetListSample with the associated label */
void
PredictAll
();
/**\name Classification model file manipulation */
//@{
/** Save the model to file */
virtual
void
Save
(
const
std
::
string
&
filename
,
const
std
::
string
&
name
=
""
)
=
0
;
/** Load the model from file */
virtual
void
Load
(
const
std
::
string
&
filename
,
const
std
::
string
&
name
=
""
)
=
0
;
//@}
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
/**\name Classification model file compatibility tests */
//@{
/** Is the input model file readable and compatible with the corresponding classifier ? */
virtual
bool
CanReadFile
(
const
std
::
string
&
)
=
0
;
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
/** Is the input model file writable and compatible with the corresponding classifier ? */
virtual
bool
CanWriteFile
(
const
std
::
string
&
)
=
0
;
//@}
/** Input accessors */
/**\name Input list of samples accessors */
//@{
itkSetObjectMacro
(
InputListSample
,
InputListSampleType
);
itkGetObjectMacro
(
InputListSample
,
InputListSampleType
);
//@}
/** Target accessors */
/**\name Classification output accessors */
//@{
/** Set the target labels (to be used before training) */
itkSetObjectMacro
(
TargetListSample
,
TargetListSampleType
);
/** Get the target labels (to be used after PredictAll) */
itkGetObjectMacro
(
TargetListSample
,
TargetListSampleType
);
//@}
protected:
/** Constructor */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment