Evaluating Layouts

1. Feature Representation of Paintings

You want features that are:

  • measurable
  • computable
  • meaningful for layout decisions

Core Feature Vector (per painting)

Each painting becomes:

Painting p =
{
id
artist
year
period
theme
color_profile
brightness
visual_intensity
emotional_tone
size (width, height)
}

Suggested Feature Dimensions (Concrete)

1. Period (numeric or categorical)

period ∈ {Renaissance, Baroque, 1700s landscape, Impressionist, Modern, Abstract}

or numeric:

year ∈ [1500–2020]

2. Theme (categorical → one-hot or embedding)

theme ∈ {
landscape,
portrait,
child_portrait,
battle,
political,
religious,
abstract
}

3. Color / Brightness

brightness ∈ [0,1]
color_variance ∈ [0,1]
dominant_hue ∈ [0–360]

4. Visual Intensity (VERY IMPORTANT)

This is what your last examples were really about.

visual_intensity ∈ [0,1]

Examples:

  • calm landscape → 0.2
  • child portrait → 0.3
  • abstract explosion → 0.9
  • violent battle → 1.0

5. Emotional Tone

emotional_tone ∈ [-1, +1]
  • peaceful → +0.8
  • neutral → 0
  • dark / violent → -0.9

6. Size / Placement Constraints

width, height
aspect_ratio

7. Lighting Sensitivity (optional but powerful)

light_preference ∈ [0,1]
  • dark works → low light
  • bright abstracts → high light

2. Layout-Level Features

Now define features on a layout L


Adjacency

For paintings i and j:

adj(i, j) = 1 if near each other

Wall grouping

wall(p) = wall_id

Viewing order (optional)

sequence = ordered list of paintings

3. Evaluation Functions (THIS is the core of Week 2)

Now we define different philosophies of evaluation.


Evaluation Function 1 — Thematic Consistency

Encourage similar works to be grouped.

score_theme(L) =
Σ over adjacent pairs (i,j):
similarity(theme_i, theme_j)

Where:

similarity = 1 if same theme
= 0 otherwise

Evaluation Function 2 — Thematic Clash (your “bad layout” detector)

Penalize mismatches like:

  • battle next to child portrait
score_clash(L) =
- Σ adj(i,j) * clash(theme_i, theme_j)

Example:

clash(battle, child_portrait) = 1
clash(landscape, landscape) = 0

Evaluation Function 3 — Color Harmony

score_color(L) =
- Σ adj(i,j) * |brightness_i - brightness_j|

Encourages smooth transitions.


Evaluation Function 4 — Visual Flow

You want gradual change across a wall:

score_flow(L) =
- Σ |intensity_i - intensity_j|

Evaluation Function 5 — Intentional Contrast (advanced)

Now flip it:

Reward contrast instead of harmony.

score_contrast(L) =
Σ adj(i,j) * |intensity_i - intensity_j|

👉 This produces dramatic layouts


Evaluation Function 6 — Period Grouping

score_period(L) =
- Σ adj(i,j) * |year_i - year_j|

Evaluation Function 7 — Mixed (Realistic)

Combine everything:

score(L) =
+ w1 * score_theme(L)
- w2 * score_clash(L)
- w3 * color_difference(L)
- w4 * intensity_difference(L)
- w5 * period_difference(L)

Key Point

Change weights → change gallery

Example:

  • High w1 → tightly themed rooms
  • High contrast weight → chaotic / modern feel
  • High period weight → historical grouping

4. Use Your Images in Class

Take your last image (chaotic mix):

Consider:

👉 Which evaluation function would:

  • reject this?
  • reward this?

💡 5. Strong Assignment Extension

Next:

Step 1

Define your own feature set

Step 2

Define TWO evaluators:

  • one that likes the layout
  • one that hates it

Step 3

Explain why


Important Pushback (you should give them)

It easy too:

  • overcomplicate features
  • or stay too vague

Remember:

“If you can’t compute it, it’s not a feature.”


Bottom Line

The goal:

Representation → Evaluation → Optimization

This is the core abstraction of the entire course.

Scroll to Top