Skip to content

Flexmix new data classification

4 messages · Ingmar Visser, Bettina Gruen, loyolite270

#
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.
#
Hi,
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

  
    
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.