Machine Learning with Text

Standard

I started learning how to do machine learning on text data. I made a Python program with a small training set using the sklearn module to predict if a message is important or not. Since it is a small training set the results are not that accurate. This could be used for an app that learns what texts are considered important over time and marks them. Then the user manually decides if a text is actually important or not and the app learns what texts are considered important from this.

link to download the Python code

Here is an image of the output:

Screen Shot 2017-07-07 at 4.18.44 PM.png

 

 

Aligning Images with a UI

Standard

I added to my Python program where a user can click on 4 points and the coordinates of those points will be returned. Now the user selects the 4 corners of a rectangle in order and given the corresponding coordinates of those corners in a straightened image, the program straightens a warped image. If the user presses ‘c’ after the corners are selected the program will straighten the image. If the user presses ‘r’ the previous selections will be cleared and the user can select 4 new corners.

Here is a link to a folder with the program and images in it. You have to download the entire folder and run the Python program from within it.

An image of the output after the program is run:Screen Shot 2017-07-03 at 5.53.39 PM.png

Coordinates of corners of a rectangle

Standard

I created a program using Python and OpenCV where a user can click on 4 points in an image and the program will return the coordinates of those 4 points. If the user presses ‘c’ after the points are selected the program will print the coordinates of the points. If the user presses ‘r’ the previous selections will be cleared and the user can select 4 new points.

Here is a link to a folder with the program and images in it. You have to download the entire folder and run the Python program from within it.

An image of the output:

Screen Shot 2017-07-03 at 4.22.46 PM.png

Warped Coordinate System

Standard

I was trying to find a coordinate system to find the correspondence between the coordinates of points in an original image of a rectangle and the coordinates of points in a warped image of a rectangle. I believe I found a coordinate system based on the boundaries of the warped rectangle but I still have to check if it is accurate. Here is an image of the coordinate system I found:

IMG_0860.JPG

Aligning Images

Standard

I recently wrote a program to align images using OpenCV in Python. I drew a rectangle with ten dots on it and took pictures of it at different angles. I used the locations where each of the corresponding dots moved to find a homography between the straight picture and each angled picture. I then warped the angled pictures using this homography to align them.

Here is a link to download the folder with the images and Python code in it as well as an image of the output. Make sure to download the whole folder and run the python code from within that folder.

perspective1output.png

 

 

 

 

 

Habitable Exoplanets

Standard

I developed a machine learning Python program that uses a Support Vector Machine classifier from the sklearn module to predict if an exoplanet is in the habitable zone of its star system (the zone where liquid water can exist). The features of the planet required by the classifier to make the prediction are the orbital period of planet in days, number of planets in the system, and number of stars in the system.

I used the astroquery module to obtain the data from the Open Exoplanet Catalog

Link to download Python code

Here are some pictures of the program:

Screen Shot 2017-06-09 at 1.38.30 PM.png

Predicting Intel Revenue

Standard

I wrote a machine learning Python program using the sklearn module that predicts the revenue for Intel Corporation. I got the data for the training set from a website called Quandl that has a wide variety of financial data. I used Ridge regression with a 3rd degree polynomial for my machine learning algorithm.

Link to download Python code

Here is a picture of the output of my program:

Screen Shot 2017-06-06 at 3.58.49 PM.png