Bottom Page

• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 Optimizing a model output (Y) with some (X) parameters defined pierrelouisbescond Unladen Swallow Posts: 1 Threads: 1 Joined: Jun 2019 Reputation: 0 Likes received: 0 #1 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 « Next Oldest | Next Newest »

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)