Python, assigning operator names to K-means clusters - Stack Overflow

I have the following problem that is causing me a bit of a headache. I have a set of data, on this data

I have the following problem that is causing me a bit of a headache. I have a set of data, on this data the K-means clustering algorithm was used in order to cluster certain outlets(shops) together based upon the price of wares ordered weekly from the preferred supplier vs the price of wares ordered weekly from the competitor. There are currently 4 clusters, each of which will be labelled; "Bronze", "Silver", "Gold" and "Platinum".

So an example of the data here would be the following;

  1. Outlet_Name: ABC's Bar
  2. Longitude: 30.00
  3. Latitutde: -29.00
  4. Preferred_Price_Score : 50
  5. Competitor_Price_Score : 32
  6. Cluster: Gold

Now I have operators that need to go to these outlets and take a survey. I need to divide the outlets up, evenly, under all the operators. For example, Operator 1 needs to visit, 1 plat, 2 gold, 3 silver and 4 bronze.

Here the data looks like the following:

  1. Name: John Smith
  2. Contact Number : 123 456 7890

As to the nature of the data, I cannot really share this due to the sensitivity of the data. The end result would look like the following:

1st Line;

  1. Outlet_Name: ABC's Bar
  2. Longitude: 30.00
  3. Latitutde: -29.00
  4. Preferred_Price_Score : 50
  5. Competitor_Price_Score : 32
  6. Cluster: Gold
  7. Operator: John Smith

Line 2:

  1. Outlet_Name: Patty Lounge
  2. Longitude: 30.00
  3. Latitutde: -29.00
  4. Preferred_Price_Score : 50
  5. Competitor_Price_Score : 32
  6. Cluster: Silver
  7. Operator: Jane Doen

Line 3:

  1. Outlet_Name: Score Grill
  2. Longitude: 30.00
  3. Latitutde: -29.00
  4. Preferred_Price_Score : 50
  5. Competitor_Price_Score : 32
  6. Cluster: Silver
  7. Operator: John Smith

So if there are 1000 stores/outlets and 100 operators; each would be allocated 10 stores to visit, 1 plat, 2 gold, 3 silver and 4 bronze.

Unfortunately I have no idea where to begin, so far all I have is the operator data which includes the names of the operators. And the initial data which contain shop information like pricing and names and locations.

I do not know how I would link the data in the manner which I described.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1741697671a4361296.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信