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 Guassian Mixture Models to available clustering models #194

Closed
nathaniel-johnson22 opened this issue Sep 18, 2024 · 2 comments
Closed

Comments

@nathaniel-johnson22
Copy link

install.packages(c("reprex", "sessioninfo"), repos = "http://cran.r-project.org")

Gaussian Mixture

I would like the ability to run gaussian mixture models using tidyclust. GMM allows clusters to be extracted assuming data is drawn from multiple gaussian distributions. Common implementations in R include the mclust

Specification Example

gmm_spec <- gaussian_mixture() %>% parsnip::set_engine("Mclust")

Fit and Prediction would work similar to kmeans, mclust produces both discrete classification (model$classification) and probabilities (a matrix: model$z)

Fit and Predict Example

gmm_fit <- gmm_spec %>% fit(~ bill_length_mm + bill_depth_mm, data = penguins )

new_penguin <- tibble(bill_length_mm = 42,  bill_depth_mm = 17)

kmeans_fit %>%  predict(new_penguin)

Currently, parsnip does not allow custom-built unsupervised models. An alternative would be a similar framework in tidyclust that extends parsnip to allow this.

@nathaniel-johnson22
Copy link
Author

This is a duplicate of #5

Copy link

github-actions bot commented Oct 3, 2024

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant