Hi I built a flexmix GLM binomial model with 200 observations and the model gave me 2 clusters, so if the model is named as newModel then i get the cluster index for each row using newModel at clusters. Now is there any way to predict which cluster the new observation or 201 observation belongs to using the above built model (newModel) ie so 201 observation can either belong to cluster 1 or cluster 2. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Flexmix-new-data-classification-tp4363996p4363996.html Sent from the R help mailing list archive at Nabble.com.
Flexmix new data classification
4 messages · Ingmar Visser, Bettina Gruen, loyolite270
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120207/366cfac9/attachment.pl>
Hi,
I built a flexmix GLM binomial model with 200 observations and the model gave me 2 clusters, so if the model is named as newModel then i get the cluster index for each row using newModel at clusters. Now is there any way to predict which cluster the new observation or 201 observation belongs to using the above built model (newModel) ie so 201 observation can either belong to cluster 1 or cluster 2.
You can obtain the predicted cluster memberships from the fitted model using the accessor function clusters(), i.e., clusters(newModel). If you want to predict the cluster memberships of new observations, you can then use clusters(newModel, newdata = data_frame_with_new_observations) HTH, Bettina
Thanks -- View this message in context:http://r.789695.n4.nabble.com/Flexmix-new-data-classification-tp4363996p4363996.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
------------------------------------------------------------------- Bettina Gr?n Institut f?r Angewandte Statistik / IFAS Johannes Kepler Universit?t Linz Altenbergerstra?e 69 4040 Linz, Austria Tel: +43 732 2468-6829 Fax: +43 732 2468-6800 E-Mail:Bettina.Gruen at jku.at www.ifas.jku.at
11 days later
Thank you very much for those suggestions, it really helped me a lot. I just got another problem, i want to run flexmix GLM binomial model with huge dataset (say 5 million rows), but the problem is i cant run flexmix with this dataset as a whole in R ( it will crash). So is it fair to run the flexmix model by taking a stratified sample from the population, if so can you please explain me the reason ? If i cant use the above approach, then can you please provide me with a solution for this problem ? -- View this message in context: http://r.789695.n4.nabble.com/Flexmix-new-data-classification-tp4363996p4399702.html Sent from the R help mailing list archive at Nabble.com.