Changelog
Source:NEWS.md
gmeans 0.3.0
-
gmeans()now splits a cluster by starting the two new centers along its main principal component, as described in Hamerly and Elkan (2003), instead of at random points. The split step no longer depends on the random seed and the number of clusters is found more reliably, so results may differ from earlier versions. -
gmeans()now usesk_init = 1by default, as in Hamerly and Elkan (2003). The previous default of2could never return a single cluster. With one initial center the result no longer depends on the random seed. -
gmeans()now useslevel = 0.0001by default, the significance level used by Hamerly and Elkan (2003). The previous default of0.05often split clusters that are Gaussian, especially in higher dimensions. -
gmeans()now usesk_max = Infby default, as in Hamerly and Elkan (2003). The previous default of10silently capped the number of clusters on data with more than 10 clusters. -
gmeans()gains aniter.maxargument that defaults to100, instead of the10used bystats::kmeans(), so k-means converges when there are many clusters instead of warning that it did not converge. -
gmeans()now storesk_init,k_max, andlevelin the returned object. -
gmeans()now errors clearly whencentersis passed, pointing tok_initinstead. -
gmeans()now errors clearly whenk_initis not less than the number of rows inx. -
predict.gmeans()andcompute_wss()now accept logicalnewdata, coercing it to 0/1 asgmeans()does forx. - New
summary()method forgmeansobjects. - New
tidy(),augment(), andglance()methods forgmeansobjects.
gmeans 0.2.0
CRAN release: 2026-09-11
- Removed the mlr3 integration vignette since the learner now ships in mlr3cluster as
lrn("clust.gmeans"). -
gmeans()now errors whenk_initexceedsk_max. -
gmeans()now requires finite numeric input (logical is coerced to 0/1) and errors clearly when there are fewer distinct points than centers. -
gmeans()now errors clearly on input with zero rows or zero columns. -
predict.gmeans()now errors when the Minkowski powerpis not positive. -
predict.gmeans()andcompute_wss()now accept data frames with unused non-numeric columns and error clearly whennewdatais not a matrix or data frame. -
predict.gmeans()andcompute_wss()now error on a column mismatch betweennewdataand unnamed centers instead of returning wrong distances.