[R] Flexmix new data classification
Bettina Gruen
Bettina.Gruen at jku.at
Tue Feb 7 10:12:24 CET 2012
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
More information about the R-help
mailing list