CAH, the number of clusters is capped to 16 due of FactomineR
The verification tests have been implemented in the UI.
The maximum number of clusters has been fixed as this : rows count - 1
and columns count –1, according to the computing mode (rows or columns)
for CA and Lexical Table because FatoMineR can’t compute a CAH where the
cluster numbers is equals to the number of rows/cols. Is it normal ?
Other tasks to do:
- FactoMineR seems to manage a maximum of 16 clusters when plotting
with plot.HCPC, it may be a FactoMineR bug linked to the plotting of
inertia barplot
We can see when computing a CAH on rows that the barplot never exceeds
16 bars and trying to plot more than 16 clusters results in an error in
R source code. After some tests plot.HCPC with argument
tree.barplot=FALSE can exceed 16 clusters. A solution may be to plot the
inertia barplot in another SWT component with plot.HCPC, as for the CA
singular values.
The results generated by HCPC and used in CAH can contain more clusters
than 16 but FactoMineR doesn’t seems to manage to draw them with
plot.HCPC. At this moment, I fixed the max clusters to 16 in the UI tool
bar. We may investigate this and also limit the maximum clusters to 16
in the CAH preference page, if it’s confirmed. NOTE: We could generate
charts with more clusters directly form the HCPC result by using the JFC
charts engine since it doesn’t use plot.HCPC. In this case we need to
find a way to define the max clusters count outside the CAH class, maybe
at the charts engine levels, e.g.
ChartsEngine.getMaxAvailableClusters(CAH ca) which could return 16 for
the R implementation and the real maximum for the JFC implementation
- define if implement these verifications at CAH TBX level, before/during step computing, is useful
Also see old issue: #836
(from redmine: issue id 2740, created on 2020/01/23 by Sebastien Jacquot)