Answers.Body: <p>I'm assuming that you mean your inputs are 4-dimensional vectors and your outputs are 1 dimensional vectors. If you think that the output vectors give you enough information to completely determine the inputs (at least approximately), then just treat your 1D "outputs" as inputs and your 4D "inputs" as outputs.</p>
  
  <p>Another case is that very different inputs are mapped to similar outputs in your dataset, and you really just want to compute a prototype input for a given output. For example, you might want to produce an image of the letter "a" from only its one-hot label. There are many ways to do this. Here's one that I think is cool: </p>
  
  <p>First, train a neural net the way you normally would with 4D inputs mapping to 1D outputs. Now let's say you're given a 1D output <em>y</em>. Generate some 4D noise <em>x'</em> and pass it through the net to obtain <em>y'</em>. Now pretend that the values in this input are parameters in your network, and hold your actual parameters constant. Use <em>y</em> and <em>y'</em> to compute a loss, and perform gradient descent on your synthetic input. If you repeat this enough times, you should get something that your network thinks deserves the output <em>y</em>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-09T03:35:34.677Z
Answers.LastActivityDate: 2017-06-09T03:35:34.677Z
Answers.UserDisplayName: Henry Steinitz
Body: <p>I have a data set with four inputs and one output. I need to infer the 4 inputs given an output. What is the best way to do this?</p>
  
Tags: <neural-networks>
Title: Neural network Model to infer inputs given an output
UserDisplayName: Juliano Oliveira
ThreadText: # Neural network Model to infer inputs given an output
  
  (Asked by: username_0 on 2017-06-08)
  
  I have a data set with four inputs and one output. I need to infer the 4 inputs given an output. What is the best way to do this?
  
  **Tags:** neural-networks
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-09. Score: 2
  
  I'm assuming that you mean your inputs are 4-dimensional vectors and your outputs are 1 dimensional vectors. If you think that the output vectors give you enough information to completely determine the inputs (at least approximately), then just treat your 1D "outputs" as inputs and your 4D "inputs" as outputs.
  
  Another case is that very different inputs are mapped to similar outputs in your dataset, and you really just want to compute a prototype input for a given output. For example, you might want to produce an image of the letter "a" from only its one-hot label. There are many ways to do this. Here's one that I think is cool:
  
  First, train a neural net the way you normally would with 4D inputs mapping to 1D outputs. Now let's say you're given a 1D output *y*. Generate some 4D noise *x'* and pass it through the net to obtain *y'*. Now pretend that the values in this input are parameters in your network, and hold your actual parameters constant. Use *y* and *y'* to compute a loss, and perform gradient descent on your synthetic input. If you repeat this enough times, you should get something that your network thinks deserves the output *y*.
  
  
  ---
  
  