This function wraps the PCA functionality from Python's sklearn package for
use in R via reticulate. It allows you to perform dimension reduction on
high-dimensional data, its intended use is in a BertopicR pipeline. If you're
concerned about processing time, you most likely will only want to reduce the
dimensions of your dataset once. In this case, when compiling your model with
bt_compile_model you should call reducer <- bt_empty_reducer()
.
Usage
bt_make_reducer_pca(
n_components,
...,
svd_solver = c("auto", "full", "arpack", "randomized")
)
Arguments
- n_components
Number of components to keep
- ...
Sent to sklearn.decomposition.PCA function for adding additional arguments
- svd_solver
method for reducing components can be auto, full, arpack, randomized