doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
class sklearn.neighbors.NearestCentroid(metric='euclidean', *, shrink_threshold=None) [source] Nearest centroid classifier. Each class is represented by its centroid, with test samples classified to the class with the nearest centroid. Read more in the User Guide. Parameters metricstr or callable The metric to ...
sklearn.modules.generated.sklearn.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid
sklearn.neighbors.NearestCentroid class sklearn.neighbors.NearestCentroid(metric='euclidean', *, shrink_threshold=None) [source] Nearest centroid classifier. Each class is represented by its centroid, with test samples classified to the class with the nearest centroid. Read more in the User Guide. Parameters me...
sklearn.modules.generated.sklearn.neighbors.nearestcentroid
fit(X, y) [source] Fit the NearestCentroid model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. Note that centroid shrinking cannot be used with spa...
sklearn.modules.generated.sklearn.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid.fit
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.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid.get_params
predict(X) [source] Perform classification on an array of test vectors X. The predicted class C for each sample in X is returned. Parameters Xarray-like of shape (n_samples, n_features) Returns Cndarray of shape (n_samples,) Notes If the metric constructor parameter is “precomputed”, X is assumed to be ...
sklearn.modules.generated.sklearn.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid.predict
score(X, y, sample_weight=None) [source] Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters Xarray-like of shape (n_samples, n_featur...
sklearn.modules.generated.sklearn.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid.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.neighbors.nearestcentroid#sklearn.neighbors.NearestCentroid.set_params
class sklearn.neighbors.NearestNeighbors(*, n_neighbors=5, radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, n_jobs=None) [source] Unsupervised learner for implementing neighbor searches. Read more in the User Guide. New in version 0.9. Parameters n_neighborsint, default=5...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors
sklearn.neighbors.NearestNeighbors class sklearn.neighbors.NearestNeighbors(*, n_neighbors=5, radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, n_jobs=None) [source] Unsupervised learner for implementing neighbor searches. Read more in the User Guide. New in version 0.9. Pa...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors
fit(X, y=None) [source] Fit the nearest neighbors estimator from the training dataset. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) if metric=’precomputed’ Training data. yIgnored Not used, present for API consistency by convention. Returns selfNea...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.fit
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.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.get_params
kneighbors(X=None, n_neighbors=None, return_distance=True) [source] Finds the K-neighbors of a point. Returns indices of and distances to the neighbors of each point. Parameters Xarray-like, shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’, default=None The query point or poin...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.kneighbors
kneighbors_graph(X=None, n_neighbors=None, mode='connectivity') [source] Computes the (weighted) graph of k-Neighbors for points in X Parameters Xarray-like of shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’, default=None The query point or points. If not provided, neighbors ...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.kneighbors_graph
radius_neighbors(X=None, radius=None, return_distance=True, sort_results=False) [source] Finds the neighbors within a given radius of a point or points. Return the indices and distances of each point from the dataset lying in a ball with size radius around the points of the query array. Points lying on the boundary a...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.radius_neighbors
radius_neighbors_graph(X=None, radius=None, mode='connectivity', sort_results=False) [source] Computes the (weighted) graph of Neighbors for points in X Neighborhoods are restricted the points at a distance lower than radius. Parameters Xarray-like of shape (n_samples, n_features), default=None The query point ...
sklearn.modules.generated.sklearn.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.radius_neighbors_graph
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.neighbors.nearestneighbors#sklearn.neighbors.NearestNeighbors.set_params
class sklearn.neighbors.NeighborhoodComponentsAnalysis(n_components=None, *, init='auto', warm_start=False, max_iter=50, tol=1e-05, callback=None, verbose=0, random_state=None) [source] Neighborhood Components Analysis Neighborhood Component Analysis (NCA) is a machine learning algorithm for metric learning. It learn...
sklearn.modules.generated.sklearn.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis
sklearn.neighbors.NeighborhoodComponentsAnalysis class sklearn.neighbors.NeighborhoodComponentsAnalysis(n_components=None, *, init='auto', warm_start=False, max_iter=50, tol=1e-05, callback=None, verbose=0, random_state=None) [source] Neighborhood Components Analysis Neighborhood Component Analysis (NCA) is a machi...
sklearn.modules.generated.sklearn.neighbors.neighborhoodcomponentsanalysis
fit(X, y) [source] Fit the model according to the given training data. Parameters Xarray-like of shape (n_samples, n_features) The training samples. yarray-like of shape (n_samples,) The corresponding training labels. Returns selfobject returns a trained NeighborhoodComponentsAnalysis model.
sklearn.modules.generated.sklearn.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis.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.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis.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.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis.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.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis.set_params
transform(X) [source] Applies the learned transformation to the given data. Parameters Xarray-like of shape (n_samples, n_features) Data samples. Returns X_embedded: ndarray of shape (n_samples, n_components) The data samples transformed. Raises NotFittedError If fit has not been called before.
sklearn.modules.generated.sklearn.neighbors.neighborhoodcomponentsanalysis#sklearn.neighbors.NeighborhoodComponentsAnalysis.transform
class sklearn.neighbors.RadiusNeighborsClassifier(radius=1.0, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', outlier_label=None, metric_params=None, n_jobs=None, **kwargs) [source] Classifier implementing a vote among neighbors within a given radius Read more in the User Guide. Parame...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier
sklearn.neighbors.RadiusNeighborsClassifier class sklearn.neighbors.RadiusNeighborsClassifier(radius=1.0, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', outlier_label=None, metric_params=None, n_jobs=None, **kwargs) [source] Classifier implementing a vote among neighbors within a giv...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier
fit(X, y) [source] Fit the radius neighbors classifier from the training dataset. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) if metric=’precomputed’ Training data. y{array-like, sparse matrix} of shape (n_samples,) or (n_samples, n_outputs) Target valu...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.fit
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.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.get_params
predict(X) [source] Predict the class labels for the provided data. Parameters Xarray-like of shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’ Test samples. Returns yndarray of shape (n_queries,) or (n_queries, n_outputs) Class labels for each data sample.
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.predict
predict_proba(X) [source] Return probability estimates for the test data X. Parameters Xarray-like of shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’ Test samples. Returns pndarray of shape (n_queries, n_classes), or a list of n_outputs of such arrays if n_outputs > 1...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.predict_proba
radius_neighbors(X=None, radius=None, return_distance=True, sort_results=False) [source] Finds the neighbors within a given radius of a point or points. Return the indices and distances of each point from the dataset lying in a ball with size radius around the points of the query array. Points lying on the boundary a...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.radius_neighbors
radius_neighbors_graph(X=None, radius=None, mode='connectivity', sort_results=False) [source] Computes the (weighted) graph of Neighbors for points in X Neighborhoods are restricted the points at a distance lower than radius. Parameters Xarray-like of shape (n_samples, n_features), default=None The query point ...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.radius_neighbors_graph
score(X, y, sample_weight=None) [source] Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters Xarray-like of shape (n_samples, n_featur...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.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.neighbors.radiusneighborsclassifier#sklearn.neighbors.RadiusNeighborsClassifier.set_params
class sklearn.neighbors.RadiusNeighborsRegressor(radius=1.0, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None, n_jobs=None, **kwargs) [source] Regression based on neighbors within a fixed radius. The target is predicted by local interpolation of the targets associated ...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor
sklearn.neighbors.RadiusNeighborsRegressor class sklearn.neighbors.RadiusNeighborsRegressor(radius=1.0, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None, n_jobs=None, **kwargs) [source] Regression based on neighbors within a fixed radius. The target is predicted by l...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor
fit(X, y) [source] Fit the radius neighbors regressor from the training dataset. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) if metric=’precomputed’ Training data. y{array-like, sparse matrix} of shape (n_samples,) or (n_samples, n_outputs) Target value...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.fit
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.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.get_params
predict(X) [source] Predict the target for the provided data Parameters Xarray-like of shape (n_queries, n_features), or (n_queries, n_indexed) if metric == ‘precomputed’ Test samples. Returns yndarray of shape (n_queries,) or (n_queries, n_outputs), dtype=double Target values.
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.predict
radius_neighbors(X=None, radius=None, return_distance=True, sort_results=False) [source] Finds the neighbors within a given radius of a point or points. Return the indices and distances of each point from the dataset lying in a ball with size radius around the points of the query array. Points lying on the boundary a...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.radius_neighbors
radius_neighbors_graph(X=None, radius=None, mode='connectivity', sort_results=False) [source] Computes the (weighted) graph of Neighbors for points in X Neighborhoods are restricted the points at a distance lower than radius. Parameters Xarray-like of shape (n_samples, n_features), default=None The query point ...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.radius_neighbors_graph
score(X, y, sample_weight=None) [source] Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred) ** 2).sum() and \(v\) is the total sum of squares ((y_true - y_true.mean()) ** 2).sum()...
sklearn.modules.generated.sklearn.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.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.neighbors.radiusneighborsregressor#sklearn.neighbors.RadiusNeighborsRegressor.set_params
class sklearn.neighbors.RadiusNeighborsTransformer(*, mode='distance', radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, n_jobs=1) [source] Transform X into a (weighted) graph of neighbors nearer than a radius The transformed data is a sparse graph as returned by radius_neighbor...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer
sklearn.neighbors.RadiusNeighborsTransformer class sklearn.neighbors.RadiusNeighborsTransformer(*, mode='distance', radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, n_jobs=1) [source] Transform X into a (weighted) graph of neighbors nearer than a radius The transformed data i...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer
fit(X, y=None) [source] Fit the radius neighbors transformer from the training dataset. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) if metric=’precomputed’ Training data. Returns selfRadiusNeighborsTransformer The fitted radius neighbors transformer...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.fit
fit_transform(X, y=None) [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) Training set. yignored Returns Xtsparse matrix of shape (n_samples, n_samples)...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.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.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.get_params
radius_neighbors(X=None, radius=None, return_distance=True, sort_results=False) [source] Finds the neighbors within a given radius of a point or points. Return the indices and distances of each point from the dataset lying in a ball with size radius around the points of the query array. Points lying on the boundary a...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.radius_neighbors
radius_neighbors_graph(X=None, radius=None, mode='connectivity', sort_results=False) [source] Computes the (weighted) graph of Neighbors for points in X Neighborhoods are restricted the points at a distance lower than radius. Parameters Xarray-like of shape (n_samples, n_features), default=None The query point ...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.radius_neighbors_graph
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.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.set_params
transform(X) [source] Computes the (weighted) graph of Neighbors for points in X Parameters Xarray-like of shape (n_samples_transform, n_features) Sample data Returns Xtsparse matrix of shape (n_samples_transform, n_samples_fit) Xt[i, j] is assigned the weight of edge that connects i to j. Only the neig...
sklearn.modules.generated.sklearn.neighbors.radiusneighborstransformer#sklearn.neighbors.RadiusNeighborsTransformer.transform
sklearn.neighbors.radius_neighbors_graph(X, radius, *, mode='connectivity', metric='minkowski', p=2, metric_params=None, include_self=False, n_jobs=None) [source] Computes the (weighted) graph of Neighbors for points in X Neighborhoods are restricted the points at a distance lower than radius. Read more in the User G...
sklearn.modules.generated.sklearn.neighbors.radius_neighbors_graph#sklearn.neighbors.radius_neighbors_graph
class sklearn.neural_network.BernoulliRBM(n_components=256, *, learning_rate=0.1, batch_size=10, n_iter=10, verbose=0, random_state=None) [source] Bernoulli Restricted Boltzmann Machine (RBM). A Restricted Boltzmann Machine with binary visible units and binary hidden units. Parameters are estimated using Stochastic M...
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM
sklearn.neural_network.BernoulliRBM class sklearn.neural_network.BernoulliRBM(n_components=256, *, learning_rate=0.1, batch_size=10, n_iter=10, verbose=0, random_state=None) [source] Bernoulli Restricted Boltzmann Machine (RBM). A Restricted Boltzmann Machine with binary visible units and binary hidden units. Param...
sklearn.modules.generated.sklearn.neural_network.bernoullirbm
fit(X, y=None) [source] Fit the model to the data X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training data. Returns selfBernoulliRBM The fitted model.
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.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.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.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.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.get_params
gibbs(v) [source] Perform one Gibbs sampling step. Parameters vndarray of shape (n_samples, n_features) Values of the visible layer to start from. Returns v_newndarray of shape (n_samples, n_features) Values of the visible layer after one Gibbs step.
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.gibbs
partial_fit(X, y=None) [source] Fit the model to the data X which should contain a partial segment of the data. Parameters Xndarray of shape (n_samples, n_features) Training data. Returns selfBernoulliRBM The fitted model.
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.partial_fit
score_samples(X) [source] Compute the pseudo-likelihood of X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Values of the visible layer. Must be all-boolean (not checked). Returns pseudo_likelihoodndarray of shape (n_samples,) Value of the pseudo-likelihood (proxy for likeliho...
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.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.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.set_params
transform(X) [source] Compute the hidden layer activation probabilities, P(h=1|v=X). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The data to be transformed. Returns hndarray of shape (n_samples, n_components) Latent representations of the data.
sklearn.modules.generated.sklearn.neural_network.bernoullirbm#sklearn.neural_network.BernoulliRBM.transform
class sklearn.neural_network.MLPClassifier(hidden_layer_sizes=100, activation='relu', *, solver='adam', alpha=0.0001, batch_size='auto', learning_rate='constant', learning_rate_init=0.001, power_t=0.5, max_iter=200, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_start=False, momentum=0.9, nesterovs_mo...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier
sklearn.neural_network.MLPClassifier class sklearn.neural_network.MLPClassifier(hidden_layer_sizes=100, activation='relu', *, solver='adam', alpha=0.0001, batch_size='auto', learning_rate='constant', learning_rate_init=0.001, power_t=0.5, max_iter=200, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier
fit(X, y) [source] Fit the model to data matrix X and target(s) y. Parameters Xndarray or sparse matrix of shape (n_samples, n_features) The input data. yndarray of shape (n_samples,) or (n_samples, n_outputs) The target values (class labels in classification, real numbers in regression). Returns self...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.fit
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.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.get_params
property partial_fit Update the model with a single iteration over the given data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input data. yarray-like of shape (n_samples,) The target values. classesarray of shape (n_classes,), default=None Classes across all calls to pa...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.partial_fit
predict(X) [source] Predict using the multi-layer perceptron classifier Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input data. Returns yndarray, shape (n_samples,) or (n_samples, n_classes) The predicted classes.
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.predict
predict_log_proba(X) [source] Return the log of probability estimates. Parameters Xndarray of shape (n_samples, n_features) The input data. Returns log_y_probndarray of shape (n_samples, n_classes) The predicted log-probability of the sample for each class in the model, where classes are ordered as they...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.predict_log_proba
predict_proba(X) [source] Probability estimates. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input data. Returns y_probndarray of shape (n_samples, n_classes) The predicted probability of the sample for each class in the model, where classes are ordered as they are in se...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.predict_proba
score(X, y, sample_weight=None) [source] Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters Xarray-like of shape (n_samples, n_featur...
sklearn.modules.generated.sklearn.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.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.neural_network.mlpclassifier#sklearn.neural_network.MLPClassifier.set_params
class sklearn.neural_network.MLPRegressor(hidden_layer_sizes=100, activation='relu', *, solver='adam', alpha=0.0001, batch_size='auto', learning_rate='constant', learning_rate_init=0.001, power_t=0.5, max_iter=200, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_start=False, momentum=0.9, nesterovs_mom...
sklearn.modules.generated.sklearn.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor
sklearn.neural_network.MLPRegressor class sklearn.neural_network.MLPRegressor(hidden_layer_sizes=100, activation='relu', *, solver='adam', alpha=0.0001, batch_size='auto', learning_rate='constant', learning_rate_init=0.001, power_t=0.5, max_iter=200, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_st...
sklearn.modules.generated.sklearn.neural_network.mlpregressor
fit(X, y) [source] Fit the model to data matrix X and target(s) y. Parameters Xndarray or sparse matrix of shape (n_samples, n_features) The input data. yndarray of shape (n_samples,) or (n_samples, n_outputs) The target values (class labels in classification, real numbers in regression). Returns self...
sklearn.modules.generated.sklearn.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.fit
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.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.get_params
property partial_fit Update the model with a single iteration over the given data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input data. yndarray of shape (n_samples,) The target values. Returns selfreturns a trained MLP model.
sklearn.modules.generated.sklearn.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.partial_fit
predict(X) [source] Predict using the multi-layer perceptron model. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input data. Returns yndarray of shape (n_samples, n_outputs) The predicted values.
sklearn.modules.generated.sklearn.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.predict
score(X, y, sample_weight=None) [source] Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred) ** 2).sum() and \(v\) is the total sum of squares ((y_true - y_true.mean()) ** 2).sum()...
sklearn.modules.generated.sklearn.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.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.neural_network.mlpregressor#sklearn.neural_network.MLPRegressor.set_params
class sklearn.pipeline.FeatureUnion(transformer_list, *, n_jobs=None, transformer_weights=None, verbose=False) [source] Concatenates results of multiple transformer objects. This estimator applies a list of transformer objects in parallel to the input data, then concatenates the results. This is useful to combine sev...
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion
sklearn.pipeline.FeatureUnion class sklearn.pipeline.FeatureUnion(transformer_list, *, n_jobs=None, transformer_weights=None, verbose=False) [source] Concatenates results of multiple transformer objects. This estimator applies a list of transformer objects in parallel to the input data, then concatenates the result...
sklearn.modules.generated.sklearn.pipeline.featureunion
fit(X, y=None, **fit_params) [source] Fit all transformers using X. Parameters Xiterable or array-like, depending on transformers Input data, used to fit transformers. yarray-like of shape (n_samples, n_outputs), default=None Targets for supervised learning. Returns selfFeatureUnion This estimator
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.fit
fit_transform(X, y=None, **fit_params) [source] Fit all transformers, transform the data and concatenate results. Parameters Xiterable or array-like, depending on transformers Input data to be transformed. yarray-like of shape (n_samples, n_outputs), default=None Targets for supervised learning. Returns ...
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.fit_transform
get_feature_names() [source] Get feature names from all transformers. Returns feature_nameslist of strings Names of the features produced by transform.
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.get_feature_names
get_params(deep=True) [source] Get parameters for this estimator. Returns the parameters given in the constructor as well as the estimators contained within the transformer_list of the FeatureUnion. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects...
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.get_params
set_params(**kwargs) [source] Set the parameters of this estimator. Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained in tranformer_list. Returns self
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.set_params
transform(X) [source] Transform X separately by each transformer, concatenate results. Parameters Xiterable or array-like, depending on transformers Input data to be transformed. Returns X_tarray-like or sparse matrix of shape (n_samples, sum_n_components) hstack of results of transformers. sum_n_compon...
sklearn.modules.generated.sklearn.pipeline.featureunion#sklearn.pipeline.FeatureUnion.transform
sklearn.pipeline.make_pipeline(*steps, memory=None, verbose=False) [source] Construct a Pipeline from the given estimators. This is a shorthand for the Pipeline constructor; it does not require, and does not permit, naming the estimators. Instead, their names will be set to the lowercase of their types automatically....
sklearn.modules.generated.sklearn.pipeline.make_pipeline#sklearn.pipeline.make_pipeline
sklearn.pipeline.make_union(*transformers, n_jobs=None, verbose=False) [source] Construct a FeatureUnion from the given transformers. This is a shorthand for the FeatureUnion constructor; it does not require, and does not permit, naming the transformers. Instead, they will be given names automatically based on their ...
sklearn.modules.generated.sklearn.pipeline.make_union#sklearn.pipeline.make_union
class sklearn.pipeline.Pipeline(steps, *, memory=None, verbose=False) [source] Pipeline of transforms with a final estimator. Sequentially apply a list of transforms and a final estimator. Intermediate steps of the pipeline must be ‘transforms’, that is, they must implement fit and transform methods. The final estima...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline
sklearn.pipeline.Pipeline class sklearn.pipeline.Pipeline(steps, *, memory=None, verbose=False) [source] Pipeline of transforms with a final estimator. Sequentially apply a list of transforms and a final estimator. Intermediate steps of the pipeline must be ‘transforms’, that is, they must implement fit and transfo...
sklearn.modules.generated.sklearn.pipeline.pipeline
decision_function(X) [source] Apply transforms, and decision_function of the final estimator Parameters Xiterable Data to predict on. Must fulfill input requirements of first step of the pipeline. Returns y_scorearray-like of shape (n_samples, n_classes)
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.decision_function
fit(X, y=None, **fit_params) [source] Fit the model Fit all the transforms one after the other and transform the data, then fit the transformed data using the final estimator. Parameters Xiterable Training data. Must fulfill input requirements of first step of the pipeline. yiterable, default=None Training ...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.fit
fit_predict(X, y=None, **fit_params) [source] Applies fit_predict of last step in pipeline after transforms. Applies fit_transforms of a pipeline to the data, followed by the fit_predict method of the final estimator in the pipeline. Valid only if the final estimator implements fit_predict. Parameters Xiterable ...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.fit_predict
fit_transform(X, y=None, **fit_params) [source] Fit the model and transform with the final estimator Fits all the transforms one after the other and transforms the data, then uses fit_transform on transformed data with the final estimator. Parameters Xiterable Training data. Must fulfill input requirements of f...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.fit_transform
get_params(deep=True) [source] Get parameters for this estimator. Returns the parameters given in the constructor as well as the estimators contained within the steps of the Pipeline. Parameters deepbool, default=True If True, will return the parameters for this estimator and contained subobjects that are estim...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.get_params
property inverse_transform Apply inverse transformations in reverse order All estimators in the pipeline must support inverse_transform. Parameters Xtarray-like of shape (n_samples, n_transformed_features) Data samples, where n_samples is the number of samples and n_features is the number of features. Must fulf...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.inverse_transform
predict(X, **predict_params) [source] Apply transforms to the data, and predict with the final estimator Parameters Xiterable Data to predict on. Must fulfill input requirements of first step of the pipeline. **predict_paramsdict of string -> object Parameters to the predict called at the end of all transfo...
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.predict
predict_log_proba(X) [source] Apply transforms, and predict_log_proba of the final estimator Parameters Xiterable Data to predict on. Must fulfill input requirements of first step of the pipeline. Returns y_scorearray-like of shape (n_samples, n_classes)
sklearn.modules.generated.sklearn.pipeline.pipeline#sklearn.pipeline.Pipeline.predict_log_proba