doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#multiplechoicefield
Versioning Versioning an interface is just a "polite" way to kill deployed clients. — Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index#namespaceversioning
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#notacceptable
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#notauthenticated
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#notfound
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#nullbooleanfield
Filtering The root QuerySet provided by the Manager describes all objects in the database table. Usually, though, you'll need to select only a subset of the complete set of objects. — Django documentation The default behavior of REST framework's generic list views is to return the entire queryset for a model manager....
django_rest_framework.api-guide.filtering.index#orderingfilter
Pagination Django provides a few classes that help you manage paginated data – that is, data that’s split across several pages, with “Previous/Next” links. — Django documentation REST framework includes support for customizable pagination styles. This allows you to modify how large result sets are split into individu...
django_rest_framework.api-guide.pagination.index#pagenumberpagination
Pagination Django provides a few classes that help you manage paginated data – that is, data that’s split across several pages, with “Previous/Next” links. — Django documentation REST framework includes support for customizable pagination styles. This allows you to modify how large result sets are split into individu...
django_rest_framework.api-guide.pagination.index
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#parseerror
Parsers Machine interacting web services tend to use more structured formats for sending data than form-encoded, since they're sending more complex data than simple forms — Malcom Tredinnick, Django developers group REST framework includes a number of built in Parser classes, that allow you to accept requests with va...
django_rest_framework.api-guide.parsers.index
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#permissiondenied
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. — Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index
Serializer relations Data structures, not algorithms, are central to programming. — Rob Pike Relational fields are used to represent model relationships. They can be applied to ForeignKey, ManyToManyField and OneToOneField relationships, as well as to reverse relationships, and custom relationships such as GenericFor...
django_rest_framework.api-guide.relations.index#primarykeyrelatedfield
Versioning Versioning an interface is just a "polite" way to kill deployed clients. — Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index#queryparameterversioning
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#readonlyfield
ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. — Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a V...
django_rest_framework.api-guide.viewsets.index#readonlymodelviewset
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#regexfield
Authentication Auth needs to be pluggable. — Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then...
django_rest_framework.api-guide.authentication.index#remoteuserauthentication
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. — Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index
Requests If you're doing REST-based web service stuff ... you should ignore request.POST. — Malcom Tredinnick, Django developers group REST framework's Request class extends the standard HttpRequest, adding support for REST framework's flexible request parsing and request authentication. Request parsing REST framewor...
django_rest_framework.api-guide.requests.index
Responses Unlike basic HttpResponse objects, TemplateResponse objects retain the details of the context that was provided by the view to compute the response. The final output of the response is not computed until it is needed, later in the response process. — Django documentation REST framework supports HTTP content...
django_rest_framework.api-guide.responses.index
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#retrieveapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#retrievedestroyapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#retrievemodelmixin
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#retrieveupdateapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#retrieveupdatedestroyapiview
Routers Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index... a resourceful route declares them in a single line of code. — Ruby on Rails Documentation Some Web frameworks such as Rails provide functionality f...
django_rest_framework.api-guide.routers.index
Schema A machine-readable [schema] describes what resources are available via the API, what their URLs are, how they are represented and what operations they support. — Heroku, JSON Schema for the Heroku Platform API API schemas are a useful tool that allow for a range of use cases, including generating reference doc...
django_rest_framework.api-guide.schemas.index
Throttling HTTP/1.1 420 Enhance Your Calm Twitter API rate limiting response Throttling is similar to permissions, in that it determines if a request should be authorized. Throttles indicate a temporary state, and are used to control the rate of requests that clients can make to an API. As with permissions, multiple ...
django_rest_framework.api-guide.throttling.index#scopedratethrottle
Filtering The root QuerySet provided by the Manager describes all objects in the database table. Usually, though, you'll need to select only a subset of the complete set of objects. — Django documentation The default behavior of REST framework's generic list views is to return the entire queryset for a model manager....
django_rest_framework.api-guide.filtering.index#searchfilter
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#serializermethodfield
Serializers Expanding the usefulness of the serializers is something that we would like to address. However, it's not a trivial problem, and it will take some serious design work. — Russell Keith-Magee, Django users group Serializers allow complex data such as querysets and model instances to be converted to native P...
django_rest_framework.api-guide.serializers.index
Authentication Auth needs to be pluggable. — Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then...
django_rest_framework.api-guide.authentication.index#sessionauthentication
Settings Namespaces are one honking great idea - let's do more of those! — The Zen of Python Configuration for REST framework is all namespaced inside a single Django setting, named REST_FRAMEWORK. For example your project's settings.py file might include something like this: REST_FRAMEWORK = { 'DEFAULT_RENDERER_...
django_rest_framework.api-guide.settings.index
Routers Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index... a resourceful route declares them in a single line of code. — Ruby on Rails Documentation Some Web frameworks such as Rails provide functionality f...
django_rest_framework.api-guide.routers.index#simplerouter
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#slugfield
Serializer relations Data structures, not algorithms, are central to programming. — Rob Pike Relational fields are used to represent model relationships. They can be applied to ForeignKey, ManyToManyField and OneToOneField relationships, as well as to reverse relationships, and custom relationships such as GenericFor...
django_rest_framework.api-guide.relations.index#slugrelatedfield
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. — Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#statichtmlrenderer
Serializer relations Data structures, not algorithms, are central to programming. — Rob Pike Relational fields are used to represent model relationships. They can be applied to ForeignKey, ManyToManyField and OneToOneField relationships, as well as to reverse relationships, and custom relationships such as GenericFor...
django_rest_framework.api-guide.relations.index#stringrelatedfield
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. — Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#templatehtmlrenderer
Testing Code without tests is broken as designed. — Jacob Kaplan-Moss REST framework includes a few helper classes that extend Django's existing test framework, and improve support for making API requests. APIRequestFactory Extends Django's existing RequestFactory class. Creating test requests The APIRequestFactory c...
django_rest_framework.api-guide.testing.index
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#throttled
Throttling HTTP/1.1 420 Enhance Your Calm Twitter API rate limiting response Throttling is similar to permissions, in that it determines if a request should be authorized. Throttles indicate a temporary state, and are used to control the rate of requests that clients can make to an API. As with permissions, multiple ...
django_rest_framework.api-guide.throttling.index
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#timefield
Authentication Auth needs to be pluggable. — Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then...
django_rest_framework.api-guide.authentication.index#tokenauthentication
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index#uniquefordatevalidator
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index#uniqueformonthvalidator
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index#uniqueforyearvalidator
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index#uniquetogethervalidator
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index#uniquevalidator
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#unsupportedmediatype
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#updateapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. — Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#updatemodelmixin
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#urlfield
Versioning Versioning an interface is just a "polite" way to kill deployed clients. — Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index#urlpathversioning
Throttling HTTP/1.1 420 Enhance Your Calm Twitter API rate limiting response Throttling is similar to permissions, in that it determines if a request should be authorized. Throttles indicate a temporary state, and are used to control the rate of requests that clients can make to an API. As with permissions, multiple ...
django_rest_framework.api-guide.throttling.index#userratethrottle
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it — normalizing it to a consistent format. — Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#uuidfield
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#validationerror
Validators Validators can be useful for re-using validation logic between different types of fields. — Django documentation Most of the time you're dealing with validation in REST framework you'll simply be relying on the default field validation, or writing explicit validation methods on serializer or field classes....
django_rest_framework.api-guide.validators.index
Versioning Versioning an interface is just a "polite" way to kill deployed clients. — Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index
ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. — Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a V...
django_rest_framework.api-guide.viewsets.index#viewset
ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. — Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a V...
django_rest_framework.api-guide.viewsets.index
sklearn.base.BaseEstimator class sklearn.base.BaseEstimator [source] Base class for all estimators in scikit-learn. Notes All estimators should specify all the parameters that can be set at the class level in their __init__ as explicit keyword arguments (no *args or **kwargs). Methods get_params([deep]) Get param...
sklearn.modules.generated.sklearn.base.baseestimator
class sklearn.base.BaseEstimator [source] Base class for all estimators in scikit-learn. Notes All estimators should specify all the parameters that can be set at the class level in their __init__ as explicit keyword arguments (no *args or **kwargs). Methods get_params([deep]) Get parameters for this estimator. s...
sklearn.modules.generated.sklearn.base.baseestimator#sklearn.base.BaseEstimator
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.base.baseestimator#sklearn.base.BaseEstimator.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.base.baseestimator#sklearn.base.BaseEstimator.set_params
sklearn.base.BiclusterMixin class sklearn.base.BiclusterMixin [source] Mixin class for all bicluster estimators in scikit-learn. Attributes biclusters_ Convenient way to get row and column indicators together. Methods get_indices(i) Row and column indices of the i’th bicluster. get_shape(i) Shape of t...
sklearn.modules.generated.sklearn.base.biclustermixin
class sklearn.base.BiclusterMixin [source] Mixin class for all bicluster estimators in scikit-learn. Attributes biclusters_ Convenient way to get row and column indicators together. Methods get_indices(i) Row and column indices of the i’th bicluster. get_shape(i) Shape of the i’th bicluster. get_subma...
sklearn.modules.generated.sklearn.base.biclustermixin#sklearn.base.BiclusterMixin
property biclusters_ Convenient way to get row and column indicators together. Returns the rows_ and columns_ members.
sklearn.modules.generated.sklearn.base.biclustermixin#sklearn.base.BiclusterMixin.biclusters_
get_indices(i) [source] Row and column indices of the i’th bicluster. Only works if rows_ and columns_ attributes exist. Parameters iint The index of the cluster. Returns row_indndarray, dtype=np.intp Indices of rows in the dataset that belong to the bicluster. col_indndarray, dtype=np.intp Indices ...
sklearn.modules.generated.sklearn.base.biclustermixin#sklearn.base.BiclusterMixin.get_indices
get_shape(i) [source] Shape of the i’th bicluster. Parameters iint The index of the cluster. Returns n_rowsint Number of rows in the bicluster. n_colsint Number of columns in the bicluster.
sklearn.modules.generated.sklearn.base.biclustermixin#sklearn.base.BiclusterMixin.get_shape
get_submatrix(i, data) [source] Return the submatrix corresponding to bicluster i. Parameters iint The index of the cluster. dataarray-like of shape (n_samples, n_features) The data. Returns submatrixndarray of shape (n_rows, n_cols) The submatrix corresponding to bicluster i. Notes Works with s...
sklearn.modules.generated.sklearn.base.biclustermixin#sklearn.base.BiclusterMixin.get_submatrix
sklearn.base.ClassifierMixin class sklearn.base.ClassifierMixin [source] Mixin class for all classifiers in scikit-learn. Methods score(X, y[, sample_weight]) Return the mean accuracy on the given test data and labels. score(X, y, sample_weight=None) [source] Return the mean accuracy on the given test data ...
sklearn.modules.generated.sklearn.base.classifiermixin
class sklearn.base.ClassifierMixin [source] Mixin class for all classifiers in scikit-learn. Methods score(X, y[, sample_weight]) Return the mean accuracy on the given test data and labels. score(X, y, sample_weight=None) [source] Return the mean accuracy on the given test data and labels. In multi-label clas...
sklearn.modules.generated.sklearn.base.classifiermixin#sklearn.base.ClassifierMixin
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.base.classifiermixin#sklearn.base.ClassifierMixin.score
sklearn.base.clone(estimator, *, safe=True) [source] Constructs a new unfitted estimator with the same parameters. Clone does a deep copy of the model in an estimator without actually copying attached data. It yields a new estimator with the same parameters that has not been fitted on any data. If the estimator’s ran...
sklearn.modules.generated.sklearn.base.clone#sklearn.base.clone
sklearn.base.ClusterMixin class sklearn.base.ClusterMixin [source] Mixin class for all cluster estimators in scikit-learn. Methods fit_predict(X[, y]) Perform clustering on X and returns cluster labels. fit_predict(X, y=None) [source] Perform clustering on X and returns cluster labels. Parameters Xarray...
sklearn.modules.generated.sklearn.base.clustermixin
class sklearn.base.ClusterMixin [source] Mixin class for all cluster estimators in scikit-learn. Methods fit_predict(X[, y]) Perform clustering on X and returns cluster labels. fit_predict(X, y=None) [source] Perform clustering on X and returns cluster labels. Parameters Xarray-like of shape (n_samples, n...
sklearn.modules.generated.sklearn.base.clustermixin#sklearn.base.ClusterMixin
fit_predict(X, y=None) [source] Perform clustering on X and returns cluster labels. Parameters Xarray-like of shape (n_samples, n_features) Input data. yIgnored Not used, present for API consistency by convention. Returns labelsndarray of shape (n_samples,), dtype=np.int64 Cluster labels.
sklearn.modules.generated.sklearn.base.clustermixin#sklearn.base.ClusterMixin.fit_predict
sklearn.base.DensityMixin class sklearn.base.DensityMixin [source] Mixin class for all density estimators in scikit-learn. Methods score(X[, y]) Return the score of the model on the data X. score(X, y=None) [source] Return the score of the model on the data X. Parameters Xarray-like of shape (n_samples,...
sklearn.modules.generated.sklearn.base.densitymixin
class sklearn.base.DensityMixin [source] Mixin class for all density estimators in scikit-learn. Methods score(X[, y]) Return the score of the model on the data X. score(X, y=None) [source] Return the score of the model on the data X. Parameters Xarray-like of shape (n_samples, n_features) Test samples....
sklearn.modules.generated.sklearn.base.densitymixin#sklearn.base.DensityMixin
score(X, y=None) [source] Return the score of the model on the data X. Parameters Xarray-like of shape (n_samples, n_features) Test samples. yIgnored Not used, present for API consistency by convention. Returns scorefloat
sklearn.modules.generated.sklearn.base.densitymixin#sklearn.base.DensityMixin.score
sklearn.base.is_classifier(estimator) [source] Return True if the given estimator is (probably) a classifier. Parameters estimatorobject Estimator object to test. Returns outbool True if estimator is a classifier and False otherwise.
sklearn.modules.generated.sklearn.base.is_classifier#sklearn.base.is_classifier
sklearn.base.is_regressor(estimator) [source] Return True if the given estimator is (probably) a regressor. Parameters estimatorestimator instance Estimator object to test. Returns outbool True if estimator is a regressor and False otherwise.
sklearn.modules.generated.sklearn.base.is_regressor#sklearn.base.is_regressor
class sklearn.base.RegressorMixin [source] Mixin class for all regression estimators in scikit-learn. Methods score(X, y[, sample_weight]) Return the coefficient of determination \(R^2\) of the prediction. score(X, y, sample_weight=None) [source] Return the coefficient of determination \(R^2\) of the predicti...
sklearn.modules.generated.sklearn.base.regressormixin#sklearn.base.RegressorMixin
sklearn.base.RegressorMixin class sklearn.base.RegressorMixin [source] Mixin class for all regression estimators in scikit-learn. Methods score(X, y[, sample_weight]) Return the coefficient of determination \(R^2\) of the prediction. score(X, y, sample_weight=None) [source] Return the coefficient of determi...
sklearn.modules.generated.sklearn.base.regressormixin
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.base.regressormixin#sklearn.base.RegressorMixin.score
sklearn.base.TransformerMixin class sklearn.base.TransformerMixin [source] Mixin class for all transformers in scikit-learn. Methods fit_transform(X[, y]) Fit to data, then transform it. fit_transform(X, y=None, **fit_params) [source] Fit to data, then transform it. Fits transformer to X and y with optional...
sklearn.modules.generated.sklearn.base.transformermixin
class sklearn.base.TransformerMixin [source] Mixin class for all transformers in scikit-learn. Methods fit_transform(X[, y]) Fit to data, then transform it. 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 retur...
sklearn.modules.generated.sklearn.base.transformermixin#sklearn.base.TransformerMixin
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.base.transformermixin#sklearn.base.TransformerMixin.fit_transform
class sklearn.calibration.CalibratedClassifierCV(base_estimator=None, *, method='sigmoid', cv=None, n_jobs=None, ensemble=True) [source] Probability calibration with isotonic regression or logistic regression. This class uses cross-validation to both estimate the parameters of a classifier and subsequently calibrate ...
sklearn.modules.generated.sklearn.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV
sklearn.calibration.CalibratedClassifierCV class sklearn.calibration.CalibratedClassifierCV(base_estimator=None, *, method='sigmoid', cv=None, n_jobs=None, ensemble=True) [source] Probability calibration with isotonic regression or logistic regression. This class uses cross-validation to both estimate the parameter...
sklearn.modules.generated.sklearn.calibration.calibratedclassifiercv
fit(X, y, sample_weight=None) [source] Fit the calibrated model. Parameters Xarray-like of shape (n_samples, n_features) Training data. yarray-like of shape (n_samples,) Target values. sample_weightarray-like of shape (n_samples,), default=None Sample weights. If None, then samples are equally weighted....
sklearn.modules.generated.sklearn.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.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.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.get_params
predict(X) [source] Predict the target of new samples. The predicted class is the class that has the highest probability, and can thus be different from the prediction of the uncalibrated classifier. Parameters Xarray-like of shape (n_samples, n_features) The samples. Returns Cndarray of shape (n_samples,...
sklearn.modules.generated.sklearn.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.predict
predict_proba(X) [source] Calibrated probabilities of classification. This function returns calibrated probabilities of classification according to each class on an array of test vectors X. Parameters Xarray-like of shape (n_samples, n_features) The samples. Returns Cndarray of shape (n_samples, n_classes...
sklearn.modules.generated.sklearn.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.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.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.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.calibration.calibratedclassifiercv#sklearn.calibration.CalibratedClassifierCV.set_params
sklearn.calibration.calibration_curve(y_true, y_prob, *, normalize=False, n_bins=5, strategy='uniform') [source] Compute true and predicted probabilities for a calibration curve. The method assumes the inputs come from a binary classifier, and discretize the [0, 1] interval into bins. Calibration curves may also be r...
sklearn.modules.generated.sklearn.calibration.calibration_curve#sklearn.calibration.calibration_curve