Download Software Modelling and Architecture: Exercises
Transcript
Software Modelling and Architecture
Exercises
L. Liberti
E
L
1. ∆(γid
, γjδ
) ≤ ε;
E
L
2. ∆(γid
, γjδ
)=
min
L
h≤n,b∈Dh
E
L
∆(γid
, γhb
);
E
L
E
L
we denote the matching by M (γid
, γjδ
) = 1 and a mismatch by M (γid
, γjδ
) = 0. If two matching
clusterings satisfy the first condition, it is a close match. The second condition is a “catch-all” condition
which ensures that we can match each early indicator clustering to at least one late indicator clustering.
Given two matching clusterings γud , γvδ , we must now find indices h ≤ Kud and k ≤ Kvδ such that
γudh and γvδk are “as close as possible”. We extend the dissimilarity definition ∆ to clusters as follows:
X
(ũ(p) − ṽ(p))2 + |γudh △γvδk |,
∆(γudh , γvδk ) = (d˜ − δ̃)2 +
p∈γudh ∩γvδk
where A△B = (A ∪ B) r (A ∩ B) is the symmetric difference of two sets A, B. This definition is justified
by the fact that the difference in normalized indicator value for a project p in γudh △γvδk is simply the
diameter of the corresponding normalized interval [0, 1], namely 1, and that 12 = 1. With this extended
definition, we can compute ∆(γudh , γvδk ) for each possible pair (h, k) and determine a pair of closest
clusters. We denote the set of clusters γvδk in γvδ closest to a given cluster γudh by Γ(γudh , γvδ ).
6.3.4.1.4 The foreground process The data transformation model of the foreground process is
as follows: we are given a new project π; we select an early indicator viE , compute w = viE (π), select a
E
E
meaningful distance d ∈ DiE , find the corresponding clustering γid
and the cluster γidk
such that w ∈ Iidk .
E
L
L
L
, γjδ
) = 1, and
We then find a late indicator clustering γjδ (where j ≤ n and δ ∈ Dj ) such that M (γid
L
E
L
the corresponding closest clusters γjδh ∈ Γ(γidk , γjδ ). The formal data flow description of the foreground
process is:
input
IWF
CLDB
CLS
→
E
(π, viE , d) −→ (γid
,
E
γidk
: viE (π) ∈ Iidk ) −→
→
E
L
L
E
L
O = {(j, δ, h) | M (γid
, γjδ
) = 1 ∧ γjδh
∈ Γ(γidk
, γjδ
))} −→
→
L
∀(j, δ, h) ∈ O output projects in γjδh
OWF
The required data structures are:
• project (p, class): contains project attributes as defined in the T-Sale DB;
• cluster (list of projects);
• clustering (γ: list of clusters);
• indicator (v, class): contains
–
–
–
–
–
methods to retrieve the indicator value given a project
list of clustering distances D (floating point numbers)
extremal values v̄, v (floating point numbers)
list of clusterings γvd for this indicator, relative to all distances d ∈ D
methods to scale the indicator values and distances in D to the interval [0, 1]
• foreground process (class): contains
– list of early indicators (viE | i ≤ m);
– list of late indicators (vjL | j ≤ n);
– matching information (M , array of booleans indexed on i ≤ m, d ∈ DiE , j ≤ n, δ ∈ DjL );
– matching cluster information (Γ, maps clusters γidk for varying k ≤ Kid to list of matching
clusters (γjδh ) for varying h ∈ {1, . . . , Kjδ }).
CHAPTER 6. A SEARCH ENGINE FOR PROJECTS
81