Machine Learning Task-1

Published on Sep 21st, 2019 03:33 AM

My First machine learning experience hasn't been all its promise. However I remain undeterred in my quest to come up with automated algorithms that make either forecasting, pulling data together for process actuation and machine intelligence seamlessly executed. At this task I have gotten a lot of help and direction from other interns. Got a chance to put @TopeA1 through the very first stages and giving him support where needed. It turns out he helped me hurdle through kinks in my code line up. It indeed is a worthy exercise teaching what one believes they have learned well. My abilities at:

have definitely improved.

It took me a while to get started with this task as I wanted to understand it accurately before proceeding. Eventually I realized the best way to get through with it is just START. Prior to starting, I knew I was to assemble data for classifications code sorting but remained clueless about how to write the codes.

Quickly I read through the thread of conversations on slack and called @vahiwe when I realized time was ticking. Kraggle was a good resource for datasets and I realize there is almost no learning that Medium posts would not come-in valuable to.

After saving my files into two folders and naming appropriately, I proceeded with writing my code accordingly:

Plate Number Classification

Prepare the Data

  • Calling the aboce funstion and passing it the two image list
  • Setting the classes. 1 for Plate_Numbers and 0 for Negative Images

  • A function for displaying images

Build Model

  • Logistic Retrogression Model
  • Here we import logitstic RegressionCV from sklearn.
  • Initialize the LRC
  • Fit our data into the model
  • Print the model accuracy on our training set

  • The function to show image prediction

  • Since we don't have a test set, we predict our model on our training set.

KNN Classification

  • From above score we can see that KNN performs poorly compared to Logistic Regression

Radius Nearest Neighbor