CVB++ 14.0
PredictorFactoryBase Class Reference

Base class for classifier factory classes. More...

#include <cvb/polimago/predictor_factory_base.hpp>

Inherited by PredictorFactoryBaseEx, and SearchPredictorFactory.

Public Member Functions

double Lambda () const noexcept
 Gets the regularization value to be used for generating the object. More...
 
void SetLambda (double lambda)
 Sets the regularization value to be used for generating the object. Possible values range from 0 to 10, good starting values for experiments are usually around 0.01. More...
 
String Preprocessing () const
 Get preprocessing code with which the object is to be generated. More...
 
void SetPreprocessing (const String &code)
 Set preprocessing code with which the object is to be generated. More...
 

Static Public Member Functions

static ValueRange< double > LambdaRange ()
 Acceptable scale factor range for search classifier training.
 
static ValueRange< int > FeatureResolutionRange ()
 Valid range of feature resolution value.
 
static constexpr std::array< char, 4 > PreprocessingValidCharacters ()
 Characters that a preprocessing string may contain.
 
static String FormatPreprocessingCode (const String &input)
 Correct a preprocessing code to make sure that no invalid characters are in the code and the code does not exceed the maximum length. More...
 

Static Public Attributes

static constexpr double LambdaDefault = 0.1
 Default value for lambda.
 
static constexpr int FeatureResolutionDefault = 1
 Default value for feature resolution.
 
static constexpr int PreprocessingMaxLength = 15
 Maximum length of a preprocessing code (excluding the terminating zero).
 

Detailed Description

Base class for classifier factory classes.

Member Function Documentation

◆ FormatPreprocessingCode()

static String FormatPreprocessingCode ( const String input)
inlinestatic

Correct a preprocessing code to make sure that no invalid characters are in the code and the code does not exceed the maximum length.

Parameters
[in]inputString to be corrected.
Returns
Corrected string.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Lambda()

double Lambda ( ) const
inlinenoexcept

Gets the regularization value to be used for generating the object.

Returns
The lambda value.
Exceptions
Doesnot throw any exception.

◆ Preprocessing()

String Preprocessing ( ) const
inline

Get preprocessing code with which the object is to be generated.

Returns
The preprocessing code.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetLambda()

void SetLambda ( double  lambda)
inline

Sets the regularization value to be used for generating the object. Possible values range from 0 to 10, good starting values for experiments are usually around 0.01.

Parameters
[in]lambdaThe lambda value.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetPreprocessing()

void SetPreprocessing ( const String code)
inline

Set preprocessing code with which the object is to be generated.

Parameters
[in]codeThe preprocessing code.
Exceptions
Anyexception derived from std::exception including CvbException.