-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
185 lines (145 loc) · 7.03 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# iosoi (*I*dentifier *O*f *S*olution *O*f *I*nterest)
<!-- badges: start -->
<!-- badges: end -->
`iosoi` is an [R](https://www.r-project.org) package that implements and extends
the multi-criteria decision making (MCDM) approach proposed in:
- Torres, M., Pelta, D. A., Lamata, M. T., & Yager, R. R. (2021).
An approach to identify solutions of interest from multi and many-objective
optimization problems. *Neural Computing & Applications, 33*(7), 2471–2481.
[doi:10.1007/s00521-020-05140-x](https://doi.org/10.1007/s00521-020-05140-x)
In addition to the interval-based approach proposed by Torres et al (2021), it
also includes volume-based methods for assessing the solutions. Formally,
`iosoi` automatizes the solution of the following MCDM problem:
Given a set of $m$ solutions (alternatives) with evaluations on $n$
criteria, and an order of preference among these criteria, the goal is to
**order the solutions according to their overall scores**. These overall
scores are obtained through the linear combination of the evaluations and the
weights of the criteria.
## Installation
You can install the development version of *iosoi* from
[GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("pnovoa/iosoi")
```
## Example 1: Interval-based approach
Consider a decision problem in which the objective is to identify a set of
solutions of interest based on their overall performance over a given set of
criteria. As input data we have a set of $m$ solutions (alternatives) and their
individual evaluations on each of the $n$ criteria. Intuitively, this
information can be arranged in the form of a matrix $E$ whose entries $e_{ij}$
correspond to the numerical evaluation that solution $i$ has in criterion $j$.
Additionally, we have an order of preference of the criteria by the decision
maker. Without loss of generality, it will be assumed that this order is
decreasing as a function of the order of the criteria in the matrix $E$.
That is, let $\lambda_j$ the $j$-th criterion, then
$\lambda_1 \succeq \lambda_2 ... \succeq \lambda_n$. Numerically, this
information can be translated into variables representing non-negative
weights associated with the criteria and with the additional condition of
adding up to $1$.
The following example is based on a problem of $5$ solutions, $3$ criteria and
evaluation matrix:
$$ E_{5 \times 3} =
\left(\begin{array}{cc}
5 & 2 & 3 \\
4 & 4 & 3 \\
1 & 1 & 5 \\
4 & 2 & 3 \\
4 & 3 & 2 \\
\end{array}\right)
$$
The preference order provided by the decision-maker is (as we mentioned before)
in decreasing order regarding the order followed by the criteria in matrix
$E_{ij}$.
Using the `iosoi` package, one can perform the steps of the Torres et al. (2021)
approach to obtain global assessments for the solutions and be able to select
those of greatest interest to the decision maker, that is, what we refer as
**solution of interest** (SOIs) . In what follows we will perform
this task using the interval-based approach by Torres et al. (2021).
Specifically, we rely on the *neutral* attitude for computing the superiority
degree of each solutions against the reference one. For both approaches we set
a threshold of $0$, which means that only those solutions with assessments
greater than $0$ will appear in the output.
```{r example1}
library(iosoi)
# Evaluation matrix
E <- matrix(data = c(5, 2, 3, 4, 4, 3, 1, 1, 5, 4, 2, 3, 4, 3, 2),
byrow = TRUE,
nrow = 5)
print(E)
# Identifying SOIs from the possibility approach of Torres et al (2021).
E %>% poss_identify_sois(by = "neutral", threshold = 0.0)
# Identifying SOIs from the geometric approach based on the volume
E %>% geom_identify_sois(by = "poss_volume", threshold = 0.0)
```
As noted, the output contains not only the original evaluation matrix, but also
other columns related to intermediate steps of the method of Torres et al (2021).
For instance, those columns with prefix `VE_` corresponds to the linear
scoring of each solution at the extreme points of the feasible region induced by
the preference order of the criteria. Columns `LB` and `UB` contain the lower
and upper bounds of the values obtained in the `VE_` columns. The *Boolean* column
`REF` identifies (with 1) the reference solution, that is, the one used to assess
the rest of solutions. Finally, the last column `neutral` contains the overall
assessment for each solution. Note that only those with values
greater than $0$ were included.
To understand why solution S3 is left out in the approach of Torres et al.
(2021) `iosoi` allows to plot the intervals (ranges of possible scores) of each
solution. That is, in order to visually check the degree of overlapping of
the solutions in relation to the reference one. The code then performs the
analysis again but relaxes the threshold to $-1$ to include all solutions in the
final output. In this way the intervals of all the solutions will be plotted.
```{r plots, out.width="70%", fig.align='center'}
E %>%
poss_identify_sois(
by = "neutral",
threshold = -1.0) %>%
plot_intervals()
```
As expected, `S3` is excluded because its interval is clearly far to the left
relative to `S2` (the reference solution highlighted with interval in red).
The rest, and especially `S1` have certain levels of overlap with `S2`.
# Example 2: Volume-based approach
The interval-based approach from Torres et al (2021) provides an intuitive way
of assessing the solutions. However, it underestimates how the scoring function
distributes over the region of feasible weights. Geometrically, it just
considers the line joining the two extreme points of the polyhedron
(ie. `LB` and `UB`) and hence, it does not take into account how *frequent* an
interval score value is in the region of feasible weights. So the comparison
against to the reference solution, is made on the basis that all scores within
the interval are *equally possible*, which is a very
```{r example2}
library(iosoi)
# Evaluation matrix
E <- matrix(data = c(5, 2, 3, 4, 4, 3, 1, 1, 5, 4, 2, 3, 4, 3, 2),
byrow = TRUE,
nrow = 5)
print(E)
# Identifying SOIs from the possibility approach of Torres et al (2021).
E %>% poss_identify_sois(by = "neutral", threshold = 0.0)
# Identifying SOIs from the geometric approach based on the volume
E %>% geom_identify_sois(by = "poss_volume", threshold = 0.0)
```
We can also plot any computed assessment indicator through a bar plot. For
example, if we consider `poss_volume`, the following code show how to plot
this indicator.
```{r plots2, out.width="70%", fig.align='center'}
E %>%
geom_identify_sois(by = "poss_volume",
threshold = 0.0) %>%
plot_assessment(by = "poss_volume",
plot_title = "Normalized volume",
ylabel = "Normalized volume"
)
```