Skip to main content

Posts

Showing posts from December, 2017

Deep Learning - Intro to Neural Networks

The next section of the course I'm taking covers some theoretical topics (perceptrons, activation and cost functions, gradient descent, and back propagation) before diving into the manual creation of a Neural Network using Python. Here is the code I wrote while following this section of the course, without using Tensorflow or any other machine learning specific libraries. Additionally, here are some notes I took during the lectures: Introduction to Neural Networks A “perceptron” is an artificial attempt to mimic biological neurons biological neurons have a body that accepts input through many Dendrites and pushes output through a single Axon, which connects to another neuron artificial neurons (perceptrons) have a similar structure: only 2 inputs allowed each input has a feature value each input is multiplied by a “weight”, the value of which is typically random the result of input*weight are passed to an activation function in the body e.g. if ...

Deep Learning - Crash Course in NumPy, Pandas, SciKit Learn, and Data Visualization

In this section of the course I'm taking, I'll get a hands-on introduction to selected portions of the Python libraries NumPy, Pandas, and SciKit-Learn. I'll also use these in combination with other libraries to create basic data visualizations. These lectures only cover a handful of functions/methods in each library, and don't go in depth -- they only cover common functionality for beginner's deep learning projects. Here I'll provide a brief set of notes I took in the beginning of this section, but the substance of this post will lay in the Jupyter Notebooks that I've created while following along with the lectures and while implementing the review challenge at the end of the section. I'll also mention any trouble I had. Crash Course Intro Notes Three types of data: training data, test data, and holdout data To "fit data" means to divide each data point by the largest data point in the set, which means the all data will be betw...

Deep Learning - Intro

The next section of the course I'm following is a broad overview of machine learning, and contains only a single lecture. Here are the notes I took: What is Machine Learning? Supervised Learning Data has labels (AKA the answer to what the data is representing) Classification Classifies a new data set that has no label as belonging to a discrete category E.g. Given a person’s height and weight, determine if they are male or female. Regression Gives a continuous value for a given set of data E.g. Given the size (in square feet) of a house, predict the value of the house. Unsupervised Learning Data doesn’t have labels (the answer to what the data is representing), only features Look for patterns to find a structure Clustering: group similar data points together. The data scientist must then interpret what each cluster represents. Reinforcement Learning Trial and error; which actions yield the best results? E.g. Self-driving cars,...

Deep Learning - Setup

The next major software development topic I'll be exploring is Deep Learning. Much of my insight will come from this online course I'm taking via Udemy. I've just started it, so I can't provide an informed review just yet. I would recommend though, if you want to purchase it, wait until it goes on sale (which it does quite often). The "normal" price is $199, but I got it for $15. I'm not affiliated with or sponsored by Udemy in any way. Quick Note: I will sometimes use the phrases "machine learning" and "deep learning" interchangeably throughout this blog, though I'll be primarily dealing with the former. Here is a diagram I found of their relation to each other and with the more broad Artificial Intelligence field: [ Source ] From now on, unless I specify otherwise, I'll be using a 2015 Macbook Pro for my work. The OS is currently OS X 10.13.1, AKA High Sierra. This post will cover any issues I have while setting up ...

Using (Unofficial) Craigslist API for Python

Recently I've been searching for a new apartment to move into once I graduate from college, and got tired of querying Craigslist (the best site I've found for this purpose) with the same terms over and over again. So, I thought it would be useful to write a simple script to automatically send me a list of properties that match my search criteria once per week. My complete program can be found here . If anyone would like to create their own query, feel free to fork my program on Github for your own use. I used  this  source for the Craigslist portion, and  this  source for the email portion. Here's what an email looks like: As you may have guessed, my query is for a room for rent in San Francisco, along with a few other filters. Note that my script only returns the first 5 results.   The biggest issue I encountered while writing this program was getting an email to send to my primary Yahoo address. I eventually gave up and tried using my...

Arduino Project: Sound Alert via Twitter

For my second IoT project using Arduino MKR1000, I'll employ a sound sensor to send out alerts via Twitter when a loud sound is detected. This could have many uses, ranging from informing the inhabitants of a house that there is someone at the door, informing a car owner that their alarm is going off, or residents that a gunshot has gone off in their neighborhood. See my previous posts to learn about the setup process for the Arduino MKR1000, which is wifi-enabled without any additional extensions. I will be using the Arduino IDE to compile the code. For hardware, I'll be using the sound sensor I purchased here , as well as my Arduino, three solder-free wires, a generic breadboard, and a Kindle power cable (this probably isn't the safest way to power Arduino, but it's what I had). I'll be following this  tutorial to set up the sound detector, as well as some code from here  to utilize Twitter. The sound setup tutorial was very simple and one of the clearest wiring g...