Answers.Body: <p>You can try to optimize the 4 input parameters to maximize or minimize the output of the neural network with a mathematical optimizer. The <a href="https://docs.scipy.org/doc/scipy/reference/optimize.html" rel="nofollow noreferrer">scipy.optimize</a> package has some methods you can use.</p>
  <p>It is possible that the optimization result looks good but performs badly, so you should test with the real system and add it as an additional data point if the results aren't good, and repeat until they become better.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-07T11:30:19.660Z
Answers.Text: Perhaps you could add a warning about limitation of neural networks when extrapolating. They will want to constrain the input parameters to be within ranges seen in the training data
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-07T22:53:09.250Z
Answers.Text: I already have labelled data, that's mean for test data I know what are the values of 4 input values what are its result (TRUE, FALSE).  I want to train my model first, then using that model I want to get the new values that 4 parameters which give me accurate results. After that, I want to calculate the delta between the actual 4 input paraters and tunned-input parameters.
Answers.UserDisplayName: Ibrar Ahmed
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-07T10:29:48.457Z
Answers.LastActivityDate: 2022-06-07T10:29:48.457Z
Answers.UserDisplayName: Leo
Body: <p>I have a deep neural network with 4 input nodes, 4 hidden layers with 4 nodes each and 1 output layer with one node (TRUE, FALSE). I have already trained the NN using backpropagation because I have labelled data. That four input parameter values trained my model on test data to get the output. My model is trained now with optimal weights.</p>
  <p>I have already trained my model using that labelled training data. Now using that model I want to get the new values of that 4 input parameters which give me accurate results. After that, I want to calculate the delta between the actual 4 input parameters and tunned-input parameters.</p>
  <p>In summary, my question is how I can manipulate(tune) my input parameter, based on that model which I created using labbeled data.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T02:08:15.820Z
Comments.Text: Hi Ibrar, I think you misunderstand the neural network concept. Can you give more clarificatoin, for example what is the result in one output node you expect from the model?
Comments.UserDisplayName: malioboro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T13:37:11.503Z
Comments.Text: In simple words, can I tune input parameter not the weights. Mean finding grading decent using loss function on input parameter
Comments.UserDisplayName: Ibrar Ahmed
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T14:20:18.193Z
Comments.Text: Unfortunately "tune input parameter" is still broad, may be you can edit your question and tell us your case and explain what the actual problem you want to solve
Comments.UserDisplayName: malioboro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T17:39:29.173Z
Comments.Text: Could you explain what you are attempting to tune your input parameters to achieve? I suspect you are hoping to use a neural network to learn a function and then find some optimal inputs to it that should minimise or maximise the output of that function? You can definitley do that mechanically and discover inputs that seem important to your network (this is similar to how Deep Dream works for example), but there are limitations. If this is what you want to do, please add a comment or edit about it. If not, please tell me how my guess is wrong.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T17:42:57.483Z
Comments.Text: @NeilSlater yes that i want to do that
Comments.UserDisplayName: Ibrar Ahmed
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-06T19:05:02.597Z
Comments.Text: I have tried to re-write your question based on my guess, and using as much of your original words as possible. Please say if I have got it right - is this the question you want to ask?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-07T23:01:08.200Z
Comments.Text: @NeilSlater I modified the question a bit to be more specific.
Comments.UserDisplayName: Ibrar Ahmed
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-08T06:29:33.823Z
Comments.Text: I no longer understand the question unfortunately. With the binary output, you don't appear to be optimising anything, but you are trying to discover some other characteristic of the inputs. I cannot figure out what that is from your question though - what is your goal for tuning the input parameter? What do you hope the tuned input parameter will do to the system that you are modelling, different from the labelled data that you have already collected?
Comments.UserDisplayName: Neil Slater
Tags: <neural-networks><deep-learning>
Title: How to use a trained neural network to find optimal function inputs?
UserDisplayName: Ibrar Ahmed
ThreadText: # How to use a trained neural network to find optimal function inputs?
  
  (Asked by: username_0 on 2022-06-05)
  
  I have a deep neural network with 4 input nodes, 4 hidden layers with 4 nodes each and 1 output layer with one node (TRUE, FALSE). I have already trained the NN using backpropagation because I have labelled data. That four input parameter values trained my model on test data to get the output. My model is trained now with optimal weights.
  
  I have already trained my model using that labelled training data. Now using that model I want to get the new values of that 4 input parameters which give me accurate results. After that, I want to calculate the delta between the actual 4 input parameters and tunned-input parameters.
  
  In summary, my question is how I can manipulate(tune) my input parameter, based on that model which I created using labbeled data.
  
  **Tags:** neural-networks, deep-learning
  
  > **Comments:**
  > **username_1**: Hi username_0, I think you misunderstand the neural network concept. Can you give more clarificatoin, for example what is the result in one output node you expect from the model?  
  > **username_0**: In simple words, can I tune input parameter not the weights. Mean finding grading decent using loss function on input parameter  
  > **username_1**: Unfortunately "tune input parameter" is still broad, may be you can edit your question and tell us your case and explain what the actual problem you want to solve  
  > **username_2**: Could you explain what you are attempting to tune your input parameters to achieve? I suspect you are hoping to use a neural network to learn a function and then find some optimal inputs to it that should minimise or maximise the output of that function? You can definitley do that mechanically and discover inputs that seem important to your network (this is similar to how Deep Dream works for example), but there are limitations. If this is what you want to do, please add a comment or edit about it. If not, please tell me how my guess is wrong.  
  > **username_0**: @username_2 yes that i want to do that  
  > **username_2**: I have tried to re-write your question based on my guess, and using as much of your original words as possible. Please say if I have got it right - is this the question you want to ask?  
  > **username_0**: @username_2 I modified the question a bit to be more specific.  
  > **username_2**: I no longer understand the question unfortunately. With the binary output, you don't appear to be optimising anything, but you are trying to discover some other characteristic of the inputs. I cannot figure out what that is from your question though - what is your goal for tuning the input parameter? What do you hope the tuned input parameter will do to the system that you are modelling, different from the labelled data that you have already collected?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2022-06-07. Score: 1
  
  You can try to optimize the 4 input parameters to maximize or minimize the output of the neural network with a mathematical optimizer. The [scipy.optimize](https://docs.scipy.org/doc/scipy/reference/optimize.html) package has some methods you can use.
  
  It is possible that the optimization result looks good but performs badly, so you should test with the real system and add it as an additional data point if the results aren't good, and repeat until they become better.
  
  > **Comments:**
  > **username_2**: Perhaps you could add a warning about limitation of neural networks when extrapolating. They will want to constrain the input parameters to be within ranges seen in the training data  
  > **username_0**: I already have labelled data, that's mean for test data I know what are the values of 4 input values what are its result (TRUE, FALSE).  I want to train my model first, then using that model I want to get the new values that 4 parameters which give me accurate results. After that, I want to calculate the delta between the actual 4 input paraters and tunned-input parameters.  
  
  ---
  
  