Skip to content

Personas ​

pkg/internal/mock/persona is the four shoppers the traffic is generated for, each a taste vector over the catalog's dimensions. Here they are, as the tests see them: each one's taste, favourite in every category, and ranking of the whole catalog.

Shown by TestExhibit in pkg/internal/mock/persona: the four shoppers the traffic is generated for, each a taste vector, chosen so that each one's favourite is a different product. Each picks from the first 6 positions of a listing what scores at least 80% of its favourite there (how a persona chooses).

Tastes

Each persona's taste vector, the occasion it browses (its strongest occasion dimension), and its favourite in every category. Fashion and home share some dimensions and not others: the home-only ones (cozy, natural, industrial) come from the personas' own vectors, the shared ones carry over from what they wear.

Kate

Kate

50 year old conservative lawyer · browses business

modern
-1.00
classic
+0.99
business
+0.90
structured
+0.80
cozy
+0.50
edgy
-0.50
retro
+0.30

favourite per category — the overall top match outlined

Whitehall Sheath DressWhitehall Sheath DressDresses · 2.35
Temple Pleated TrousersTemple Pleated TrousersTrousers · 2.64
Fireside Knit CushionFireside Knit CushionCushions · 1.54
Archive Brass Table LampArchive Brass Table LampLamps · 2.02
Canton Ginger JarCanton Ginger JarVases · 1.71
Sofia

Sofia

28 year old event host with a taste for glamour · browses festive

festive
+0.95
romantic
+0.90
opulent
+0.85
feminine
+0.80
bold
+0.70
minimalistic
-0.70
colourful
+0.50

favourite per category — the overall top match outlined

Odette Tulle BallgownOdette Tulle BallgownDresses · 4.73
Glitterball Sequin FlaresGlitterball Sequin FlaresTrousers · 3.22
Boudoir Velvet CushionBoudoir Velvet CushionCushions · 1.99
Versailles Crystal LampVersailles Crystal LampLamps · 1.96
Carnevale Murano VaseCarnevale Murano VaseVases · 2.02
Lena

Lena

34 year old designer who dresses down and hates fuss · browses casual

casual
+0.90
opulent
-0.90
minimalistic
+0.80
natural
+0.80
modern
+0.60
bohemian
+0.50
edgy
+0.40

favourite per category — the overall top match outlined

Sunday Tee DressSunday Tee DressDresses · 2.11
Haven JoggersHaven JoggersTrousers · 2.64
Driftwood Linen CushionDriftwood Linen CushionCushions · 1.81
Bali Rattan Floor LampBali Rattan Floor LampLamps · 1.36
Kiln Stoneware VaseKiln Stoneware VaseVases · 1.61
Mira

Mira

41 year old architect, business wear but strictly contemporary · browses business

modern
+0.90
industrial
+0.80
minimalistic
+0.75
business
+0.70
edgy
+0.70
classic
-0.60
structured
+0.60

favourite per category — the overall top match outlined

Monolith Column DressMonolith Column DressDresses · 2.85
Grid Cigarette TrousersGrid Cigarette TrousersTrousers · 3.37
Cloud Bouclé CushionCloud Bouclé CushionCushions · 0.61
Halden Concrete PendantHalden Concrete PendantLamps · 3.10
Obsidian Glass VaseObsidian Glass VaseVases · 2.10

Rankings

The whole catalog, both departments, ordered by each persona's score: its taste against each product's attractor, in the product's own category's weights. The front of each row should look like the persona, the back like its opposite.

