Clear Filters
Clear Filters

Predict exact value by using Pre trained GPR Model(gaussian process regression)

5 views (last 30 days)
i have 4 input data(a,b,c,d) and 1 output data.
%% MGPR(Multivariate Gaussian process regression) by using metamodel %%
clc; clear all; close all; warning off;
tbl = readtable('D-optimal.txt','Filetype','text',...
'ReadVariableNames',false);
tbl.Properties.VariableNames = {'Hole_horizon','Hole_vertical','Height','Depth','Deflection'};
tbl(1:20,:) %Data
gprMdl1 = fitrgp(tbl,'Deflection','KernelFunction','ardsquaredexponential',...
'FitMethod','sr','PredictMethod','fic','Standardize',1)
gprMdl2 = fitrgp(tbl1,'Deflection','KernelFunction','ardsquaredexponential',...
'FitMethod','sr','PredictMethod','fic','Standardize',1)
i wanna predict the exact value of deflection(Output).
is there any way to predict the output value about random input value?

Answers (1)

Ayush Anand
Ayush Anand on 11 Sep 2023
Hi JaeWook,
I understand you have trained a Gaussian process model on some data and want to know how to use it to predict the values for certain input data you have. You can do this using the "predict" function, with the following syntax:
ypred=predict(gprMdl1,xtest) %where xtest is your test input data
You can refer to the following example which demonstrates how to train a Gaussian process regression model and then use it to predict values at certain inputs:
I hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!