Scikit-Learn



Yüklə 1,92 Mb.
Pdf görüntüsü
səhifə25/124
tarix23.02.2023
ölçüsü1,92 Mb.
#101394
1   ...   21   22   23   24   25   26   27   28   ...   124
sklearn

Estimator interface
: It is for building and fitting the models. 

Predictor interface
: It is for making predictions. 

Transformer interface
: It is for converting data. 
The APIs adopt simple conventions and the design choices have been guided in a manner 
to avoid the proliferation of framework code. 
Purpose of Conventions 
The purpose of conventions is to make sure that the API stick to the following broad 
principles: 
Consistency:
All the objects whether they are basic, or composite must share a consistent 
interface which further composed of a limited set of methods.
Inspection:
Constructor parameters and parameters values determined by learning 
algorithm should be stored and exposed as public attributes. 
 
Non-proliferation of classes: 
Datasets should be represented as NumPy arrays or Scipy 
sparse matrix whereas hyper-parameters names and values should be represented as 
standard Python strings to avoid the proliferation of framework code. 
 
Composition:
The algorithms whether they are expressible as sequences or combinations 
of transformations to the data or naturally viewed as meta-algorithms parameterized on 
other algorithms, should be implemented and composed from existing building blocks. 
 
Sensible defaults:
In scikit-learn whenever an operation requires a user-defined 
parameter, an appropriate default value is defined. This default value should cause the 
operation to be performed in a sensible way, for example, giving a base-line solution for 
the task at hand.
Various Conventions 
The conventions available in Sklearn are explained below: 
Type casting 
It states that the input should be cast to 
float64
. In the following example, in which 

Yüklə 1,92 Mb.

Dostları ilə paylaş:
1   ...   21   22   23   24   25   26   27   28   ...   124




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə