I am very new to pymc3 and python itself so please bear with me if I am writing something wrong.
I have saved Gaussian regression model(gp) from sci-kit(with 6 input), saved using pickle. Now i have a file which contains some inputs(x{3 input}) and output(y) for gp.
Now question is for gp how i can calibrate remaining input(6 - 3 ), so that combining with remaining input(3) it yield approximate same output(y) or with minimal error, which is known. Currently I am thinking something like this:
gp = joblib.load('finalized_model_gp.pkl') #Load saved gp model from scikit
x3,y1,num_records = load_file_data('DATAFIELD.csv',3) #will return 3 input(x3 = x1,x2,x3) for gp model and 1 output variable(y)
def predict_y(x1,x2,x3,Q1,Q2,Q3):
return gp.predict(x1,x2,x3,Q1,Q2,Q3)
with pm.Model() as model:
Q1 = pm.Uniform('Q1',0,1) #input 4, remaining 3 inputs that need to be calibrated for gp, with some known prior
Q2 = pm.Uniform('Q2',0,1) #input 5
Q3 = pm.Uniform('Q3',0,1) #input 6
#Might be it should use gp in here to calibrate Q1,Q2,Q3 with x1,x2,x3 for y1 using predict_y()
y = pm.MvNormal('likelihood', observed=y1 , mu=mu, cov=tt.eye(num_records), shape=(num_records))
trace_ = pm.sample(500, step,progressbar=True,discard_tuned_samples=False) #some sampling.
I am not sure if this can be done using pymc3 or should i look into some other approach?