doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
transform(X) [source] Encode the data as a sparse combination of the dictionary atoms. Coding method is determined by the object parameter transform_algorithm. Parameters Xndarray of shape (n_samples, n_features) Test data to be transformed, must have the same number of features as the data used to train the mo...
sklearn.modules.generated.sklearn.decomposition.dictionarylearning#sklearn.decomposition.DictionaryLearning.transform
sklearn.decomposition.dict_learning(X, n_components, *, alpha, max_iter=100, tol=1e-08, method='lars', n_jobs=None, dict_init=None, code_init=None, callback=None, verbose=False, random_state=None, return_n_iter=False, positive_dict=False, positive_code=False, method_max_iter=1000) [source] Solves a dictionary learnin...
sklearn.modules.generated.sklearn.decomposition.dict_learning#sklearn.decomposition.dict_learning
sklearn.decomposition.dict_learning_online(X, n_components=2, *, alpha=1, n_iter=100, return_code=True, dict_init=None, callback=None, batch_size=3, verbose=False, shuffle=True, n_jobs=None, method='lars', iter_offset=0, random_state=None, return_inner_stats=False, inner_stats=None, return_n_iter=False, positive_dict=F...
sklearn.modules.generated.sklearn.decomposition.dict_learning_online#sklearn.decomposition.dict_learning_online
class sklearn.decomposition.FactorAnalysis(n_components=None, *, tol=0.01, copy=True, max_iter=1000, noise_variance_init=None, svd_method='randomized', iterated_power=3, rotation=None, random_state=0) [source] Factor Analysis (FA). A simple linear generative model with Gaussian latent variables. The observations are ...
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis
sklearn.decomposition.FactorAnalysis class sklearn.decomposition.FactorAnalysis(n_components=None, *, tol=0.01, copy=True, max_iter=1000, noise_variance_init=None, svd_method='randomized', iterated_power=3, rotation=None, random_state=0) [source] Factor Analysis (FA). A simple linear generative model with Gaussian ...
sklearn.modules.generated.sklearn.decomposition.factoranalysis
fit(X, y=None) [source] Fit the FactorAnalysis model to X using SVD based approach Parameters Xarray-like of shape (n_samples, n_features) Training data. yIgnored Returns self
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.fit_transform
get_covariance() [source] Compute data covariance with the FactorAnalysis model. cov = components_.T * components_ + diag(noise_variance) Returns covndarray of shape (n_features, n_features) Estimated covariance of data.
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.get_covariance
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.get_params
get_precision() [source] Compute data precision matrix with the FactorAnalysis model. Returns precisionndarray of shape (n_features, n_features) Estimated precision of data.
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.get_precision
score(X, y=None) [source] Compute the average log-likelihood of the samples Parameters Xndarray of shape (n_samples, n_features) The data yIgnored Returns llfloat Average log-likelihood of the samples under the current model
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.score
score_samples(X) [source] Compute the log-likelihood of each sample Parameters Xndarray of shape (n_samples, n_features) The data Returns llndarray of shape (n_samples,) Log-likelihood of each sample under the current model
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.score_samples
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.set_params
transform(X) [source] Apply dimensionality reduction to X using the model. Compute the expected mean of the latent variables. See Barber, 21.2.33 (or Bishop, 12.66). Parameters Xarray-like of shape (n_samples, n_features) Training data. Returns X_newndarray of shape (n_samples, n_components) The latent ...
sklearn.modules.generated.sklearn.decomposition.factoranalysis#sklearn.decomposition.FactorAnalysis.transform
class sklearn.decomposition.FastICA(n_components=None, *, algorithm='parallel', whiten=True, fun='logcosh', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None) [source] FastICA: a fast algorithm for Independent Component Analysis. Read more in the User Guide. Parameters n_componentsint, defau...
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA
sklearn.decomposition.fastica(X, n_components=None, *, algorithm='parallel', whiten=True, fun='logcosh', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None, return_X_mean=False, compute_sources=True, return_n_iter=False) [source] Perform Fast Independent Component Analysis. Read more in the User ...
sklearn.modules.generated.fastica-function#sklearn.decomposition.fastica
sklearn.decomposition.FastICA class sklearn.decomposition.FastICA(n_components=None, *, algorithm='parallel', whiten=True, fun='logcosh', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None) [source] FastICA: a fast algorithm for Independent Component Analysis. Read more in the User Guide. Para...
sklearn.modules.generated.sklearn.decomposition.fastica
fit(X, y=None) [source] Fit the model to X. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Returns self
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.fit
fit_transform(X, y=None) [source] Fit the model and recover the sources from X. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Returns X_newndarray of shape (n_samples, n_components)
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.get_params
inverse_transform(X, copy=True) [source] Transform the sources back to the mixed data (apply mixing matrix). Parameters Xarray-like of shape (n_samples, n_components) Sources, where n_samples is the number of samples and n_components is the number of components. copybool, default=True If False, data passed ...
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.inverse_transform
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.set_params
transform(X, copy=True) [source] Recover the sources from X (apply the unmixing matrix). Parameters Xarray-like of shape (n_samples, n_features) Data to transform, where n_samples is the number of samples and n_features is the number of features. copybool, default=True If False, data passed to fit can be ov...
sklearn.modules.generated.sklearn.decomposition.fastica#sklearn.decomposition.FastICA.transform
class sklearn.decomposition.IncrementalPCA(n_components=None, *, whiten=False, copy=True, batch_size=None) [source] Incremental principal components analysis (IPCA). Linear dimensionality reduction using Singular Value Decomposition of the data, keeping only the most significant singular vectors to project the data t...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA
sklearn.decomposition.IncrementalPCA class sklearn.decomposition.IncrementalPCA(n_components=None, *, whiten=False, copy=True, batch_size=None) [source] Incremental principal components analysis (IPCA). Linear dimensionality reduction using Singular Value Decomposition of the data, keeping only the most significant...
sklearn.modules.generated.sklearn.decomposition.incrementalpca
fit(X, y=None) [source] Fit the model with X, using minibatches of size batch_size. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instanc...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.fit_transform
get_covariance() [source] Compute data covariance with the generative model. cov = components_.T * S**2 * components_ + sigma2 * eye(n_features) where S**2 contains the explained variances, and sigma2 contains the noise variances. Returns covarray, shape=(n_features, n_features) Estimated covariance of data.
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.get_covariance
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.get_params
get_precision() [source] Compute data precision matrix with the generative model. Equals the inverse of the covariance but computed with the matrix inversion lemma for efficiency. Returns precisionarray, shape=(n_features, n_features) Estimated precision of data.
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.get_precision
inverse_transform(X) [source] Transform data back to its original space. In other words, return an input X_original whose transform would be X. Parameters Xarray-like, shape (n_samples, n_components) New data, where n_samples is the number of samples and n_components is the number of components. Returns X_...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.inverse_transform
partial_fit(X, y=None, check_input=True) [source] Incremental fit with X. All of X is processed as a single batch. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. check_inputbool, default=True Run check...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.partial_fit
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.set_params
transform(X) [source] Apply dimensionality reduction to X. X is projected on the first principal components previously extracted from a training set, using minibatches of size batch_size if X is sparse. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) New data, where n_samples is the num...
sklearn.modules.generated.sklearn.decomposition.incrementalpca#sklearn.decomposition.IncrementalPCA.transform
class sklearn.decomposition.KernelPCA(n_components=None, *, kernel='linear', gamma=None, degree=3, coef0=1, kernel_params=None, alpha=1.0, fit_inverse_transform=False, eigen_solver='auto', tol=0, max_iter=None, remove_zero_eig=False, random_state=None, copy_X=True, n_jobs=None) [source] Kernel Principal component ana...
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA
sklearn.decomposition.KernelPCA class sklearn.decomposition.KernelPCA(n_components=None, *, kernel='linear', gamma=None, degree=3, coef0=1, kernel_params=None, alpha=1.0, fit_inverse_transform=False, eigen_solver='auto', tol=0, max_iter=None, remove_zero_eig=False, random_state=None, copy_X=True, n_jobs=None) [source...
sklearn.modules.generated.sklearn.decomposition.kernelpca
fit(X, y=None) [source] Fit the model from data in X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. Returns selfobject Returns the instance itself.
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.fit
fit_transform(X, y=None, **params) [source] Fit the model from data in X and transform X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. Returns X_newndarray of shape (n_samples, n...
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.get_params
inverse_transform(X) [source] Transform X back to original space. Parameters X{array-like, sparse matrix} of shape (n_samples, n_components) Returns X_newndarray of shape (n_samples, n_features) References “Learning to Find Pre-Images”, G BakIr et al, 2004.
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.inverse_transform
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.set_params
transform(X) [source] Transform X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Returns X_newndarray of shape (n_samples, n_components)
sklearn.modules.generated.sklearn.decomposition.kernelpca#sklearn.decomposition.KernelPCA.transform
class sklearn.decomposition.LatentDirichletAllocation(n_components=10, *, doc_topic_prior=None, topic_word_prior=None, learning_method='batch', learning_decay=0.7, learning_offset=10.0, max_iter=10, batch_size=128, evaluate_every=- 1, total_samples=1000000.0, perp_tol=0.1, mean_change_tol=0.001, max_doc_update_iter=100...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation
sklearn.decomposition.LatentDirichletAllocation class sklearn.decomposition.LatentDirichletAllocation(n_components=10, *, doc_topic_prior=None, topic_word_prior=None, learning_method='batch', learning_decay=0.7, learning_offset=10.0, max_iter=10, batch_size=128, evaluate_every=- 1, total_samples=1000000.0, perp_tol=0...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation
fit(X, y=None) [source] Learn model for the data X with variational Bayes method. When learning_method is ‘online’, use mini-batch update. Otherwise, use batch update. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document word matrix. yIgnored Returns self
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.get_params
partial_fit(X, y=None) [source] Online VB with Mini-Batch update. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document word matrix. yIgnored Returns self
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.partial_fit
perplexity(X, sub_sampling=False) [source] Calculate approximate perplexity for data X. Perplexity is defined as exp(-1. * log-likelihood per word) Changed in version 0.19: doc_topic_distr argument has been deprecated and is ignored because user no longer has access to unnormalized distribution Parameters X{arr...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.perplexity
score(X, y=None) [source] Calculate approximate log-likelihood as score. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document word matrix. yIgnored Returns scorefloat Use approximate bound as score.
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.score
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.set_params
transform(X) [source] Transform data X according to the fitted model. Changed in version 0.18: doc_topic_distr is now normalized Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Document word matrix. Returns doc_topic_distrndarray of shape (n_samples, n_components) Document top...
sklearn.modules.generated.sklearn.decomposition.latentdirichletallocation#sklearn.decomposition.LatentDirichletAllocation.transform
class sklearn.decomposition.MiniBatchDictionaryLearning(n_components=None, *, alpha=1, n_iter=1000, fit_algorithm='lars', n_jobs=None, batch_size=3, shuffle=True, dict_init=None, transform_algorithm='omp', transform_n_nonzero_coefs=None, transform_alpha=None, verbose=False, split_sign=False, random_state=None, positive...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning
sklearn.decomposition.MiniBatchDictionaryLearning class sklearn.decomposition.MiniBatchDictionaryLearning(n_components=None, *, alpha=1, n_iter=1000, fit_algorithm='lars', n_jobs=None, batch_size=3, shuffle=True, dict_init=None, transform_algorithm='omp', transform_n_nonzero_coefs=None, transform_alpha=None, verbose=...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning
fit(X, y=None) [source] Fit the model from data in X. Parameters Xarray-like of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instance itself.
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.get_params
partial_fit(X, y=None, iter_offset=None) [source] Updates the model using the data in X as a mini-batch. Parameters Xarray-like of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. yIgnored iter_offsetint, default=None The num...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.partial_fit
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.set_params
transform(X) [source] Encode the data as a sparse combination of the dictionary atoms. Coding method is determined by the object parameter transform_algorithm. Parameters Xndarray of shape (n_samples, n_features) Test data to be transformed, must have the same number of features as the data used to train the mo...
sklearn.modules.generated.sklearn.decomposition.minibatchdictionarylearning#sklearn.decomposition.MiniBatchDictionaryLearning.transform
class sklearn.decomposition.MiniBatchSparsePCA(n_components=None, *, alpha=1, ridge_alpha=0.01, n_iter=100, callback=None, batch_size=3, verbose=False, shuffle=True, n_jobs=None, method='lars', random_state=None) [source] Mini-batch Sparse Principal Components Analysis Finds the set of sparse components that can opti...
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA
sklearn.decomposition.MiniBatchSparsePCA class sklearn.decomposition.MiniBatchSparsePCA(n_components=None, *, alpha=1, ridge_alpha=0.01, n_iter=100, callback=None, batch_size=3, verbose=False, shuffle=True, n_jobs=None, method='lars', random_state=None) [source] Mini-batch Sparse Principal Components Analysis Finds...
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca
fit(X, y=None) [source] Fit the model from data in X. Parameters Xarray-like of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instance itself.
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA.get_params
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA.set_params
transform(X) [source] Least Squares projection of the data onto the sparse components. To avoid instability issues in case the system is under-determined, regularization can be applied (Ridge regression) via the ridge_alpha parameter. Note that Sparse PCA components orthogonality is not enforced as in PCA hence one c...
sklearn.modules.generated.sklearn.decomposition.minibatchsparsepca#sklearn.decomposition.MiniBatchSparsePCA.transform
class sklearn.decomposition.NMF(n_components=None, *, init='warn', solver='cd', beta_loss='frobenius', tol=0.0001, max_iter=200, random_state=None, alpha=0.0, l1_ratio=0.0, verbose=0, shuffle=False, regularization='both') [source] Non-Negative Matrix Factorization (NMF). Find two non-negative matrices (W, H) whose pr...
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF
sklearn.decomposition.NMF class sklearn.decomposition.NMF(n_components=None, *, init='warn', solver='cd', beta_loss='frobenius', tol=0.0001, max_iter=200, random_state=None, alpha=0.0, l1_ratio=0.0, verbose=0, shuffle=False, regularization='both') [source] Non-Negative Matrix Factorization (NMF). Find two non-negat...
sklearn.modules.generated.sklearn.decomposition.nmf
fit(X, y=None, **params) [source] Learn a NMF model for the data X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Data matrix to be decomposed yIgnored Returns self
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.fit
fit_transform(X, y=None, W=None, H=None) [source] Learn a NMF model for the data X and returns the transformed data. This is more efficient than calling fit followed by transform. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Data matrix to be decomposed yIgnored Warray-like of sh...
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.get_params
inverse_transform(W) [source] Transform data back to its original space. Parameters W{ndarray, sparse matrix} of shape (n_samples, n_components) Transformed data matrix. Returns X{ndarray, sparse matrix} of shape (n_samples, n_features) Data matrix of original shape. New in version 0.18: ..
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.inverse_transform
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.set_params
transform(X) [source] Transform the data X according to the fitted NMF model. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Data matrix to be transformed by the model. Returns Wndarray of shape (n_samples, n_components) Transformed data.
sklearn.modules.generated.sklearn.decomposition.nmf#sklearn.decomposition.NMF.transform
sklearn.decomposition.non_negative_factorization(X, W=None, H=None, n_components=None, *, init='warn', update_H=True, solver='cd', beta_loss='frobenius', tol=0.0001, max_iter=200, alpha=0.0, l1_ratio=0.0, regularization=None, random_state=None, verbose=0, shuffle=False) [source] Compute Non-negative Matrix Factorizat...
sklearn.modules.generated.sklearn.decomposition.non_negative_factorization#sklearn.decomposition.non_negative_factorization
class sklearn.decomposition.PCA(n_components=None, *, copy=True, whiten=False, svd_solver='auto', tol=0.0, iterated_power='auto', random_state=None) [source] Principal component analysis (PCA). Linear dimensionality reduction using Singular Value Decomposition of the data to project it to a lower dimensional space. T...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA
sklearn.decomposition.PCA class sklearn.decomposition.PCA(n_components=None, *, copy=True, whiten=False, svd_solver='auto', tol=0.0, iterated_power='auto', random_state=None) [source] Principal component analysis (PCA). Linear dimensionality reduction using Singular Value Decomposition of the data to project it to ...
sklearn.modules.generated.sklearn.decomposition.pca
fit(X, y=None) [source] Fit the model with X. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instance itself.
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.fit
fit_transform(X, y=None) [source] Fit the model with X and apply the dimensionality reduction on X. Parameters Xarray-like of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features. yIgnored Returns X_newndarray of shape (n_samples,...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.fit_transform
get_covariance() [source] Compute data covariance with the generative model. cov = components_.T * S**2 * components_ + sigma2 * eye(n_features) where S**2 contains the explained variances, and sigma2 contains the noise variances. Returns covarray, shape=(n_features, n_features) Estimated covariance of data.
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.get_covariance
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.get_params
get_precision() [source] Compute data precision matrix with the generative model. Equals the inverse of the covariance but computed with the matrix inversion lemma for efficiency. Returns precisionarray, shape=(n_features, n_features) Estimated precision of data.
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.get_precision
inverse_transform(X) [source] Transform data back to its original space. In other words, return an input X_original whose transform would be X. Parameters Xarray-like, shape (n_samples, n_components) New data, where n_samples is the number of samples and n_components is the number of components. Returns X_...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.inverse_transform
score(X, y=None) [source] Return the average log-likelihood of all samples. See. “Pattern Recognition and Machine Learning” by C. Bishop, 12.2.1 p. 574 or http://www.miketipping.com/papers/met-mppca.pdf Parameters Xarray-like of shape (n_samples, n_features) The data. yIgnored Returns llfloat Average ...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.score
score_samples(X) [source] Return the log-likelihood of each sample. See. “Pattern Recognition and Machine Learning” by C. Bishop, 12.2.1 p. 574 or http://www.miketipping.com/papers/met-mppca.pdf Parameters Xarray-like of shape (n_samples, n_features) The data. Returns llndarray of shape (n_samples,) Log...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.score_samples
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.set_params
transform(X) [source] Apply dimensionality reduction to X. X is projected on the first principal components previously extracted from a training set. Parameters Xarray-like, shape (n_samples, n_features) New data, where n_samples is the number of samples and n_features is the number of features. Returns X...
sklearn.modules.generated.sklearn.decomposition.pca#sklearn.decomposition.PCA.transform
class sklearn.decomposition.SparseCoder(dictionary, *, transform_algorithm='omp', transform_n_nonzero_coefs=None, transform_alpha=None, split_sign=False, n_jobs=None, positive_code=False, transform_max_iter=1000) [source] Sparse coding Finds a sparse representation of data against a fixed, precomputed dictionary. Eac...
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder
sklearn.decomposition.SparseCoder class sklearn.decomposition.SparseCoder(dictionary, *, transform_algorithm='omp', transform_n_nonzero_coefs=None, transform_alpha=None, split_sign=False, n_jobs=None, positive_code=False, transform_max_iter=1000) [source] Sparse coding Finds a sparse representation of data against ...
sklearn.modules.generated.sklearn.decomposition.sparsecoder
fit(X, y=None) [source] Do nothing and return the estimator unchanged. This method is just there to implement the usual API and hence work in pipelines. Parameters XIgnored yIgnored Returns selfobject
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder.get_params
set_params(**params) [source] Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters **paramsdict Es...
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder.set_params
transform(X, y=None) [source] Encode the data as a sparse combination of the dictionary atoms. Coding method is determined by the object parameter transform_algorithm. Parameters Xndarray of shape (n_samples, n_features) Test data to be transformed, must have the same number of features as the data used to trai...
sklearn.modules.generated.sklearn.decomposition.sparsecoder#sklearn.decomposition.SparseCoder.transform
class sklearn.decomposition.SparsePCA(n_components=None, *, alpha=1, ridge_alpha=0.01, max_iter=1000, tol=1e-08, method='lars', n_jobs=None, U_init=None, V_init=None, verbose=False, random_state=None) [source] Sparse Principal Components Analysis (SparsePCA). Finds the set of sparse components that can optimally reco...
sklearn.modules.generated.sklearn.decomposition.sparsepca#sklearn.decomposition.SparsePCA
sklearn.decomposition.SparsePCA class sklearn.decomposition.SparsePCA(n_components=None, *, alpha=1, ridge_alpha=0.01, max_iter=1000, tol=1e-08, method='lars', n_jobs=None, U_init=None, V_init=None, verbose=False, random_state=None) [source] Sparse Principal Components Analysis (SparsePCA). Finds the set of sparse ...
sklearn.modules.generated.sklearn.decomposition.sparsepca
fit(X, y=None) [source] Fit the model from data in X. Parameters Xarray-like of shape (n_samples, n_features) Training vector, where n_samples in the number of samples and n_features is the number of features. yIgnored Returns selfobject Returns the instance itself.
sklearn.modules.generated.sklearn.decomposition.sparsepca#sklearn.decomposition.SparsePCA.fit
fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.decomposition.sparsepca#sklearn.decomposition.SparsePCA.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns paramsdict Parameter names mapped to their values.
sklearn.modules.generated.sklearn.decomposition.sparsepca#sklearn.decomposition.SparsePCA.get_params