joshlk / k-means-constrained

K-Means clustering - constrained with minimum and maximum cluster size. Documentation: https://joshlk.github.io/k-means-constrained
https://github.com/joshlk/k-means-constrained
BSD 3-Clause "New" or "Revised" License
192 stars 43 forks source link

Feature value constrained in a spatial aplication #26

Closed orlandombaa closed 2 years ago

orlandombaa commented 2 years ago

Hello everyone !

Is it possible to add a second constrained related with the sum of attributes of each features?

Best regards, Orlando

joshlk commented 2 years ago

Yes -the algorithm in principle could support it but this package doesn’t and doesn’t plan to.

Feel free to ask questions about the code if you would like to make these modifications yourself.

On 7 Jul 2022, at 14:36, Orlando A. @.***> wrote:

 Hello everyone !

Is it possible to add a second constrained related with the sum of attributes of each features?

Best regards, Orlando

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

orlandombaa commented 2 years ago

Thank you @joshlk I start to modify the library now. The aplication that I want to do is a spatial clustring constrained. I want to modifed the code of "k means constrained.py" to give values of travel distance to the variable "D" generated by a routing machine (OSRM).

At the same time I am using Latitud and Longitude as input to my variable "X".

I see that there is a standardization process that modify X and the centers generated are not readable to OSRM (the centers does not have values of coordeniates any more)

My question is: Where this process of standardization happen or where can I stop it?

I have been watching the file of "data" in the folder of preprocesing in sklearn but it continuos to change the magnitude of the centers.

Best regards, Orlando

joshlk commented 2 years ago

I'm closing this for now. Re-open the ticket and leave a comment if you are still looking at this and wasnt more assistance.