-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add support for: ML-kNN #2606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm just wondering what the next step for this would be? Does someone have to mark it as "feature"? How does it get picked up by one of the developers? I've coded up my version of this ML-kNN, if someone is interested in taking a look, I will happily send it over. |
The best way to add new features is to make a pull request. Please have a look to the contributing guidelines http://scikit-learn.org/dev/developers/index.html. Be aware that adding new features require more than just writing the plain algorithm, but also to write tests, code documentations and a narrative documentation. |
Is this not implemented already? http://scikit-learn.org/dev/modules/multiclass.html lists KNN as being multi-label. |
@amueller Where in the link do you see that? I can only find this:
I.e. multiclass, not multilabel I've been looking through the sklearn docs for multi-label support and at the moment, it seems to only support it via OneVsRest / LabeBinarizer. |
Yes, the binary relevance (one-vs-rest) is already implemented. However, ML-KNN propose to compute to perform prediction in a bayesian fashion using Bayes rule as in #399 and #970.. |
Has this been implemented already? Is the issue still open? |
@mchangun Can you give me the ML-KNN code it will be a great help to me as i am working on Multi-Label Problem Thanks |
The issue is still open, @medhini, it has not been implemented (the implementation at #970 is not multi-label); and no, we don't have code for you, @bhaveshoswal . |
I would like to take up this issue and implement MLKnn. Can it be assigned to me ? |
As far as I can tell, @medhini, you would be welcome. We've rarely used the 'assignee' feature, but please write some tests, perhaps, open a WIP pull request and show us it's actually going to happen. |
@jnothman but our KNN is multi-label, right? Even multi-output multi-class. Or is this about something else? |
I didn't look through clearly enough. #2606 (comment) above suggests ML-KNN differs in its use of bayesian priors, but I suppose bayesian priors is independent of the multilabelness? I haven't looked into the bayesian priors issue, but it looks interesting. Presumably, though, this issue adds little. |
Or does ML-KNN model covariance between the multiple labels? I think someone will need to read to work out if this is valuable. |
No covariance, but uses global class probabilities. Wouldn't call that bayesian priors. The paper is really obscurely written. There's a smoothing of the class distribution, which is 1. |
Hello guys. Is this still on? I have finished an implementation of ML-kNN based on sklearn's kNN and the original paper "ML-KNN: A lazy learning approach to multi-label learning". |
A PR is welcome but expect a slow process to merge; so is a summary of the algorithm. |
@gerdinard please share your implementation if it is possible |
Can you share a link to your implementation? |
Hello. Here is a link to my python MLkNN implementation. |
Closing as it's unlikely we'd be adding it to sklearn, and it's better existing in a separate project/repo. |
Add support for the Multi-Label kNN algorithm as described here in this paper http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/pr07.pdf. A brief description of the algorithm from the above paper:
Supporting sparse matrices should be a key requirement - a lot of multi label tasks are for text categorization and these are usually represented as sparse matrices.
ML-kNN is actually already implemented in this library (http://orange.biolab.si/docs/latest/reference/rst/Orange.multilabel/#ml-knn-learner) but it would be good to bring it under the scikit-learn framework as well.
The text was updated successfully, but these errors were encountered: