Algostream_advanced_models.PcaPrincipal Component Analysis via Jacobi eigendecomposition of the sample covariance.
Input data is a n × p matrix in row-major form: data.(i).(j) is the j-th feature of the i-th observation. fit centres columns by their mean before computing the covariance.
Components are returned in descending order of explained variance. components.(k) is the k-th principal axis (an eigenvector of length p).
transform projects centred data onto the components → an n × n_components matrix. inverse_transform reconstructs the centred data from the projection and adds back the column means.
val fit : data:float array array -> ?n_components:int -> unit -> tval n_components : t -> intval n_features : t -> intval n_samples : t -> intval explained_variance : t -> float arrayval explained_variance_ratio : t -> float arrayval components : t -> float array arrayval transform : t -> data:float array array -> float array arrayval inverse_transform : t -> projected:float array array -> float array array