Linear regression Test linear moedel One-way ANOVA Linear regression lm(y ~ x1 + x2 + x3) # multiple linear regression lm(log(y) ~ x) # log transformed lm(sqrt(y) ~ x) # sqrt transformed lm( y ~ log(x)) # fields transformed llm(log(y) ~ log(x)) # everything is transformed lm(y ~ .) # use all fields for regression model lm(y ~ x + 0) # forced zero intercept lm(y ~ x*k) # interaction of two variables lm(y ~ x + k + x:k) # product of xkl but without interaction lm(y ~ (x + k + .
Elbow method Average silhouette method Gap statistic method Using NbCLust Sources Elbow method The basic idea is to find minimal the total intra-cluster variation or total Within-cluster Sum ofSquares (WSS).
Plot number of clusters ~ WSS show how WSS is reduced with increase of number of clusters. The optimal number of clusters is when adding another cluster doesn’t improve much better the total WSS.
The optimal number of clusters can be defined as follow: