MCPcopy Create free account

hub / github.com/MaxHalford/prince / functions

Functions259 in github.com/MaxHalford/prince

↓ 67 callersFunctionload_df_from_R
(code)
tests/__init__.py:9
↓ 29 callersMethodfit
(self, X, y=None)
prince/ca.py:56
↓ 11 callersMethodtransform
Computes the row principal coordinates of a dataset. Same as calling `row_coordinates`. This is just for compatibility with scikit-le
prince/pca.py:237
↓ 8 callersMethodfit
Fit the model with X. The algorithm naturally fits and transforms at the same time, so this simply calls ``.fit_transform``
prince/gpa.py:72
↓ 5 callersMethod_svd
(self, engine, random_state)
tests/test_svd.py:96
↓ 5 callersMethodcolumn_coordinates
The column principal coordinates.
prince/ca.py:207
↓ 5 callersMethodrow_coordinates
Returns the row principal coordinates. The row principal coordinates are obtained by projecting `X` on the right eigenvectors. Synon
prince/pca.py:214
↓ 5 callersMethodrow_coordinates
The row principal coordinates.
prince/ca.py:145
↓ 4 callersMethod_active_groups
Mapping of active group name → list of its columns in Z (output names). For numerical groups the output names are the original column names;
prince/mfa.py:409
↓ 4 callersMethod_prepare
One-hot encode the input if needed, and align columns with the fitted indicator matrix.
prince/mca.py:94
↓ 4 callersMethodfit_transform
Fit the model with X and return the aligned shapes. Parameters: X (array-like of shape (n_shapes, n_points, n_dim)): Matrix of
prince/gpa.py:113
↓ 3 callersMethod_check_input
(self, X)
prince/pca.py:76
↓ 3 callersMethod_extract_Z_numpy
Extract the pre-scaled Z as a numpy array, in active-then-supplementary order.
prince/mfa.py:323
↓ 3 callersMethod_log_map_to_df
Log-map quaternions to tangent space and return as DataFrame.
prince/pga.py:87
↓ 3 callersMethod_parse_quaternions
Extract quaternion array (n, 4) in scalar-first format from DataFrame.
prince/pga.py:75
↓ 3 callersMethod_scale_active_numpy
Return the active columns of Z. Z is already pre-scaled, so this is a slice.
prince/mfa.py:327
↓ 3 callersMethodfit_transform
A faster way to fit/transform. This methods produces exactly the same result as calling `fit(X)` followed by `transform(X)`. It is ho
prince/pca.py:250
↓ 3 callersMethodpartial_row_coordinates
Returns the partial row principal coordinates.
prince/mfa.py:349
↓ 2 callersMethod_active_group_names
(self)
tests/test_mfa.py:312
↓ 2 callersMethod_build_Z
Build the global pre-scaled Z block by applying each group's preprocessing. Active groups come first and supplementary groups are appended at
prince/mfa.py:285
↓ 2 callersMethod_check_input
(self, X)
prince/gpa.py:173
↓ 2 callersMethod_check_is_fitted
(self)
prince/gpa.py:178
↓ 2 callersMethod_column_cosine_similarities
(self, X, G)
prince/ca.py:249
↓ 2 callersMethod_partial_axes_table
Build the standardized partial axes table and project onto global MFA axes. Returns (coord, labels, eig_ratios) where coord is the projected
prince/mfa.py:457
↓ 2 callersMethod_row_cosine_similarities
(self, X, F)
prince/ca.py:187
↓ 2 callersMethod_scale
(self, X)
prince/pca.py:190
↓ 2 callersMethod_subset_greenacre_quantities
Adjusted eigenvalues and total inertia for subset MCA with Greenacre correction. Ports the ``lambda = "adjusted"`` + ``subsetcat`` branch of
prince/mca.py:106
↓ 2 callersMethodcolumn_cosine_similarities
Return the cos2 for each column against the dimensions. The cos2 value gives an indicator of the accuracy of the column projection on the dim
prince/ca.py:236
↓ 2 callersMethodfit
( self, X, y=None, sample_weight=None, column_weight=None, sup
prince/pca.py:84
↓ 2 callersMethodfrechet_mean
Compute the Fréchet mean via iterative Riemannian gradient descent. Parameters ---------- points Quaternions (n,
prince/manifolds.py:146
↓ 2 callersMethodlog
Log map: compute rotation vectors of base^{-1} * points. Parameters ---------- base Base quaternion (4,) in scala
prince/manifolds.py:102
↓ 2 callersMethodplot
( self, X, x_component=0, y_component=1, show_row_markers=True,
prince/ca.py:267
↓ 2 callersMethodrow_coordinates
Returns the row principal coordinates.
prince/mfa.py:335
↓ 2 callersMethodrow_coordinates
Row principal coordinates in the MCA space.
prince/mca.py:272
↓ 2 callersMethodrow_cosine_similarities
Return the cos2 for each row against the dimensions. The cos2 value gives an indicator of the accuracy of the row projection on the dimension
prince/ca.py:173
↓ 1 callersMethod_determine_groups
( self, X: pd.DataFrame, groups: dict[Any, Any] | list[Any] | None )
prince/mfa.py:248
↓ 1 callersMethod_ensure_positive_hemisphere
Ensure quaternions are in the same hemisphere as the base. Quaternions q and -q represent the same rotation, so we pick the sign that
prince/manifolds.py:90
↓ 1 callersMethod_get_manifold
(self)
prince/pga.py:70
↓ 1 callersMethod_one_hot
(self, X)
prince/mca.py:89
↓ 1 callersMethod_scale_group
Apply the fitted per-group preprocessing to produce that group's Z block.
prince/mfa.py:298
↓ 1 callersMethod_strip_group_level
Return a column label's within-group portion (the group level removed). For MultiIndex columns ``(group, var)`` this is ``var``; for flat col
prince/mfa.py:274
↓ 1 callersFunctioncheck_is_fitted
(method)
prince/utils.py:11
↓ 1 callersMethodcolumn_coordinates
Column (category) principal coordinates in the MCA space.
prince/mca.py:287
↓ 1 callersMethodexp
Exp map: apply rotation vectors to base. Parameters ---------- base Base quaternion (4,) in scalar-first format (
prince/manifolds.py:124
↓ 1 callersMethodfit
Fit PGA to data. Parameters ---------- X Rotation data. A DataFrame with columns (qw, qx, qy, qz) or a
prince/pga.py:92
↓ 1 callersMethodfit
Fit the MCA on a categorical dataframe. The input is one-hot encoded into an indicator matrix (unless ``one_hot=False``), then corres
prince/mca.py:183
↓ 1 callersMethodinverse_transform
Transforms row projections back to their original space. In other words, return a dataset whose transform would be X.
prince/pca.py:266
↓ 1 callersMethodplot
( self, X, x_component=0, y_component=1, color_rows_by=None, s
prince/pca.py:344
↓ 1 callersMethodrow_coordinates
(self, X)
prince/famd.py:97
↓ 1 callersMethodscree_plot
Scree plot. References ---------- https://en.wikipedia.org/wiki/Scree_plot
prince/utils.py:94
↓ 1 callersMethodtransform
Project rotation data onto principal geodesic components. Parameters ---------- X Rotation data (same format as f
prince/pga.py:138
↓ 1 callersMethodtransform
Computes the row principal coordinates of a dataset.
prince/mca.py:301
↓ 1 callersFunctionunscaled_procrustes
Fit `data` to `reference` using procrustes analysis without scaling. Uses translation (mean-centering), reflection, and orthogonal rotation.
prince/gpa.py:188
Method__init__
( self, rescale_with_mean=True, rescale_with_std=True, n_components=2,
prince/pca.py:56
Method__init__
( self, rescale_with_mean=True, rescale_with_std=True, n_components=2,
prince/mfa.py:35
Method__init__
( self, rescale_with_mean=True, rescale_with_std=False, n_components=2,
prince/famd.py:15
Method__init__
( self, n_components=2, rescale_with_mean=True, rescale_with_std=False,
prince/pga.py:46
Method__init__
( self, max_iter=10, tol=1e-4, init="random", scale=True, copy
prince/gpa.py:54
Method__init__
( self, n_components=2, n_iter=10, copy=True, check_input=True,
prince/mca.py:54
Method__init__
( self, n_components=2, n_iter=10, copy=True, check_input=True,
prince/ca.py:39
Method_check_input
(self, X)
prince/famd.py:40
Method_eigenvalues_summary
Return a summary of the eigenvalues and their importance.
prince/utils.py:69
Function_impl
(self, X=None, *method_args, **method_kwargs)
prince/pca.py:24
Function_impl
(self, *method_args, **method_kwargs)
prince/utils.py:13
Function_impl
(self, X=None, *method_args, **method_kwargs)
prince/ca.py:20
Method_prepare
(self, n_components, are_rows_weighted, are_columns_weighted)
tests/test_svd.py:28
Method_prepare
(self, sup_rows, sup_cols)
tests/test_famd.py:34
Method_prepare
(self)
tests/test_famd.py:109
Method_prepare
(self, sup_rows, sup_groups)
tests/test_mfa.py:31
Method_prepare
(self, sup_rows, sup_groups)
tests/test_mfa.py:274
Method_prepare
(self, sup_rows, sup_cols, scale, sample_weights, column_weights)
tests/test_pca.py:38
Method_prepare
(self, sup_rows, sup_cols)
tests/test_mca.py:20
Method_prepare
(self, sup_rows, sup_cols)
tests/test_ca.py:38
Method_skip_if_engine_unavailable
(self, engine)
tests/test_svd.py:92
Functionbuild_ellipse
Construct ellipse coordinates from two arrays of numbers. Args: X (1D array_like) Y (1D array_like) Returns: float:
prince/plot.py:24
Functioncheck_is_dataframe_input
(func)
prince/utils.py:20
Methodcolumn_contributions_
(self)
prince/pca.py:336
Methodcolumn_contributions_
(self)
prince/famd.py:164
Methodcolumn_coordinates
(self, X)
prince/mfa.py:377
Methodcolumn_coordinates_
Column coordinates from PCA in the tangent space.
prince/pga.py:254
Methodcolumn_correlations
Calculate correlations between variables and components. The correlation between a variable and a component estimates the information they sh
prince/pca.py:315
Methodcolumn_correlations
Correlations between variables and components. For quantitative variables, these are the signed Pearson correlations between each sta
prince/famd.py:144
Methodcolumn_cosine_similarities
Squared cosine similarities (cos2) of each column on each component.
prince/mca.py:294
Methodcolumn_cosine_similarities_
(self)
prince/pca.py:331
Methodcolumn_cosine_similarities_
(self, X)
prince/famd.py:159
Functioncompute_svd
Computes an SVD with k components.
prince/svd.py:25
Methodcumulative_percentage_of_variance_
Returns the percentage of explained inertia per principal component.
prince/utils.py:63
Methodeigenvalues_
Returns the eigenvalues associated with each principal component.
prince/pca.py:186
Methodeigenvalues_
Eigenvalues from PCA in the tangent space.
prince/pga.py:241
Methodeigenvalues_
Returns the eigenvalues associated with each principal component.
prince/mca.py:142
Methodeigenvalues_
Returns the eigenvalues associated with each principal component.
prince/ca.py:139
Methodeigenvalues_summary
Return a summary of the eigenvalues and their importance.
prince/utils.py:81
Methodexp
Exponential map: project tangent vectors back to the manifold. Parameters ---------- base The base point on the m
prince/manifolds.py:33
Methodfit
(self, X, y=None, groups=None, supplementary_groups=None)
prince/mfa.py:60
Methodfit
(self, X, y=None)
prince/famd.py:46
Methodfrechet_mean
Compute the Fréchet mean on the manifold. Parameters ---------- points Points on the manifold. weights
prince/manifolds.py:50
Methodget_feature_names_out
(self, input_features=None)
prince/pca.py:80
Methodget_feature_names_out
(self, input_features=None)
prince/mca.py:103
Methodgroup_contributions_
Returns the contribution of each group to each component. This is the sum of the variable contributions for all variables in the group.
prince/mfa.py:424
Methodgroup_coordinates_
Returns the coordinates of each group on each component. This is the group contribution scaled by the eigenvalue.
prince/mfa.py:441
next →1–100 of 259, ranked by callers