|
Project
|
Third step of the heuristic, updates the profiles given fixed weight and lambda. More...
#include <ProfileUpdater.h>
Public Member Functions | |
| ProfileUpdater (Config &conf, AlternativesPerformance &altPerf_data, float epsilon=0.00001) | |
| ProfileUpdater (const ProfileUpdater &profUp) | |
| std::unordered_map< float, float > | computeAboveDesirability (MRSortModel &model, std::string critId, Perf &b, Perf &b_above, Category &cat, Category &cat_above, std::unordered_map< std::string, float > &ct_prof, AlternativesPerformance &altPerf_model) |
| std::unordered_map< float, float > | computeBelowDesirability (MRSortModel &model, std::string critId, Perf &b, Perf &b_below, Category &cat, Category &cat_above, std::unordered_map< std::string, float > &ct_prof, AlternativesPerformance &altPerf_model) |
| std::pair< float, float > | chooseMaxDesirability (std::unordered_map< float, float > &desirability, Perf &b) |
| void | updateTables (MRSortModel &model, std::string critId, Perf &b_old, Perf &b_new, std::unordered_map< std::string, std::unordered_map< std::string, float >> &ct, AlternativesPerformance &altPerf_model) |
| void | optimizeProfile (std::vector< Perf > &prof, Category &cat_below, Category &cat_above, MRSortModel &model, std::unordered_map< std::string, std::unordered_map< std::string, float >> &ct, AlternativesPerformance &altPerf_model) |
| void | optimize (MRSortModel &model, std::unordered_map< std::string, std::unordered_map< std::string, float >> &ct, AlternativesPerformance &altPerf_model) |
| void | updateProfiles (MRSortModel &model) |
Third step of the heuristic, updates the profiles given fixed weight and lambda.
Profile Updater algorithm is responsible for updating the profiles given the fixed weight and lambda. It will evaluate each move of each profile on each criterion to see what moves have the best impact on the alternatives assignments.
| ProfileUpdater::ProfileUpdater | ( | Config & | conf, |
| AlternativesPerformance & | altPerf_data, | ||
| float | epsilon = 0.00001 |
||
| ) |
ProfileUpdater standard constructor
| conf | conf setup for logging |
| altPerf_data | alternative perfomances dataset |
| epsilon |
| ProfileUpdater::ProfileUpdater | ( | const ProfileUpdater & | profUp | ) |
ProfileUpdater copy constructor
| profUp | ProfileUpdater to copy |
| std::pair<float, float> ProfileUpdater::chooseMaxDesirability | ( | std::unordered_map< float, float > & | desirability, |
| Perf & | b | ||
| ) |
chooseMaxDesirability chooses the move of the profiles that maximizes the desirability
| desirability | map of desirability |
| b | profile to move |
| std::unordered_map<float, float> ProfileUpdater::computeAboveDesirability | ( | MRSortModel & | model, |
| std::string | critId, | ||
| Perf & | b, | ||
| Perf & | b_above, | ||
| Category & | cat, | ||
| Category & | cat_above, | ||
| std::unordered_map< std::string, float > & | ct_prof, | ||
| AlternativesPerformance & | altPerf_model | ||
| ) |
computeAboveDesirability computes the desirability of a move for the profile b (move up)
| model | current model |
| critId | crit on which we want to evaluate the move |
| b | profile we want to move |
| b_above | profile above |
| cat | category delimited by the profile (below) |
| cat_above | above category delimited by the profile |
| ct_prof | concordance table of the profile |
| altPerf_model | alternativePerformance calculated with current model |
| std::unordered_map<float, float> ProfileUpdater::computeBelowDesirability | ( | MRSortModel & | model, |
| std::string | critId, | ||
| Perf & | b, | ||
| Perf & | b_below, | ||
| Category & | cat, | ||
| Category & | cat_above, | ||
| std::unordered_map< std::string, float > & | ct_prof, | ||
| AlternativesPerformance & | altPerf_model | ||
| ) |
computeBelowDesirability computes the desirability of a move for the profile b (move down)
| model | current model |
| critId | crit on which we want to evaluate the move |
| b | profile we want to move |
| b_below | profile below |
| cat | category delimited by the profile (below) |
| cat_above | above category delimited by the profile |
| ct_prof | concordance table of the profile |
| altPerf_model | alternativePerformance calculated with current model |
| void ProfileUpdater::optimize | ( | MRSortModel & | model, |
| std::unordered_map< std::string, std::unordered_map< std::string, float >> & | ct, | ||
| AlternativesPerformance & | altPerf_model | ||
| ) |
optimize Optimizes all the profiles using the profileUpdater methods.
| model | current model |
| ct | concordance table |
| altPerf_model | altPerf_model |
| void ProfileUpdater::optimizeProfile | ( | std::vector< Perf > & | prof, |
| Category & | cat_below, | ||
| Category & | cat_above, | ||
| MRSortModel & | model, | ||
| std::unordered_map< std::string, std::unordered_map< std::string, float >> & | ct, | ||
| AlternativesPerformance & | altPerf_model | ||
| ) |
optimizeProfile Optimizes one profile using the profileUpdater methods.
| prof | profile to optimize |
| cat_below | category delimited by the profile (below) |
| cat_above | category delimited by the profile (above) |
| model | current model |
| ct | concordance table |
| altPerf_model | altPerf_model |
| void ProfileUpdater::updateProfiles | ( | MRSortModel & | model | ) |
updateProfiles Updates the profiles of the model using the metaheuristic
| model | current model |
| void ProfileUpdater::updateTables | ( | MRSortModel & | model, |
| std::string | critId, | ||
| Perf & | b_old, | ||
| Perf & | b_new, | ||
| std::unordered_map< std::string, std::unordered_map< std::string, float >> & | ct, | ||
| AlternativesPerformance & | altPerf_model | ||
| ) |
updateTables updates model tables with new profile value
| model | |
| critId | criterion on which the profile moves |
| b_old | old profile perf |
| b_new | new profile perf |
| ct | concordance table to update |
| altPerf_model | alternativePerformance calculated with current model |