##### Optimizing a model output (Y) with some (X) parameters defined
 Optimizing a model output (Y) with some (X) parameters defined pierrelouisbescond Unladen Swallow Posts: 1 Threads: 1 Joined: Jun 2019 Reputation: Jun-14-2019, 10:28 AM Hi Everyone, (Disclaimer: I am quite a beginner onPython and Data Science in general… ) I have designed and published my 1st kernel on Kaggle (here: https://www.kaggle.com/plbescond/quality...1-mse-0-12), based on a nice industrial Kaggle dataset (and this is not for a specific competition, just for fun). So I now have a model which I can run to to predict a "Y" (%silicate rate) according to 10 parameters (Xs). Note: the Xs input is an array like this: ``Output:[[-0.33660127 0.61050275 -0.19441589 -0.1988209 0.3357553 0.16947863 0.11750669 -0.09867687 0.29995688 0.03718947]]``Now I would like to: 1/ find a way to define the values of the 10 Xs to reach a specific Y value 2/ find a way to set values for some Xs (let's say 4 out of 10), set my Y target… and get the corresponding values for the remaining Xs, like this: ``Output:[[-0.3 (defined) X2? X3? X4? X5? 0.2 (defined) X7? X8? 0.4 (defined) 0.05(defined)]]``I have tried to convert the model into a function and optimize it but it does not get me anywhere (probably by a lack of knowledge), like this: ```filename = 'mining_model.sav' gbr = pickle.load(open(filename, 'rb')) # Parameters Optimization def gbr_function(x): y = gbr.predict(x) return y … and then I tried some different optimization algorithms from "scipy.optimize" with no luck…```Anyone who could guide me a bit on how to do that? Thanks, Pierre-Louis Reply

 Possibly Related Threads… Thread Author Replies Views Last Post Making a Basic Keras Model - Input Shape and Parameters MattKahn13 0 780 Aug-16-2020, 04:36 PM Last Post: MattKahn13

Forum Jump:

### User Panel Messages

##### Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020