admin管理员组文章数量:1432566
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;
- Outlet_Name: ABC's Bar
- Longitude: 30.00
- Latitutde: -29.00
- Preferred_Price_Score : 50
- Competitor_Price_Score : 32
- 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:
- Name: John Smith
- 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;
- Outlet_Name: ABC's Bar
- Longitude: 30.00
- Latitutde: -29.00
- Preferred_Price_Score : 50
- Competitor_Price_Score : 32
- Cluster: Gold
- Operator: John Smith
Line 2:
- Outlet_Name: Patty Lounge
- Longitude: 30.00
- Latitutde: -29.00
- Preferred_Price_Score : 50
- Competitor_Price_Score : 32
- Cluster: Silver
- Operator: Jane Doen
Line 3:
- Outlet_Name: Score Grill
- Longitude: 30.00
- Latitutde: -29.00
- Preferred_Price_Score : 50
- Competitor_Price_Score : 32
- Cluster: Silver
- 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.
本文标签: pythonassigning operator names to Kmeans clustersStack Overflow
版权声明:本文标题:Python, assigning operator names to K-means clusters - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741697671a2393102.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论