Please enable JS

TAKING A STEP BACK

On pausing my machine learning studies to learn the foundations of programming. Thoughts on the PocketCAS calculator app and derivatives.

TAKING A STEP BACK

OCTOBER 12, 2016/BARRY COLONNA

I completed week one of Machine Learning: Regression, which is the second course in the Machine Learning Specialization from The University of Washington on Coursera. I’m also moving relatively quickly through differential calculus on Khan Academy. Getting all the links out of the way up front!

Derivatives

img

We began using derivatives in machine learning one day before I learned it on Khan Academy. If that’s not perfect timing, I don’t know what is. Actually, it really isn’t. I didn’t learn the power rule until several days after using it in machine learning and I was completely lost as to how that worked. It makes sense to me now, but gee whiz it was a mystery at the time.

A derivative is the instantaneous rate of change of a curve or function. It’s the slope of the tangent line at a specific point on a function. Okay, now I’m getting technical. It’s the instantaneous rate of change. It’s easy to calculate the average speed of a car or runner, but you need derivatives to calculate the speed the car is traveling exactly 5 seconds after it begins accelerating, for example.

I try not to explain too much about the math I’m working on because it’s difficult in a blog format, but I sometimes think it’s important to give you the basics so you’re not completely lost when I discuss terms you may not be familiar with.

So that’s derivatives, and we use them fairly often in machine learning and I’m learning all about them in calculus.

PocketCAS Calculator App

I downloaded this PocketCAS graphing calculator app for my phone many months ago in anticipation for taking advanced mathematics classes. In many ways it was aspirational, much in the same way I was buying shirts too small for me before I began losing weight.

img

I’ve used the calculator here and there, namely for problems that can’t be handled by the standard phone calculator. I have mixed feelings about the PocketCAS. It is a powerful tool that can handle advanced mathematics, i.e.: calculus & linear algebra, and it draws beautiful graphs. Seriously, the graphs are awesome. They’re full color and you can tap a point on the graph to see the coordinates.

But I do have several problems with the app.

For starters, it’s not as quick when you need to do simple calculations. You need to type out the problem on the blank page and then hit the calculate button. Imagine you need the square root of 57/8 as an irrational number (never ending numbers after decimal). On the simple calculator, you divide the numbers and hit the square root button. On PocketCAS, you hit square root, then parentheses, the fraction, then parentheses. I realize that sounds incredibly easy and it’s a terrible example, but the few extra seconds annoys me when I just want to type buttons quickly on the calculator.

img

It excels when there’s a long problem with multiple orders of operations, but it’s overly complicated for simple mathematics. Another issue is locating the operations you need. While some of the more commonly used operations are present on the provided keyboard, others are not. You have to search the menu for logarithm, inverse sine, or even to switch between degrees and radians. These operators are present on most calculators, even the default phone one.

Again, I haven’t used the PocketCAS calculator all that much. For all I know, I may be able to assign keys or add another keyboard. I have no idea. I always planned on learning it before I needed it, but that didn’t happen. I began studying math and that took precedent over learning how to use a calculator that I rarely used. Writing this renews my interest, however. I know it can do pretty much any calculation, I just wish it was more intuitive.

This is a problem with all smartphone or tablet calculators, but I also miss real buttons. I don’t miss them for texting or using the phone or internet, but for some reason I do when it comes to the calculator. I used to have the TI-89 calculator and it was great. I don’t know what happened to it. I’m not sure what the current Texas Instruments model is now so many years later. Is it the TI-984?

I joke, but I’ll definitely need to study up on the PocketCAS calculator and read the tutorials.

Programming

img

I’m beginning to rethink taking the machine learning specialization right now. If you do take it, I highly recommend having the programming and mathematics knowledge required.

I’m not concerned about the math because I’m learning it simultaneously, but programming is another story.

I passed the first week of my regression class, but I really struggled with the programming assignment. We were required to write multiple functions to create a simple regression model. They assume you already know how to write functions because it’s never covered in the lectures, but I do not.

I can look at a simple function and understand what it means, for the most part. But I’m completely lost when I have to write one from scratch. I just don’t know where to begin or how to end it. Oh, and the middle part is confusing too. For all intents and purposes, it is another language. In many ways, it’s more difficult than foreign languages for beginners because it doesn’t use natural language.

I still love the class and the specialization as a whole, but I feel that I need to study the Python programming language more before continuing. I need to pass this class in 180 days, so hopefully I can learn what I need before that. I’ve come a long way in the last 6 months, so that should be sufficient.

Even a month will probably help me considerably. I won’t be an expert, but understanding the intricacies of functions will hopefully make the rest of the specialization more manageable.

I spent all day Sunday working on my programming assignment, which only had 4 questions to answer. I was ready to tear out my hair (figure of speech; I’ve never literally thought of doing that) and wanted to get drunk at the end (absolutely literal, but I have no alcohol because of my stupid diet).

I can only imagine how much more difficult the class will become as we learn more complex algorithms. I will continue one way or another, but I want to take a step back and learn the language first.

I checked the forums for the week and I was surprised to see how many people who had difficulty with the first quiz, which I found pretty intuitive, while no one questioned the assignment.

I feel like an idiot.

img

I should have thought about this before. I had hoped my limited knowledge of coding would be enough to get me through the classes and that they’d teach more advanced programming. I was wrong. While they do teach advanced programming, they expect you to have more than one analytics course under your belt before you start.

Anyway, I found a 5 course specialization on Python. It’s on Coursera again, but it has good reviews. Although I won’t be able to officially enroll in any of those classes while I’m still active with my machine learning course.

I began the first course, Programming for Everybody (Getting Started with Python) from the University of Michigan, to see what’s what. Looking at the specialization, it appears the first course might be sufficient for what I need to know for machine learning. So that’s promising. And this is the first time I’ve seen a class on Coursera that allows you to access ALL course materials without paying. Charles Severance, the professor for the class, makes a point to mention that everything is open source because he wants everyone to be able to use it.

One reviewer said they finished the 7-week course in 3 days. I think that’s a bit ambitious, though the first two weeks are only an introduction and cover installing Python.

So far, I really like the professor and he even mentioned developing skills for taking programming classes at the University of Washington, among others. I assume that’s in reference to the machine learning specialization, but I’m not sure when this was created.

Either way, I’m excited to finally learn to code from scratch.

Conclusion

I’m sorry for going backward, but I think it’s important to develop a foundation in programming before continuing. I should have done this to begin with. I kept hoping I’d be able to figure it out while taking more advanced classes.

I thought I had gotten over my stubbornness. Apparently not!

I hope you are great and happy doing whatever you’re doing. Thank you for joining me. I’ll see you next week!





JOURNAL

This journal will be about my journey to become a data scientist and better myself through education and fitness.

I hope that my words inspire you to follow your dreams and show you that it's never too late to make a change.

SCHEDULE

Data science posts every Wednesday.

Health posts every other Sunday.

Follow Barry