doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.svm.nusvr#sklearn.svm.NuSVR.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.svm.nusvr#sklearn.svm.NuSVR.set_params
class sklearn.svm.OneClassSVM(*, kernel='rbf', degree=3, gamma='scale', coef0=0.0, tol=0.001, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=- 1) [source] Unsupervised Outlier Detection. Estimate the support of a high-dimensional distribution. The implementation is based on libsvm. Read more in the U...
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM
sklearn.svm.OneClassSVM class sklearn.svm.OneClassSVM(*, kernel='rbf', degree=3, gamma='scale', coef0=0.0, tol=0.001, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=- 1) [source] Unsupervised Outlier Detection. Estimate the support of a high-dimensional distribution. The implementation is based on ...
sklearn.modules.generated.sklearn.svm.oneclasssvm
decision_function(X) [source] Signed distance to the separating hyperplane. Signed distance is positive for an inlier and negative for an outlier. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns decndarray of shape (n_samples,) Returns the decision function of the sample...
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM.decision_function
fit(X, y=None, sample_weight=None, **params) [source] Detects the soft boundary of the set of samples X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Set of samples, where n_samples is the number of samples and n_features is the number of features. sample_weightarray-like of shape ...
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM.fit
fit_predict(X, y=None) [source] Perform fit on X and returns labels for X. Returns -1 for outliers and 1 for inliers. Parameters X{array-like, sparse matrix, dataframe} of shape (n_samples, n_features) yIgnored Not used, present for API consistency by convention. Returns yndarray of shape (n_samples,) ...
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM.fit_predict
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.svm.oneclasssvm#sklearn.svm.OneClassSVM.get_params
predict(X) [source] Perform classification on samples in X. For a one-class model, +1 or -1 is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples_test, n_samples_train) For kernel=”precomputed”, the expected shape of X is (n_samples_test, n_samples_train). Return...
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM.predict
score_samples(X) [source] Raw scoring function of the samples. Parameters Xarray-like of shape (n_samples, n_features) The data matrix. Returns score_samplesndarray of shape (n_samples,) Returns the (unshifted) scoring function of the samples.
sklearn.modules.generated.sklearn.svm.oneclasssvm#sklearn.svm.OneClassSVM.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.svm.oneclasssvm#sklearn.svm.OneClassSVM.set_params
class sklearn.svm.SVC(*, C=1.0, kernel='rbf', degree=3, gamma='scale', coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=- 1, decision_function_shape='ovr', break_ties=False, random_state=None) [source] C-Support Vector Classification. The implementati...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC
sklearn.svm.SVC class sklearn.svm.SVC(*, C=1.0, kernel='rbf', degree=3, gamma='scale', coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=- 1, decision_function_shape='ovr', break_ties=False, random_state=None) [source] C-Support Vector Classification...
sklearn.modules.generated.sklearn.svm.svc
decision_function(X) [source] Evaluates the decision function for the samples in X. Parameters Xarray-like of shape (n_samples, n_features) Returns Xndarray of shape (n_samples, n_classes * (n_classes-1) / 2) Returns the decision function of the sample for each class in the model. If decision_function_sha...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC.decision_function
fit(X, y, sample_weight=None) [source] Fit the SVM model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) Training vectors, where n_samples is the number of samples and n_features is the number of features. For kernel=”preco...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC.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.svm.svc#sklearn.svm.SVC.get_params
predict(X) [source] Perform classification on samples in X. For an one-class model, +1 or -1 is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples_test, n_samples_train) For kernel=”precomputed”, the expected shape of X is (n_samples_test, n_samples_train). Retur...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC.predict
property predict_log_proba Compute log probabilities of possible outcomes for samples in X. The model need to have probability information computed at training time: fit with attribute probability set to True. Parameters Xarray-like of shape (n_samples, n_features) or (n_samples_test, n_samples_train) For kerne...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC.predict_log_proba
property predict_proba Compute probabilities of possible outcomes for samples in X. The model need to have probability information computed at training time: fit with attribute probability set to True. Parameters Xarray-like of shape (n_samples, n_features) For kernel=”precomputed”, the expected shape of X is (...
sklearn.modules.generated.sklearn.svm.svc#sklearn.svm.SVC.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.svm.svc#sklearn.svm.SVC.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.svm.svc#sklearn.svm.SVC.set_params
class sklearn.svm.SVR(*, kernel='rbf', degree=3, gamma='scale', coef0=0.0, tol=0.001, C=1.0, epsilon=0.1, shrinking=True, cache_size=200, verbose=False, max_iter=- 1) [source] Epsilon-Support Vector Regression. The free parameters in the model are C and epsilon. The implementation is based on libsvm. The fit time com...
sklearn.modules.generated.sklearn.svm.svr#sklearn.svm.SVR
sklearn.svm.SVR class sklearn.svm.SVR(*, kernel='rbf', degree=3, gamma='scale', coef0=0.0, tol=0.001, C=1.0, epsilon=0.1, shrinking=True, cache_size=200, verbose=False, max_iter=- 1) [source] Epsilon-Support Vector Regression. The free parameters in the model are C and epsilon. The implementation is based on libsvm...
sklearn.modules.generated.sklearn.svm.svr
fit(X, y, sample_weight=None) [source] Fit the SVM model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples) Training vectors, where n_samples is the number of samples and n_features is the number of features. For kernel=”preco...
sklearn.modules.generated.sklearn.svm.svr#sklearn.svm.SVR.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.svm.svr#sklearn.svm.SVR.get_params
predict(X) [source] Perform regression on samples in X. For an one-class model, +1 (inlier) or -1 (outlier) is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) For kernel=”precomputed”, the expected shape of X is (n_samples_test, n_samples_train). Returns y_predndarray of...
sklearn.modules.generated.sklearn.svm.svr#sklearn.svm.SVR.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.svm.svr#sklearn.svm.SVR.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.svm.svr#sklearn.svm.SVR.set_params
class sklearn.tree.DecisionTreeClassifier(*, criterion='gini', splitter='best', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features=None, random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, class_weight=None, ccp_alpha=0.0) [source]...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier
sklearn.tree.DecisionTreeClassifier class sklearn.tree.DecisionTreeClassifier(*, criterion='gini', splitter='best', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features=None, random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, clas...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier
apply(X, check_input=True) [source] Return the index of the leaf that each sample is predicted as. New in version 0.17. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a spars...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.apply
cost_complexity_pruning_path(X, y, sample_weight=None) [source] Compute the pruning path during Minimal Cost-Complexity Pruning. See Minimal Cost-Complexity Pruning for details on the pruning process. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.cost_complexity_pruning_path
decision_path(X, check_input=True) [source] Return the decision path in the tree. New in version 0.18. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. c...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.decision_path
property feature_importances_ Return the feature importances. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances can be misleading for high cardinality features (many...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.feature_importances_
fit(X, y, sample_weight=None, check_input=True, X_idx_sorted='deprecated') [source] Build a decision tree classifier from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally, it will be converted to dtype=np.float32 and if a sp...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.fit
get_depth() [source] Return the depth of the decision tree. The depth of a tree is the maximum distance between the root and any leaf. Returns self.tree_.max_depthint The maximum depth of the tree.
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.get_depth
get_n_leaves() [source] Return the number of leaves of the decision tree. Returns self.tree_.n_leavesint Number of leaves.
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.get_n_leaves
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.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.get_params
predict(X, check_input=True) [source] Predict class or regression value for X. For a classification model, the predicted class for each sample in X is returned. For a regression model, the predicted value based on X is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input ...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.predict
predict_log_proba(X) [source] Predict class log-probabilities of the input samples X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns probanda...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.predict_log_proba
predict_proba(X, check_input=True) [source] Predict class probabilities of the input samples X. The predicted class probability is the fraction of samples of the same class in a leaf. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to ...
sklearn.modules.generated.sklearn.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.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.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.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.tree.decisiontreeclassifier#sklearn.tree.DecisionTreeClassifier.set_params
class sklearn.tree.DecisionTreeRegressor(*, criterion='mse', splitter='best', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features=None, random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, ccp_alpha=0.0) [source] A decision tree re...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor
sklearn.tree.DecisionTreeRegressor class sklearn.tree.DecisionTreeRegressor(*, criterion='mse', splitter='best', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features=None, random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, ccp_alp...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor
apply(X, check_input=True) [source] Return the index of the leaf that each sample is predicted as. New in version 0.17. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a spars...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.apply
cost_complexity_pruning_path(X, y, sample_weight=None) [source] Compute the pruning path during Minimal Cost-Complexity Pruning. See Minimal Cost-Complexity Pruning for details on the pruning process. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.cost_complexity_pruning_path
decision_path(X, check_input=True) [source] Return the decision path in the tree. New in version 0.18. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. c...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.decision_path
property feature_importances_ Return the feature importances. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances can be misleading for high cardinality features (many...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.feature_importances_
fit(X, y, sample_weight=None, check_input=True, X_idx_sorted='deprecated') [source] Build a decision tree regressor from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally, it will be converted to dtype=np.float32 and if a spa...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.fit
get_depth() [source] Return the depth of the decision tree. The depth of a tree is the maximum distance between the root and any leaf. Returns self.tree_.max_depthint The maximum depth of the tree.
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.get_depth
get_n_leaves() [source] Return the number of leaves of the decision tree. Returns self.tree_.n_leavesint Number of leaves.
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.get_n_leaves
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.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.get_params
predict(X, check_input=True) [source] Predict class or regression value for X. For a classification model, the predicted class for each sample in X is returned. For a regression model, the predicted value based on X is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input ...
sklearn.modules.generated.sklearn.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.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.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.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.tree.decisiontreeregressor#sklearn.tree.DecisionTreeRegressor.set_params
sklearn.tree.export_graphviz(decision_tree, out_file=None, *, max_depth=None, feature_names=None, class_names=None, label='all', filled=False, leaves_parallel=False, impurity=True, node_ids=False, proportion=False, rotate=False, rounded=False, special_characters=False, precision=3) [source] Export a decision tree in ...
sklearn.modules.generated.sklearn.tree.export_graphviz#sklearn.tree.export_graphviz
sklearn.tree.export_text(decision_tree, *, feature_names=None, max_depth=10, spacing=3, decimals=2, show_weights=False) [source] Build a text report showing the rules of a decision tree. Note that backwards compatibility may not be supported. Parameters decision_treeobject The decision tree estimator to be expo...
sklearn.modules.generated.sklearn.tree.export_text#sklearn.tree.export_text
class sklearn.tree.ExtraTreeClassifier(*, criterion='gini', splitter='random', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, class_weight=None, ccp_alpha=0.0) [source...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier
sklearn.tree.ExtraTreeClassifier class sklearn.tree.ExtraTreeClassifier(*, criterion='gini', splitter='random', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', random_state=None, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, class_...
sklearn.modules.generated.sklearn.tree.extratreeclassifier
apply(X, check_input=True) [source] Return the index of the leaf that each sample is predicted as. New in version 0.17. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a spars...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.apply
cost_complexity_pruning_path(X, y, sample_weight=None) [source] Compute the pruning path during Minimal Cost-Complexity Pruning. See Minimal Cost-Complexity Pruning for details on the pruning process. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.cost_complexity_pruning_path
decision_path(X, check_input=True) [source] Return the decision path in the tree. New in version 0.18. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. c...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.decision_path
property feature_importances_ Return the feature importances. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances can be misleading for high cardinality features (many...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.feature_importances_
fit(X, y, sample_weight=None, check_input=True, X_idx_sorted='deprecated') [source] Build a decision tree classifier from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally, it will be converted to dtype=np.float32 and if a sp...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.fit
get_depth() [source] Return the depth of the decision tree. The depth of a tree is the maximum distance between the root and any leaf. Returns self.tree_.max_depthint The maximum depth of the tree.
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.get_depth
get_n_leaves() [source] Return the number of leaves of the decision tree. Returns self.tree_.n_leavesint Number of leaves.
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.get_n_leaves
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.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.get_params
predict(X, check_input=True) [source] Predict class or regression value for X. For a classification model, the predicted class for each sample in X is returned. For a regression model, the predicted value based on X is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input ...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.predict
predict_log_proba(X) [source] Predict class log-probabilities of the input samples X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. Returns probanda...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.predict_log_proba
predict_proba(X, check_input=True) [source] Predict class probabilities of the input samples X. The predicted class probability is the fraction of samples of the same class in a leaf. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to ...
sklearn.modules.generated.sklearn.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.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.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.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.tree.extratreeclassifier#sklearn.tree.ExtraTreeClassifier.set_params
class sklearn.tree.ExtraTreeRegressor(*, criterion='mse', splitter='random', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', random_state=None, min_impurity_decrease=0.0, min_impurity_split=None, max_leaf_nodes=None, ccp_alpha=0.0) [source] An extremely rand...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor
sklearn.tree.ExtraTreeRegressor class sklearn.tree.ExtraTreeRegressor(*, criterion='mse', splitter='random', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', random_state=None, min_impurity_decrease=0.0, min_impurity_split=None, max_leaf_nodes=None, ccp_alpha...
sklearn.modules.generated.sklearn.tree.extratreeregressor
apply(X, check_input=True) [source] Return the index of the leaf that each sample is predicted as. New in version 0.17. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a spars...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.apply
cost_complexity_pruning_path(X, y, sample_weight=None) [source] Compute the pruning path during Minimal Cost-Complexity Pruning. See Minimal Cost-Complexity Pruning for details on the pruning process. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.cost_complexity_pruning_path
decision_path(X, check_input=True) [source] Return the decision path in the tree. New in version 0.18. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix. c...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.decision_path
property feature_importances_ Return the feature importances. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances can be misleading for high cardinality features (many...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.feature_importances_
fit(X, y, sample_weight=None, check_input=True, X_idx_sorted='deprecated') [source] Build a decision tree regressor from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Internally, it will be converted to dtype=np.float32 and if a spa...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.fit
get_depth() [source] Return the depth of the decision tree. The depth of a tree is the maximum distance between the root and any leaf. Returns self.tree_.max_depthint The maximum depth of the tree.
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.get_depth
get_n_leaves() [source] Return the number of leaves of the decision tree. Returns self.tree_.n_leavesint Number of leaves.
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.get_n_leaves
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.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.get_params
predict(X, check_input=True) [source] Predict class or regression value for X. For a classification model, the predicted class for each sample in X is returned. For a regression model, the predicted value based on X is returned. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The input ...
sklearn.modules.generated.sklearn.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.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.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.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.tree.extratreeregressor#sklearn.tree.ExtraTreeRegressor.set_params
sklearn.tree.plot_tree(decision_tree, *, max_depth=None, feature_names=None, class_names=None, label='all', filled=False, impurity=True, node_ids=False, proportion=False, rotate='deprecated', rounded=False, precision=3, ax=None, fontsize=None) [source] Plot a decision tree. The sample counts that are shown are weight...
sklearn.modules.generated.sklearn.tree.plot_tree#sklearn.tree.plot_tree
sklearn.utils.all_estimators(type_filter=None) [source] Get a list of all estimators from sklearn. This function crawls the module and gets all classes that inherit from BaseEstimator. Classes that are defined in test-modules are not included. Parameters type_filter{“classifier”, “regressor”, “cluster”, “transfor...
sklearn.modules.generated.sklearn.utils.all_estimators#sklearn.utils.all_estimators
sklearn.utils.arrayfuncs.min_pos() Find the minimum value of an array over positive values Returns a huge value if none of the values are positive
sklearn.modules.generated.sklearn.utils.arrayfuncs.min_pos#sklearn.utils.arrayfuncs.min_pos
sklearn.utils.assert_all_finite(X, *, allow_nan=False) [source] Throw a ValueError if X contains NaN or infinity. Parameters X{ndarray, sparse matrix} allow_nanbool, default=False
sklearn.modules.generated.sklearn.utils.assert_all_finite#sklearn.utils.assert_all_finite
sklearn.utils.as_float_array(X, *, copy=True, force_all_finite=True) [source] Converts an array-like to an array of floats. The new dtype will be np.float32 or np.float64, depending on the original type. The function can create a copy or modify the argument depending on the argument copy. Parameters X{array-like,...
sklearn.modules.generated.sklearn.utils.as_float_array#sklearn.utils.as_float_array
sklearn.utils.Bunch(**kwargs) [source] Container object exposing keys as attributes. Bunch objects are sometimes used as an output for functions and methods. They extend dictionaries by enabling values to be accessed by key, bunch["value_key"], or by an attribute, bunch.value_key. Examples >>> b = Bunch(a=1, b=2) >>>...
sklearn.modules.generated.sklearn.utils.bunch#sklearn.utils.Bunch
sklearn.utils.check_array(array, accept_sparse=False, *, accept_large_sparse=True, dtype='numeric', order=None, copy=False, force_all_finite=True, ensure_2d=True, allow_nd=False, ensure_min_samples=1, ensure_min_features=1, estimator=None) [source] Input validation on an array, list, sparse matrix or similar. By defa...
sklearn.modules.generated.sklearn.utils.check_array#sklearn.utils.check_array
sklearn.utils.check_consistent_length(*arrays) [source] Check that all arrays have consistent first dimensions. Checks whether all objects in arrays have the same shape or length. Parameters *arrayslist or tuple of input objects. Objects that will be checked for consistent length.
sklearn.modules.generated.sklearn.utils.check_consistent_length#sklearn.utils.check_consistent_length
sklearn.utils.check_random_state(seed) [source] Turn seed into a np.random.RandomState instance Parameters seedNone, int or instance of RandomState If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a Ran...
sklearn.modules.generated.sklearn.utils.check_random_state#sklearn.utils.check_random_state
sklearn.utils.check_scalar(x, name, target_type, *, min_val=None, max_val=None) [source] Validate scalar parameters type and value. Parameters xobject The scalar parameter to validate. namestr The name of the parameter to be printed in error messages. target_typetype or tuple Acceptable data types for t...
sklearn.modules.generated.sklearn.utils.check_scalar#sklearn.utils.check_scalar
sklearn.utils.check_X_y(X, y, accept_sparse=False, *, accept_large_sparse=True, dtype='numeric', order=None, copy=False, force_all_finite=True, ensure_2d=True, allow_nd=False, multi_output=False, ensure_min_samples=1, ensure_min_features=1, y_numeric=False, estimator=None) [source] Input validation for standard estim...
sklearn.modules.generated.sklearn.utils.check_x_y#sklearn.utils.check_X_y
sklearn.utils.class_weight.compute_class_weight(class_weight, *, classes, y) [source] Estimate class weights for unbalanced datasets. Parameters class_weightdict, ‘balanced’ or None If ‘balanced’, class weights will be given by n_samples / (n_classes * np.bincount(y)). If a dictionary is given, keys are classes...
sklearn.modules.generated.sklearn.utils.class_weight.compute_class_weight#sklearn.utils.class_weight.compute_class_weight
sklearn.utils.class_weight.compute_sample_weight(class_weight, y, *, indices=None) [source] Estimate sample weights by class for unbalanced datasets. Parameters class_weightdict, list of dicts, “balanced”, or None Weights associated with classes in the form {class_label: weight}. If not given, all classes are s...
sklearn.modules.generated.sklearn.utils.class_weight.compute_sample_weight#sklearn.utils.class_weight.compute_sample_weight
sklearn.utils.deprecated(extra='') [source] Decorator to mark a function or class as deprecated. Issue a warning when the function is called/the class is instantiated and adds a warning to the docstring. The optional extra argument will be appended to the deprecation message and the docstring. Note: to use this with ...
sklearn.modules.generated.sklearn.utils.deprecated#sklearn.utils.deprecated