|
Project
|
Datastructure of the model to learn. More...
#include <MRSortModel.h>

Public Member Functions | |
| MRSortModel (Criteria &criteria, Profiles &profiles, Categories &categories, float lambda, std::string id="model") | |
| MRSortModel (int n_cat, int n_crit, std::string id="model") | |
| MRSortModel (const MRSortModel &mrsort) | |
| std::string | getId () const |
| float | getScore () const |
| void | setScore (float score) |
| Category | categoryAssignment (std::vector< Perf > &alt, std::vector< std::vector< Perf >> &profiles_pt) |
| AlternativesPerformance | categoryAssignments (PerformanceTable &pt) |
| float | computeConcordance (std::vector< Perf > &prof, std::vector< Perf > &alt) |
| std::unordered_map< std::string, std::unordered_map< std::string, float > > | computeConcordanceTable (PerformanceTable &pt) |
Public Attributes | |
| Criteria | criteria |
| Profiles | profiles |
| float | lambda |
| Categories | categories |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const MRSortModel &mrsort) |
Datastructure of the model to learn.
The MRSortModel is the datastructure that represents a complete modelisation of the problem to learn. The state of a model is defined by lambda, a Criteria object and a Profile object. Lambda is a float representing the global threshold of the problem, the Profile object hold the values that defined the profiles delimiting all the categories, and Criteria holds the weights of each Criterion.
The model is the "atomic" object that we use in the metaheuristic, it is the datastructure running trough the different pipeline and modified by the learning algorithms.
The performance of the model is evaluated by running the ground truth dataset into the model and looking at the category assignment.
| MRSortModel::MRSortModel | ( | Criteria & | criteria, |
| Profiles & | profiles, | ||
| Categories & | categories, | ||
| float | lambda, | ||
| std::string | id = "model" |
||
| ) |
MRSortModel standard constructor
| criteria | Criteria object |
| profiles | Profiles containing the profiles |
| categories | Categories object used for the profiles |
| lambda | threshold |
| id | optional name of the model |
| MRSortModel::MRSortModel | ( | int | n_cat, |
| int | n_crit, | ||
| std::string | id = "model" |
||
| ) |
MRSortModel generator constructor. This constructor initializes the profiles, lambda and criteria weights at random.
| n_cat | number of categories |
| n_crit | number of criteria |
| id | mrsort model's id |
| MRSortModel::MRSortModel | ( | const MRSortModel & | mrsort | ) |
MRSortModel constructor by copy
| mrsort | MRSortModel object to copy |
| Category MRSortModel::categoryAssignment | ( | std::vector< Perf > & | alt, |
| std::vector< std::vector< Perf >> & | profiles_pt | ||
| ) |
categoryAssignment assign the category given the alternative and the current state of the model.
| alt | PerfVect of the alternative |
| profiles_pt | PerfTable of the profiles |
| AlternativesPerformance MRSortModel::categoryAssignments | ( | PerformanceTable & | pt | ) |
categoryAssignments assign the categories given the performance table and the current state of the model.
| pt | PerformanceTable |
computeConcordance computes the concordance value between a profile and an alternative
| prof | profile |
| alt | alternative |
| std::unordered_map<std::string, std::unordered_map<std::string, float> > MRSortModel::computeConcordanceTable | ( | PerformanceTable & | pt | ) |
computeConcordanceTable computes the concordance table of a performance table
| pt | PerformanceTable |
| std::string MRSortModel::getId | ( | ) | const |
getId getter of id parameter
| float MRSortModel::getScore | ( | ) | const |
getScore getter of score parameter
| void MRSortModel::setScore | ( | float | score | ) |
setScore setter of score parameter
| score | new score |