if (FALSE) {
# Create an Interval-Data object containing the intervals of loan data
# (from the Kaggle Data Science platform) aggregated by loan purpose
LbyPIdt <- IData(LoansbyPurpose_minmaxDt,
VarNames=c("ln-inc","ln-revolbal","open-acc","total-acc"))
#Fit homoscedastic and heteroscedastic mixtures up to Gaussian mixtures with up to seven components
mclustres <- Idtmclust(LbyPIdt,G=1:7,Mxt="HomandHet")
#Compare de model fit according to the BIC
plotInfCrt(mclustres,legpos="bottomleft")
#Display the results of the best three mixtures according to the BIC
summary(mclustres,parameters=TRUE,classification=TRUE)
pcoordplot(mclustres)
summary(mclustres,parameters=TRUE,classification=TRUE,model="HetG2C2")
summary(mclustres,parameters=TRUE,classification=TRUE,model="HomG6C1")
pcoordplot(mclustres,model="HomG6C1")
}
Run the code above in your browser using DataLab