MeLOn
Loading...
Searching...
No Matches
melon::ModelParser Class Referenceabstract

This class is a abstract parent class for model parser implemented in the MeLOn library. More...

#include <modelParser.h>

Inheritance diagram for melon::ModelParser:
melon::AnnParser melon::GpParser melon::MulfilGpParser melon::SvmParser melon::AnnParserCsv melon::AnnParserXml

Public Member Functions

virtual std::shared_ptr< ModelDataparse_model (const std::string modelPath, const std::string modelName="")=0
 Abstract function for defining the structure of the parsing function which is used to get the model data from a file.
 
virtual ~ModelParser ()=default
 Virtual desctructor to enable inheritance.
 

Protected Member Functions

std::string _format_file_path (const std::string modelPath, const std::string modelName, const MODEL_FILE_TYPE fileType)
 Applies the correct format to the path given by the user.
 
std::string _format_folder_path (const std::string modelPath)
 Applies the correct format to the path given by the user.
 

Static Protected Member Functions

static SCALER_TYPE _string_to_scaler_type (const std::string scalerTypeName)
 Turns a string containing the name of an scaler type in the correct enum representation.
 
static SCALER_PARAMETER _string_to_scaler_parameter (const std::string scalerParameterName)
 Turns a string containing the name of an scaler type in the correct enum representation.
 

Protected Attributes

std::string _modelPath
 
std::string _modelName
 

Detailed Description

This class is a abstract parent class for model parser implemented in the MeLOn library.

Constructor & Destructor Documentation

◆ ~ModelParser()

virtual melon::ModelParser::~ModelParser ( )
virtualdefault

Virtual desctructor to enable inheritance.

Member Function Documentation

◆ _format_file_path()

std::string ModelParser::_format_file_path ( const std::string modelPath,
const std::string modelName,
const MODEL_FILE_TYPE fileType )
protected

Applies the correct format to the path given by the user.

Parameters
[in]modelPathPath to the location of the model file
[in]modelNamename of the model
[in]fileTypetype of the file
Returns
returns string with correctly formatted filepath

◆ _format_folder_path()

std::string ModelParser::_format_folder_path ( const std::string modelPath)
protected

Applies the correct format to the path given by the user.

Parameters
[in]modelPathPath to the location of the model folder
Returns
returns string with correctly formatted filepath

◆ _string_to_scaler_parameter()

SCALER_PARAMETER ModelParser::_string_to_scaler_parameter ( const std::string scalerParameterName)
staticprotected

Turns a string containing the name of an scaler type in the correct enum representation.

Parameters
[in]scalerParameterNameis a string containing the name of the scaler parameter
Returns
returns the enum representation of the input

◆ _string_to_scaler_type()

SCALER_TYPE ModelParser::_string_to_scaler_type ( const std::string scalerTypeName)
staticprotected

Turns a string containing the name of an scaler type in the correct enum representation.

Parameters
[in]scalerTypeNameis a string containing the name of the scaler type
Returns
returns the enum representation of the input

◆ parse_model()

virtual std::shared_ptr< ModelData > melon::ModelParser::parse_model ( const std::string modelPath,
const std::string modelName = "" )
pure virtual

Abstract function for defining the structure of the parsing function which is used to get the model data from a file.

Parameters
[in]modelPathPath to the location of the model file
[in]modelNamename of the model
Returns
returns pointer to data object

Implemented in melon::AnnParserCsv, melon::AnnParserXml, melon::GpParser, melon::MulfilGpParser, melon::SvmParser, and melon::AnnParser.

Member Data Documentation

◆ _modelName

std::string melon::ModelParser::_modelName
protected

Name of the network

◆ _modelPath

std::string melon::ModelParser::_modelPath
protected

Path to the location of the ANN file


The documentation for this class was generated from the following files: