Scikit-Learn


Output  0.527486  Bayesian Ridge Regression



Yüklə 1,92 Mb.
Pdf görüntüsü
səhifə38/124
tarix23.02.2023
ölçüsü1,92 Mb.
#101394
1   ...   34   35   36   37   38   39   40   41   ...   124
sklearn

Output 
0.527486 
Bayesian Ridge Regression 
Bayesian regression allows a natural mechanism to survive insufficient data or poorly 
distributed data by formulating linear regression using probability distributors rather than 
point estimates. The output or response ‘y’ is assumed to drawn from a probability 
distribution rather than estimated as a single value. 
Mathematically, to obtain a fully probabilistic model the response y is assumed to be 
Gaussian distributed around 
𝑋
𝑤
as follows: 
𝑝(𝑦|𝑋, 𝑤, 𝛼) = 𝑁(𝑦|𝑋
𝑤
, 𝛼)
One of the most useful type of Bayesian regression is Bayesian Ridge regression which 
estimates a probabilistic model of the regression problem. Here the prior for the coefficient 
𝑤
is given by spherical Gaussian as follows: 
𝑝(𝑤|𝜆) = 𝑁(𝑤|0, 𝜆
−1
𝐼
𝑝
)
This resulting model is called Bayesian Ridge Regression and in scikit-learn 
sklearn.linear_model.BeyesianRidge
module is used for Bayesian Ridge Regression. 


Scikit-Learn
41 
Parameters 
Followings table consist the parameters used by
 BayesianRidge 
module: 
Parameter 
Description 
n_iter
: int, optional
It represents the maximum number of iterations. 
The default value is 300 but the user-defined value 
must be greater than or equal to 1.
fit_intercept
: Boolean, optional, default 
True 
It decides whether to calculate the intercept for 
this model or not. No intercept will be used in 
calculation, if it will set to false.
tol
: float, optional, default=1.e-3 
It represents the precision of the solution and will 
stop the algorithm if w has converged.
alpha_1
: float, optional, default=1.e-6 
It is the 1
st
hyperparameter which is a shape 
parameter for the Gamma distribution prior over 
the alpha parameter.
alpha_2
: float, optional, default=1.e-6 
It is the 2
nd
hyperparameter which is an inverse 
scale parameter for the Gamma distribution prior 
over the alpha parameter.
lambda_1
: float, optional, default=1.e-6 
It is the 1
st
hyperparameter which is a shape 
parameter for the Gamma distribution prior over 
the lambda parameter.
lambda_2
: float, optional, default=1.e-6 
It is the 2
nd
hyperparameter which is an inverse 
scale parameter for the Gamma distribution prior 
over the lambda parameter.
copy_X
: Boolean, optional, default = True 
By default, it is true which means X will be copied. 
But if it is set to false, X may be overwritten. 
compute_score

boolean, 
optional, 
default=False 
If set to true, it computes the log marginal 
likelihood at each iteration of the optimization. 
verbose
: Boolean, optional, default=False
By default, it is false but if set true, verbose mode 
will be enabled while fitting the model. 

Yüklə 1,92 Mb.

Dostları ilə paylaş:
1   ...   34   35   36   37   38   39   40   41   ...   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ə