Project
Public Member Functions | List of all members
ProfileInitializer Class Reference

Profile initializer heuristic. More...

#include <ProfileInitializer.h>

Public Member Functions

 ProfileInitializer (Config &config, AlternativesPerformance &altPerfs)
 
 ProfileInitializer (const ProfileInitializer &profInit)
 
 ~ProfileInitializer ()
 
AlternativesPerformance getAlternativesPerformance () const
 
void setAlternativesPerformance (AlternativesPerformance &newAltPerfs)
 
std::vector< float > categoryFrequency ()
 
std::vector< PerfgetProfilePerformanceCandidates (const Criterion &crit, const Category &cat, const int nbCategories)
 
float weightedProbability (const Perf perfAlt, const Criterion &crit, const Category &catAbove, const Category &catBelow, const int nbCategories, const std::vector< float > &catFrequency, std::vector< Perf > &candidates, float delta=0.001)
 
std::vector< PerfinitializeProfilePerformance (const Criterion &crit, Categories &categories, const std::vector< float > &catFre)
 
void initializeProfiles (MRSortModel &model)
 

Detailed Description

Profile initializer heuristic.

This class implements the profile initializer heuristic as described in the thesis. This algorithm is initialized with the dataset and can then be used to transform a model into an "initialized" one.

A complete description of the heuristic can be found in Profile Initialization.

Constructor & Destructor Documentation

◆ ProfileInitializer() [1/2]

ProfileInitializer::ProfileInitializer ( Config config,
AlternativesPerformance altPerfs 
)

ProfileInitializer standard constructor.

Parameters
altPerfsAlternativesPerformance objet that represents our dataset
configconfig setup for logging

◆ ProfileInitializer() [2/2]

ProfileInitializer::ProfileInitializer ( const ProfileInitializer profInit)

ProfileInitializer standard copy constructor.

Parameters
profInitProfileInitializer object
configconfig setup for logging

◆ ~ProfileInitializer()

ProfileInitializer::~ProfileInitializer ( )

ProfileInitializer standard deconstructor

Member Function Documentation

◆ categoryFrequency()

std::vector<float> ProfileInitializer::categoryFrequency ( )

Computes the frequency with which alternatives in the learning set are assigned to each category

Returns
vector of those frequency

◆ getAlternativesPerformance()

AlternativesPerformance ProfileInitializer::getAlternativesPerformance ( ) const

Getter of the alternativePerformance class attribute

Returns
AlternativesPerformance object

◆ getProfilePerformanceCandidates()

std::vector<Perf> ProfileInitializer::getProfilePerformanceCandidates ( const Criterion crit,
const Category cat,
const int  nbCategories 
)

Get ids of potential alternative candidates to initialize the profile performance for one specific criterion and category

Parameters
critCriterion object
catCategory object
nbCategoriesnumber of categories in our dataset
Returns
vector of alternative ids

◆ initializeProfilePerformance()

std::vector<Perf> ProfileInitializer::initializeProfilePerformance ( const Criterion crit,
Categories categories,
const std::vector< float > &  catFre 
)

Initialize all of the profile performance values for Criterion crit

Parameters
critCriterion object
categoriesCategories object
catFrequencycategory frequency of our dataset
Returns
initialized profile performances for Criterion crit

◆ initializeProfiles()

void ProfileInitializer::initializeProfiles ( MRSortModel model)

Updates profile attribute from MRSortModel class with the a new profile given by the metaheuristic.

Parameters
MRSortModelMrsort model object

◆ setAlternativesPerformance()

void ProfileInitializer::setAlternativesPerformance ( AlternativesPerformance newAltPerfs)

Setter of the alternativePerformance class attribute

Parameters
newAltPerfsAlternativesPerformance objet that represents our dataset

◆ weightedProbability()

float ProfileInitializer::weightedProbability ( const Perf  perfAlt,
const Criterion crit,
const Category catAbove,
const Category catBelow,
const int  nbCategories,
const std::vector< float > &  catFrequency,
std::vector< Perf > &  candidates,
float  delta = 0.001 
)

Compute the likelihood of choosing the performance of the alternative identified by its altId as the performance value for profile delimiting catAbove and catBelow for criterion crit.

Parameters
perfAltPerf object of an alternative
critCriterion object
catAboveCategory object category above imaginary profile performance (ie performance of altId)
catBelowCategory object category below imaginary profile performance (ie performance of altId)
nbCategoriesnumber of categories in our dataset
catFrequencycategory frequency of our dataset
candidatespotential candidates that were among our imaginary profile performance (ie performance of altId)
deltaarticifial integer used to compare each candidates with the imaginary profile performanc.
Returns
probability of choosing alt_id for crit.

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