K-means Example

This page is an example of using TablePress for your project.

Chapter 2 in the book uses K-means clustering to cluster deals sent out by a wine dealer. Here are some results obtained on using 4 clusters-

Offer #Offer dateProductMinimum Qty (kg)DiscountOriginPast Peak1234
1JanuaryMalbec7256FranceFALSE0046
2JanuaryPinot Noir7217FranceFALSE4042
3FebruaryEspumante14432OregonTRUE0024
4FebruaryChampagne7248FranceTRUE0075
5FebruaryCabernet Sauvignon14444New ZealandTRUE0022
6MarchProsecco14486ChileFALSE0057
7MarchProsecco640AustraliaTRUE01243
8MarchEspumante645South AfricaFALSE01163
9AprilChardonnay14457ChileFALSE0073
10AprilProsecco7252CaliforniaFALSE0052
11MayChampagne7285FranceFALSE0076
12MayProsecco7283AustraliaFALSE0032
13MayMerlot643ChileFALSE0600
14JuneMerlot7264ChileFALSE0054
15JuneCabernet Sauvignon14419ItalyFALSE0024
16JuneMerlot7288CaliforniaFALSE0050
17JulyPinot Noir1247GermanyFALSE7000
18JulyEspumante650OregonFALSE01121
19JulyChampagne1266GermanyFALSE0023
20AugustCabernet Sauvignon7282ItalyFALSE0042
21AugustChampagne1250CaliforniaFALSE0022
22AugustChampagne7263FranceFALSE00021
23SeptemberChardonnay14439South AfricaFALSE0032
24SeptemberPinot Noir634ItalyFALSE12000
25OctoberCabernet Sauvignon7259OregonTRUE0033
26OctoberPinot Noir14483AustraliaFALSE8052
27OctoberChampagne7288New ZealandFALSE0063
28NovemberCabernet Sauvignon1256FranceTRUE0042
29NovemberPinot Grigio687FranceFALSE01520
30DecemberMalbec654FranceFALSE01624
31DecemberChampagne7289FranceFALSE00107
32DecemberCabernet Sauvignon7245GermanyTRUE0031

 

The result obtained for different clusters can be visualized.

Cluster 1 has clear distinctions on what deals were chosen by customers. In this case the offer on Pinot Noir-

For cluster 2, some of the deals were chosen by people who could be classified as low income buyers-

Cluster 3 is not clear and has a lot of noise-

Cluster 4 shows a group of people really loved August Champaign deal. This result is quite inconclusive-

Just another WordPress site