Skip to content
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

Add wrappers for clustering to get uniform interface #982

Closed
juliohm opened this issue Nov 4, 2022 · 2 comments
Closed

Add wrappers for clustering to get uniform interface #982

juliohm opened this issue Nov 4, 2022 · 2 comments

Comments

@juliohm
Copy link
Contributor

juliohm commented Nov 4, 2022

Can you please provide an example with

  1. Clustering.KMeans
  2. Clustering.DBSCAN
  3. BetaML.GaussianMixtureClusterer

where we call the same MLJ interface functions to "train" the clustering models with a random data set X1 = rand(3,100) and then "predict" the labels of new points X2 = rand(3, 10)?

Every time I try to accomplish this task I get stuck with various issues (e.g. the output of the models follow different formats and conventions). I am looking for a simple example with MLJ.fit, MLJ.predict, MLJ.predict_mode and MLJ.transform only. I don't want to wrap the models into a machine in this example.

@ablaom
Copy link
Member

ablaom commented Nov 6, 2022

It is not possible at present as 1, 2, and 3 are all different: 2 does not generalize to new observations, and 3 outputs probabilistic labels. There are natural differences in the API for this reason. For a uniform interface, we need a wrapper to convert non-generalizing clusterers to generalizing ones, and a wrapper to convert probabilistic-predicting clusterers into deterministic ones. These do not exist at present. They could be created using MLJ learning networks.

@ablaom ablaom changed the title Cannot easily switch between different clustering models Add wrappers for clustering to get uniform interface Nov 6, 2022
@juliohm
Copy link
Contributor Author

juliohm commented Apr 2, 2024

No longer needed.

@juliohm juliohm closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants