Him
Him

Reputation: 5551

How to retrieve trained hyperparameters from sklearn GaussianProcessRegressor model

Calling model.fit(X,y); model.get_params() returns the values that I initialized my kernels with. How do I get the hyperparameters of the trained model?

Upvotes: 3

Views: 2414

Answers (1)

Vivek Kumar
Vivek Kumar

Reputation: 36599

The model.get_params() as mentioned in documentation will return the parameters passed into the initialization of the GPR.

It optimizes the passed kernel's internal parameters which is available using model.kernel_.

See the documentation and associated examples for more details.

Upvotes: 3

Related Questions