In my post on Machine Learning (ML) (see below), I was ‘looking’ for the best way to update my speech recognition program to recognize certain words.
So, I then decided to try the more basic perceptron example I have seen in many forms across the web. I chose a version I found on coding vision (see reference #2). I was able to quickly replicate that author’s success.
My application structure looks like this:
- Make a GET call
- View The Results
After completing that part, I wanted to see if it could be applied the house example and this answer is…well, kinda 🙂 Let me explain.
The house example had three parameters – bedroom count, square footage and the city it is located in. I plugged this directly into the same perceptron code to see if it worked. However, instead of 2 inputs, there were 3. Perceptrons seem to work by dividing two groups of points that are linearly separable (as the reference #2 author pointed out). 3 inputs would imply a 3 dimensional graph with an x, y and z axis.
I never got it to work 😦
So, I removed the location city from the list of variables to make it essentially the same problem as reference #2’s author presented. It works…kinda and only sometimes.
- First Issue – If you look at my training data, you will notice that the ‘recognized’ element is last (i.e. ‘expectedOutput: 1’). If I placed it at the start or middle of the training set, I get false positives.
- Second Issue – If you look at my run data, you will notice that the number of bedrooms and the square footage size are not greater than the ‘recognized’ element. If I added either to a non-recognized element, I got false positives. It doesn’t seem to matter whether I include data that is larger in the run or training set.
As long as I stayed within these caveats (ish), it seems to work 🙂
However, it just kinda reaffirms to me that the Perceptron is good for small, academic and limited issues. I have played with same algorithm in the past. For example, I tried to get it to recognize the color blue. More specifically and following another blogger’s post (he couldn’t get it to work either), I created a 3 input Perceptron to process various RGB colors. Each input had a value of 0-255/255. Never worked for me.
For an algorithm to be able to solve the house problem with more than two inputs reliably, it must be a lot more robust than this effort. Or, my knowledge of how to correctly model my data needs to be improved. I think both are true 🙂
So, my next post in this series will (hopefully) be with a robust, supervised machine learning algorithm that can complete the house problem.