Body: <p>I've written a single perceptron that can predict whether a point is above or below a straight-line graph, given the correct training data and using a sign activation function.</p>
  <p>Now, I'm trying to design a neural network that can predict whether a point <span class="math-container">$(x, y)$</span> is in the 1st, 2nd, 3rd or 4th quadrant of a graph.</p>
  <p><strong>One idea</strong> I have had is to have 2 input neurons, the first taking the <span class="math-container">$x$</span> value, the 2nd taking the <span class="math-container">$y$</span> value, these then try and predict individually whether the answer is on the right or left of the centre, and then above or below respectively. These then pass their outputs to the 3rd and final output neuron. The 3rd neuron uses the inputs to try and predict which quadrant the coordinates are in. The first two inputs use the sign function.</p>
  <p>The problem I'm having with this is to do with the activation function of the final neuron. One idea was to have a function that somehow scaled the output into an integer between 0 and 1, so 0 to 0.25 would be quadrant 1, and so on up to 1. Another idea would be to convert it to a value using sin and representing it as a sine wave as this could potentially represent all 4 quadrants.</p>
  <p><strong>Another idea</strong> would be to have a single neuron taking the input of the <span class="math-container">$x$</span> and <span class="math-container">$y$</span> value and predicting whether something was above or below a graph (like my perceptron example), then having two output neurons, which the 1st output neuron would be fired if it was above the line and then passed in the original <span class="math-container">$x$</span> coordinate to that output neuron. The 2nd output neuron would be fired if it was below, then pass in the original <span class="math-container">$x$</span> value, as well to determine if it was left or right.</p>
  <p>Are these good ways of designing a neural network for this task?</p>
  
Tags: <neural-networks><activation-functions><hyperparameter-optimization><hyper-parameters><network-design>
Title: How to design a neural network to predict the quadrant where a given point lies?
UserDisplayName: w13rfed
ThreadText: # How to design a neural network to predict the quadrant where a given point lies?
  
  (Asked by: username_0 on 2018-02-01)
  
  I've written a single perceptron that can predict whether a point is above or below a straight-line graph, given the correct training data and using a sign activation function.
  
  Now, I'm trying to design a neural network that can predict whether a point $(x, y)$ is in the 1st, 2nd, 3rd or 4th quadrant of a graph.
  
  **One idea** I have had is to have 2 input neurons, the first taking the $x$ value, the 2nd taking the $y$ value, these then try and predict individually whether the answer is on the right or left of the centre, and then above or below respectively. These then pass their outputs to the 3rd and final output neuron. The 3rd neuron uses the inputs to try and predict which quadrant the coordinates are in. The first two inputs use the sign function.
  
  The problem I'm having with this is to do with the activation function of the final neuron. One idea was to have a function that somehow scaled the output into an integer between 0 and 1, so 0 to 0.25 would be quadrant 1, and so on up to 1. Another idea would be to convert it to a value using sin and representing it as a sine wave as this could potentially represent all 4 quadrants.
  
  **Another idea** would be to have a single neuron taking the input of the $x$ and $y$ value and predicting whether something was above or below a graph (like my perceptron example), then having two output neurons, which the 1st output neuron would be fired if it was above the line and then passed in the original $x$ coordinate to that output neuron. The 2nd output neuron would be fired if it was below, then pass in the original $x$ value, as well to determine if it was left or right.
  
  Are these good ways of designing a neural network for this task?
  
  **Tags:** neural-networks, activation-functions, hyperparameter-optimization, hyper-parameters, network-design
  
  ---
  
  ## 0 answers
  
  