evo_spotis.stochastic_algorithms.de
Module Contents
Classes
- class evo_spotis.stochastic_algorithms.de.DE_algorithm(var_min=sys.float_info.epsilon, var_max=1.0, max_it=200, n_pop=60, beta_min=0.2, beta_max=0.8, p_CR=0.4)[source]
- __call__(X_train, y_train, types, bounds, verbose=True)[source]
Determine criteria weights using DE algorithm with the goal (fitness) function using SPOTIS method and Spearman rank coefficient
- Parameters
X_train (ndarray) – Decision matrix containing training dataset of alternatives and their performances corresponding to the criteria
y_train (ndarray) – Ranking of training decision matrix which is the targer variable
types (ndarray) – Criteria types. Profit criteria are represented by 1 and cost by -1.
bounds (ndarray) – Bounds contain minimum and maximum values of each criterion. Minimum and maximum cannot be the same.
verbose (bool) – For True verbose value, which is default, information about Best Fitness value in each iteration will be displayed and for False value, it will not
- Returns
ndarray – Values of best solution representing criteria weights
ndarray – Best values of fitness function in each iteration required for visualization of fitness function.
ndarray – Mean values of fitness function in each iteration required for visualization of fitness function.
Examples
>>> de_algorithm = DE_algorithm() >>> weights, BestFitness, MeanFitness = de_algorithm(X_train, y_train, types, bounds)