Closed makcedward closed 2 years ago
KMedoids does not support array in init for now, you are welcome to PR for it. Mainly you have to add the code in _initialize_medoids, add docstring and also add a test to verify that it works.
I'm looking forward to your PR.
@TimotheeMathieu Can you advise how can I run test cases in local env
You have to make some pytest compatible tests (look at examples in the existing tests). Then, to run the tests locally, execute pytest
while being in the sklearn-extra directory should run the tests, another possibility is to do the pull request directly and the tests will run automatically in the github checks.
Here is the PR
I think this is not working atm:
_check_init_args
doesn't allow for array like structures:
ValueError: init needs to be one of the following: ['random', 'heuristic', 'k-medoids++', 'build']
are you sure that you installed the github version ? This is not released yet, you have to install the git version of scikit-learn-extra for this to work.
You're right. It works after installing with pip install git+https://github.com/scikit-learn-contrib/scikit-learn-extra
@TimotheeMathieu Do you have a PyPI account ? I should add you as a maintainer there, so you can publish a new release if needed.
Yes, my account is TMathieu
. Although, I am not sure what is the future of this project as there does not seem to be anyone else contributing, but I can do a release.
I sent you the PyPI invite, thanks for your work @TimotheeMathieu !
Well, there are a few PRs and ~300 repos that depend on this package so there is some interest. Sorry myself I stepped down from scikit-learn maintenance including this repo to move to other projects. But if you have a chance you should talk with people at the scikit-learn foundation, to see how to best move forward, particularly since most people involved are at INRIA in France also. I'll follow up on this by email.
KMeans from sci-kit learn
init
parameters allows array. Does KMedoids also support it? I can submit pull requests for itIf an array is passed, it should be of shape (n_clusters, n_features) and gives the initial centers.