The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Implement rapidminer k-means in Python

starstar Member Posts: 14 Contributor II
edited November 2018 in Help
Hi All,
I have used Rapidminer k-means algorithm to cluster binary dataset. Following matrix is based on web page access('1' for access and '0' for not access). First column is a label to identify each user.
0,1,1,0,1,0,1,0,1,1,0
1,1,0,0,1,1,0,1,0,1,0
2,1,0,0,0,1,0,1,0,1,1
3,1,0,1,0,1,0,0,0,1,0
4,0,1,1,1,0,1,0,1,0,0
5,1,1,0,0,1,0,1,1,1,1
6,0,0,1,0,1,1,0,1,0,0
7,1,1,0,1,0,1,0,0,1,0
8,1,0,0,0,1,0,1,1,1,1
9,0,1,1,0,1,0,1,0,0,0

I want to get an output in the following format which I already got from rapid-miner.
0 - cluster_1
1 - cluster_0
2 - cluster_1
3 - cluster_3
.. - ....

Now I need to do the same process in Python? Is it possible to implement rapidminer k-means in Python

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    The easiest and recommended way would be to setup a RapidMiner Server, create a scoring process that assigns the cluster to a row in the same way as you depicted below, store that process on the server. Then you can export the process as a webservice that you can call from your Python code. That way you can send new data to the server via the webservice, and the server will deliver the desired data as the response of the webservice.

    Best regards,
    Marius
Sign In or Register to comment.