KateKate
Temple Pleated Trousers1. Temple Pleated Trousers2.64
Ledger Suit Trousers2. Ledger Suit Trousers2.42
Windsor Check Trousers3. Windsor Check Trousers2.41
Whitehall Sheath Dress4. Whitehall Sheath Dress2.35
Chancery Pencil Dress5. Chancery Pencil Dress2.29
Margot Shift Dress6. Margot Shift Dress2.08
Archive Brass Table Lamp7. Archive Brass Table Lamp2.02
Canton Ginger Jar8. Canton Ginger Jar1.71
Carter Belted Shirt Dress9. Carter Belted Shirt Dress1.62
Fireside Knit Cushion10. Fireside Knit Cushion1.54
Laurel Wrap Dress11. Laurel Wrap Dress1.47
Riviera Wide-Leg Trousers12. Riviera Wide-Leg Trousers1.25
Posy Embroidered Cushion13. Posy Embroidered Cushion0.89
Mile Straight Jeans14. Mile Straight Jeans0.86
Medici Brocade Trousers15. Medici Brocade Trousers0.86
Primrose Tea Dress16. Primrose Tea Dress0.81
Atrium Wide-Leg Trousers17. Atrium Wide-Leg Trousers0.74
Boudoir Velvet Cushion18. Boudoir Velvet Cushion0.72
Grove Ceramic Table Lamp19. Grove Ceramic Table Lamp0.66
Odette Tulle Ballgown20. Odette Tulle Ballgown0.56
Harbour Shirt Dress21. Harbour Shirt Dress0.52
Coupe Fluted Vase22. Coupe Fluted Vase0.51
Versailles Crystal Lamp23. Versailles Crystal Lamp0.48
Belvedere Velvet Gown24. Belvedere Velvet Gown0.46
Cloud Bouclé Cushion25. Cloud Bouclé Cushion0.46
Canyon Corduroy Trousers26. Canyon Corduroy Trousers0.45
Juniper Satin Dress27. Juniper Satin Dress0.37
Palermo Velvet Palazzo28. Palermo Velvet Palazzo0.28
Driftwood Linen Cushion29. Driftwood Linen Cushion0.25
Bali Rattan Floor Lamp30. Bali Rattan Floor Lamp0.20
Lola Velvet Flares31. Lola Velvet Flares0.20
Sienna Terracotta Vase32. Sienna Terracotta Vase0.17
Glitterball Sequin Flares33. Glitterball Sequin Flares0.17
Grid Cigarette Trousers34. Grid Cigarette Trousers0.14
Rowan Pinafore Dress35. Rowan Pinafore Dress0.11
Carnevale Murano Vase36. Carnevale Murano Vase0.10
Monolith Column Dress37. Monolith Column Dress0.09
Soirée Tuxedo Trousers38. Soirée Tuxedo Trousers0.02
Starlet Sequin Dress39. Starlet Sequin Dress0.00
Meadow Smock Dress40. Meadow Smock Dress0.00
Flamingo Feather Mini41. Flamingo Feather Mini0.00
Dune Linen Trousers42. Dune Linen Trousers0.00
Kiln Stoneware Vase43. Kiln Stoneware Vase-0.14
Fenna Knit Dress44. Fenna Knit Dress-0.19
Field Cargo Trousers45. Field Cargo Trousers-0.23
Zigzag Print Cushion46. Zigzag Print Cushion-0.32
Sunday Tee Dress47. Sunday Tee Dress-0.66
Haven Joggers48. Haven Joggers-0.79
Lune Slip Dress49. Lune Slip Dress-0.80
Gala Cigarette Trousers50. Gala Cigarette Trousers-0.83
Sprint Track Pants51. Sprint Track Pants-0.85
Obsidian Glass Vase52. Obsidian Glass Vase-1.06
Meridian Arc Floor Lamp53. Meridian Arc Floor Lamp-1.14
Halden Concrete Pendant54. Halden Concrete Pendant-1.68
SofiaSofia
Odette Tulle Ballgown1. Odette Tulle Ballgown4.73
Starlet Sequin Dress2. Starlet Sequin Dress3.92
Flamingo Feather Mini3. Flamingo Feather Mini3.89
Belvedere Velvet Gown4. Belvedere Velvet Gown3.64
Glitterball Sequin Flares5. Glitterball Sequin Flares3.22
Palermo Velvet Palazzo6. Palermo Velvet Palazzo3.07
Juniper Satin Dress7. Juniper Satin Dress2.80
Lola Velvet Flares8. Lola Velvet Flares2.78
Medici Brocade Trousers9. Medici Brocade Trousers2.08
Carnevale Murano Vase10. Carnevale Murano Vase2.02
Boudoir Velvet Cushion11. Boudoir Velvet Cushion1.99
Primrose Tea Dress12. Primrose Tea Dress1.98
Versailles Crystal Lamp13. Versailles Crystal Lamp1.96
Lune Slip Dress14. Lune Slip Dress1.52
Laurel Wrap Dress15. Laurel Wrap Dress1.25
Posy Embroidered Cushion16. Posy Embroidered Cushion0.96
Coupe Fluted Vase17. Coupe Fluted Vase0.87
Zigzag Print Cushion18. Zigzag Print Cushion0.83
Riviera Wide-Leg Trousers19. Riviera Wide-Leg Trousers0.72
Gala Cigarette Trousers20. Gala Cigarette Trousers0.63
Soirée Tuxedo Trousers21. Soirée Tuxedo Trousers0.49
Windsor Check Trousers22. Windsor Check Trousers0.27
Archive Brass Table Lamp23. Archive Brass Table Lamp0.27
Meadow Smock Dress24. Meadow Smock Dress0.26
Canton Ginger Jar25. Canton Ginger Jar0.20
Field Cargo Trousers26. Field Cargo Trousers0.20
Chancery Pencil Dress27. Chancery Pencil Dress0.20
Rowan Pinafore Dress28. Rowan Pinafore Dress0.13
Dune Linen Trousers29. Dune Linen Trousers0.06
Fireside Knit Cushion30. Fireside Knit Cushion0.00
Bali Rattan Floor Lamp31. Bali Rattan Floor Lamp0.00
Sienna Terracotta Vase32. Sienna Terracotta Vase0.00
Canyon Corduroy Trousers33. Canyon Corduroy Trousers0.00
Whitehall Sheath Dress34. Whitehall Sheath Dress-0.13
Monolith Column Dress35. Monolith Column Dress-0.20
Ledger Suit Trousers36. Ledger Suit Trousers-0.20
Grove Ceramic Table Lamp37. Grove Ceramic Table Lamp-0.21
Meridian Arc Floor Lamp38. Meridian Arc Floor Lamp-0.25
Carter Belted Shirt Dress39. Carter Belted Shirt Dress-0.26
Temple Pleated Trousers40. Temple Pleated Trousers-0.26
Harbour Shirt Dress41. Harbour Shirt Dress-0.28
Mile Straight Jeans42. Mile Straight Jeans-0.33
Cloud Bouclé Cushion43. Cloud Bouclé Cushion-0.36
Margot Shift Dress44. Margot Shift Dress-0.39
Atrium Wide-Leg Trousers45. Atrium Wide-Leg Trousers-0.40
Fenna Knit Dress46. Fenna Knit Dress-0.46
Kiln Stoneware Vase47. Kiln Stoneware Vase-0.51
Halden Concrete Pendant48. Halden Concrete Pendant-0.52
Sprint Track Pants49. Sprint Track Pants-0.53
Driftwood Linen Cushion50. Driftwood Linen Cushion-0.54
Sunday Tee Dress51. Sunday Tee Dress-0.56
Grid Cigarette Trousers52. Grid Cigarette Trousers-0.56
Obsidian Glass Vase53. Obsidian Glass Vase-0.58
Haven Joggers54. Haven Joggers-0.96
LenaLena
Haven Joggers1. Haven Joggers2.64
Sprint Track Pants2. Sprint Track Pants2.16
Sunday Tee Dress3. Sunday Tee Dress2.11
Driftwood Linen Cushion4. Driftwood Linen Cushion1.81
Fenna Knit Dress5. Fenna Knit Dress1.74
Meadow Smock Dress6. Meadow Smock Dress1.68
Dune Linen Trousers7. Dune Linen Trousers1.62
Kiln Stoneware Vase8. Kiln Stoneware Vase1.61
Grid Cigarette Trousers9. Grid Cigarette Trousers1.47
Harbour Shirt Dress10. Harbour Shirt Dress1.44
Monolith Column Dress11. Monolith Column Dress1.41
Field Cargo Trousers12. Field Cargo Trousers1.38
Mile Straight Jeans13. Mile Straight Jeans1.37
Bali Rattan Floor Lamp14. Bali Rattan Floor Lamp1.36
Halden Concrete Pendant15. Halden Concrete Pendant1.36
Obsidian Glass Vase16. Obsidian Glass Vase1.34
Sienna Terracotta Vase17. Sienna Terracotta Vase1.22
Meridian Arc Floor Lamp18. Meridian Arc Floor Lamp1.19
Canyon Corduroy Trousers19. Canyon Corduroy Trousers1.17
Rowan Pinafore Dress20. Rowan Pinafore Dress1.08
Soirée Tuxedo Trousers21. Soirée Tuxedo Trousers1.00
Atrium Wide-Leg Trousers22. Atrium Wide-Leg Trousers0.98
Gala Cigarette Trousers23. Gala Cigarette Trousers0.98
Grove Ceramic Table Lamp24. Grove Ceramic Table Lamp0.97
Lune Slip Dress25. Lune Slip Dress0.96
Cloud Bouclé Cushion26. Cloud Bouclé Cushion0.91
Primrose Tea Dress27. Primrose Tea Dress0.85
Carter Belted Shirt Dress28. Carter Belted Shirt Dress0.63
Fireside Knit Cushion29. Fireside Knit Cushion0.46
Margot Shift Dress30. Margot Shift Dress0.45
Whitehall Sheath Dress31. Whitehall Sheath Dress0.37
Temple Pleated Trousers32. Temple Pleated Trousers0.30
Zigzag Print Cushion33. Zigzag Print Cushion0.30
Ledger Suit Trousers34. Ledger Suit Trousers0.23
Laurel Wrap Dress35. Laurel Wrap Dress0.00
Chancery Pencil Dress36. Chancery Pencil Dress0.00
Posy Embroidered Cushion37. Posy Embroidered Cushion0.00
Riviera Wide-Leg Trousers38. Riviera Wide-Leg Trousers0.00
Windsor Check Trousers39. Windsor Check Trousers0.00
Canton Ginger Jar40. Canton Ginger Jar-0.37
Juniper Satin Dress41. Juniper Satin Dress-0.42
Coupe Fluted Vase42. Coupe Fluted Vase-0.45
Medici Brocade Trousers43. Medici Brocade Trousers-0.59
Lola Velvet Flares44. Lola Velvet Flares-0.64
Archive Brass Table Lamp45. Archive Brass Table Lamp-0.65
Palermo Velvet Palazzo46. Palermo Velvet Palazzo-0.68
Belvedere Velvet Gown47. Belvedere Velvet Gown-0.72
Carnevale Murano Vase48. Carnevale Murano Vase-0.86
Flamingo Feather Mini49. Flamingo Feather Mini-1.04
Boudoir Velvet Cushion50. Boudoir Velvet Cushion-1.13
Versailles Crystal Lamp51. Versailles Crystal Lamp-1.24
Glitterball Sequin Flares52. Glitterball Sequin Flares-1.25
Starlet Sequin Dress53. Starlet Sequin Dress-1.36
Odette Tulle Ballgown54. Odette Tulle Ballgown-1.48
MiraMira
Grid Cigarette Trousers1. Grid Cigarette Trousers3.37
Halden Concrete Pendant2. Halden Concrete Pendant3.10
Monolith Column Dress3. Monolith Column Dress2.85
Atrium Wide-Leg Trousers4. Atrium Wide-Leg Trousers2.46
Meridian Arc Floor Lamp5. Meridian Arc Floor Lamp2.26
Obsidian Glass Vase6. Obsidian Glass Vase2.10
Soirée Tuxedo Trousers7. Soirée Tuxedo Trousers1.69
Sprint Track Pants8. Sprint Track Pants1.47
Haven Joggers9. Haven Joggers1.43
Sunday Tee Dress10. Sunday Tee Dress1.28
Gala Cigarette Trousers11. Gala Cigarette Trousers1.26
Lune Slip Dress12. Lune Slip Dress1.21
Temple Pleated Trousers13. Temple Pleated Trousers1.19
Field Cargo Trousers14. Field Cargo Trousers1.18
Whitehall Sheath Dress15. Whitehall Sheath Dress1.07
Ledger Suit Trousers16. Ledger Suit Trousers1.04
Margot Shift Dress17. Margot Shift Dress1.02
Windsor Check Trousers18. Windsor Check Trousers0.78
Carter Belted Shirt Dress19. Carter Belted Shirt Dress0.77
Kiln Stoneware Vase20. Kiln Stoneware Vase0.73
Fenna Knit Dress21. Fenna Knit Dress0.72
Chancery Pencil Dress22. Chancery Pencil Dress0.68
Cloud Bouclé Cushion23. Cloud Bouclé Cushion0.61
Driftwood Linen Cushion24. Driftwood Linen Cushion0.58
Zigzag Print Cushion25. Zigzag Print Cushion0.47
Harbour Shirt Dress26. Harbour Shirt Dress0.43
Rowan Pinafore Dress27. Rowan Pinafore Dress0.40
Mile Straight Jeans28. Mile Straight Jeans0.37
Meadow Smock Dress29. Meadow Smock Dress0.35
Laurel Wrap Dress30. Laurel Wrap Dress0.32
Riviera Wide-Leg Trousers31. Riviera Wide-Leg Trousers0.29
Dune Linen Trousers32. Dune Linen Trousers0.28
Medici Brocade Trousers33. Medici Brocade Trousers0.20
Grove Ceramic Table Lamp34. Grove Ceramic Table Lamp0.01
Bali Rattan Floor Lamp35. Bali Rattan Floor Lamp0.00
Sienna Terracotta Vase36. Sienna Terracotta Vase0.00
Lola Velvet Flares37. Lola Velvet Flares0.00
Palermo Velvet Palazzo38. Palermo Velvet Palazzo-0.17
Canyon Corduroy Trousers39. Canyon Corduroy Trousers-0.17
Juniper Satin Dress40. Juniper Satin Dress-0.23
Posy Embroidered Cushion41. Posy Embroidered Cushion-0.25
Belvedere Velvet Gown42. Belvedere Velvet Gown-0.28
Coupe Fluted Vase43. Coupe Fluted Vase-0.31
Primrose Tea Dress44. Primrose Tea Dress-0.34
Carnevale Murano Vase45. Carnevale Murano Vase-0.39
Flamingo Feather Mini46. Flamingo Feather Mini-0.42
Fireside Knit Cushion47. Fireside Knit Cushion-0.43
Glitterball Sequin Flares48. Glitterball Sequin Flares-0.50
Starlet Sequin Dress49. Starlet Sequin Dress-0.56
Boudoir Velvet Cushion50. Boudoir Velvet Cushion-0.65
Versailles Crystal Lamp51. Versailles Crystal Lamp-0.81
Odette Tulle Ballgown52. Odette Tulle Ballgown-0.97
Canton Ginger Jar53. Canton Ginger Jar-1.15
Archive Brass Table Lamp54. Archive Brass Table Lamp-1.19

