--n_components
Switch
--n_components
Description
Specifies the number of clusters when using --fit_reducer. For PCA one can also specify None or mle. For NMF and SPARSEPCA one can also specify None
Argument and Default Value
When n_components is not present, the default number of clusters is 24.
Details
This switch changes the following parameter in each of the models (specified by --model): NMF: n_components PCA: n_components SPARSEPCA: n_components LDA: nb_topics KMEANS: n_clusters SPECTRAL: n_clusters GMM: n_components This switch is ignored and no default value is set: DBSCAN
Other Switches
Note: There are other required switches for --fit_reducer Required Switches: --fit_reducer --model nmf, pca, sparsepca, lda, kmeans, dbscan, spectral or gmm
Example Commands
# General syntax
dlatkInterface.py -d <DATABASE> -t <TABLE> -c <GROUP_FIELD> -f <FEATURE_TABLE> --fit_reducer --model <MODEL_NAME> --n_components N
# Example, using the packaged dla_tutorial dataset (see tut_dla)
dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$1to3gram$msgs$user_id$0_05' \
--fit_reducer --model spectral --n_components 36