Professional Documents
Culture Documents
Goals
Terminology
Full factorial designs
m-factor ANOVA
Fractional factorial designs
Multi-factorial designs
Factor A
1 2 … j … a
1 … … … … … …
2 … … … … … …
Factor B
… … … … … … …
i … … … yijk … …
… … … … … … …
n replications
b … … … … … …
Degrees of freedom
df(SSA) = a – 1
df(SSB) = b – 1
df(SSAB) = (a – 1)(b – 1)
df(SSE) = ab(n – 1)
df(SST) = abn - 1
Copyright 2004 David J. Lilja 13
Two-Factor ANOVA
A B AB Error
Sum of squares SSA SSB SSAB SSE
Deg freedom a 1 b 1 (a 1)(b 1) ab(n 1)
Mean square sa2 SSA (a 1) sb2 SSB (b 1) sab 2
SSAB [( a 1)(b 1)] se2 SSE [ab(n 1)]
Computed F Fa sa2 se2 Fb sb2 se2 Fab sab 2
se2
Tabulated F F[1 ;( a 1),ab( n 1)] F[1 ;(b 1),ab( n 1)] F[1 ;( a 1)( b 1),ab( n 1)]
A B AB Error
Sum of squares 3.3714 0.5152 0.4317 0.0293
Deg freedom 3 2 6 12
Mean square 1.1238 0.2576 0.0720 0.0024
Computed F 460.2 105.5 29.5
Tabulated F F[ 0.95;3,12] 3.49 F[ 0.95; 2,12] 3.89 F[ 0.95;6,12] 3.00
A B AB Error
Sum of squares SSA SSB SSAB SSE
Deg freedom 1 1 1 2 m (n 1)
Mean square sa2 SSA 1 sb2 SSB 1 2
sab SSAB 1 se2 SSE [2 m (n 1)]
Computed F Fa sa2 se2 Fb sb2 se2 Fab sab 2
se2
Tabulated F F[1 ;1, 2m ( n 1)] F[1 ;1, 2m ( n 1)] F[1 ;1, 2m ( n 1)]
wA y AB y Ab yaB yab
wB y AB y Ab yaB yab
wAB y AB y Ab yaB yab
A B AB Error
Sum of squares SSA SSB SSAB SSE
Deg freedom 1 1 1 2 m (n 1)
Mean square sa2 SSA 1 sb2 SSB 1 2
sab SSAB 1 se2 SSE [2 m (n 1)]
Computed F Fa sa2 se2 Fb sb2 se2 Fab sab 2
se2
Tabulated F F[1 ;1, 2m ( n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-1 +1 2
4 +1 -1 -1 +1 +1 +1 -1 1
5 -1 +1 -1 -1 +1 +1 +1 9
6 +1 -1 +1 -1 -1 +1 +1 74
7 +1 +1 -1 +1 -1 -1 +1 7
8 -1 -1 -1 -1 -1 -1 -1 4
Effect 65 -45
1 +1 +1 +1 -1 +1 -1 -1 9
2 -1 +1 +1 +1 -1 +1 -1 11
3 -1 -1 +1 +1 +1 -1 +1 2
4 +1 -1 -1 +1 +1 +1 -1 1
5 -1 +1 -1 -1 +1 +1 +1 9
6 +1 -1 +1 -1 -1 +1 +1 74
7 +1 +1 -1 +1 -1 -1 +1 7
8 -1 -1 -1 -1 -1 -1 -1 4
Effect 65 -45 75 -75 -75 73 67
+1 +1 +1 -1 +1 -1 -1 9
-1 +1 +1 +1 -1 +1 -1 11
-1 -1 +1 +1 +1 -1 +1 2
+1 -1 -1 +1 +1 +1 -1 1
-1 +1 -1 -1 +1 +1 +1 9
+1 -1 +1 -1 -1 +1 +1 74
+1 +1 -1 +1 -1 -1 +1 7
-1 -1 -1 -1 -1 -1 -1 4
-1 -1 -1 +1 -1 +1 +1 17
+1 -1 -1 -1 +1 -1 +1 76
+1 +1 -1 -1 -1 +1 -1 6
-1 +1 +1 -1 -1 -1 +1 31
+1 -1 +1 +1 -1 -1 -1 19
-1 +1 -1 +1 +1 -1 -1 33
-1 -1 +1 -1 +1 +1 -1 6
+1 +1 +1 +1 +1 +1 +1 112
191 19 111 -13 79 55 239
Problem
So many parameters in a simulator
How to choose parameter values?
How to decide which parameters are most
important?
Approach
Choose reasonable upper/lower bounds.
Rank parameters by impact on total execution
time.
Copyright 2004 David J. Lilja 47
Simulation Environment
SimpleScalar simulator
sim-outorder 3.0
Selected SPEC 2000 Benchmarks
gzip, vpr, gcc, mesa, art, mcf, equake, parser, vortex,
bzip2, twolf
MinneSPEC Reduced Input Sets
Compiled with gcc (PISA) at O3
A B C D E F G
1 +1 +1 +1 -1 +1 -1 -1 9
2 -1 +1 +1 +1 -1 +1 -1
3 -1 -1 +1 +1 +1 -1 +1
… … … … … … … …
Effect
A B C D E F G
1 +1 +1 +1 -1 +1 -1 -1 9
2 -1 +1 +1 +1 -1 +1 -1
3 -1 -1 +1 +1 +1 -1 +1
… … … … … … … …
Effect 65
A 3 12 8
B 29 4 22
C 2 6 7
… … … …
A 3 12 8 7.67
B 29 4 22 18.3
C 2 6 7 5
… … … … …
Problem:
Performance analysis is typically limited to single
metrics
Speedup, power consumption, miss rate, etc.
Simple analysis
Discards a lot of good information
Param #2
Param #1
Copyright 2004 David J. Lilja 70
Similarity Metric
Euclidean Distance Between Points
D [( x1 y1 ) 2 ( x2 y2 ) 2 ( xn 1 yn 1 ) 2 ( xn yn ) 2 ]1/ 2
art 0 98.6
mcf 0