Chosen to discriminate ​

go
persona.All()   // Kate, Sofia, Lena, Mira
persona.Kate    // persona.Persona{Name, Description, Affinity}

Kate and Mira both dress for business but sit at opposite ends of classic and modern, so occasion alone never decides the outcome. Both fashion rails compete in one ranking, each product scored with its own category's weights, so each persona's top match is a different product, and three of them are trousers. Kate's is a pair of trousers because the trouser weights count tailoring more than the dress weights do:

PersonaTop match
Kateconservative lawyerTemple Pleated Trousers
Sofiaevent host, glamourOdette Tulle Ballgown
Lenadesigner, dresses downHaven Joggers
Miraarchitect, contemporary businessGrid Cigarette Trousers

Persona.Occasion() is the section of the shop a persona browses: its strongest occasion dimension, not a field set per persona. Persona.TopMatch(items) is its favourite among items, by catalog.Score.

How a persona chooses ​

A persona decides what a shopper picks, and nothing else: the shop never sees it. A shopper doesn't read a listing to the end and take the optimum. Persona.Choose scans the first ScanDepth (6) positions, considers what it likes well enough (at least GoodEnough, 80%, of its favourite's score in that listing) and picks one, the earlier positions more likely: position n weighs 1/n. If nothing near the top suits it, it scrolls on to its favourite. The pick is seeded, so the traffic stays reproducible.

So a shopper does not always open the first product, nor, from a listing not yet ranked for it, necessarily its best match. Because the shop learns from what was opened, a pick that is not the favourite feeds back into the ranking: Sofia lands on the sequin cocktail dress on her first visit and the shop shows it first for a while, until she finds her way to the tulle ballgown.

Avatars ​

Persona.SVG() draws an avatar (persona_kate.svg …) next to the product images. A persona's hairstyle and accessories come from its taste vector, and it wears the colour of its top-match product.