Categories
Uncategorized

Writer’s Block Got Me Like

This week has not been the easiest between struggling to make sense of a lot of new information and some new stressors in my personal life. I’m already late writing this post, but I would much rather submit something late than not at all (even if the 3 lowest grades get dropped). I cannot think of a single thing related to computer science or a career that I would like to write about right now, so I’m going to talk about my current favorite pastime instead – Pokemon GO!

I play and talk about this game ALL the time.

I have never been into video games. I would go through phases of playing The Sims and Zoo Tycoon, but I really kind of hated things like Mario Kart and Mario Party. They moved way too fast for me and my cousins got SO into them that it just wasn’t fun for me. I hated fumbling with controllers and the gloating that was sure to come when I lost (which was every time I played). Other than the occasional Sims kick, I didn’t touch video games for about two decades.

That is, until one fateful day when my partner asked me to download Pokemon GO just so that he could make a new friend in order to complete a task. I made a jokey username and added his referral code, fully expecting to delete the game later that day.

Me and my Ultra Buddy, a 3-star Magikarp who flops along with me as long as I feed him berries. Today he brought me a Snowy Pinecone as a souvenir!

It feels a little silly, but getting hooked on this game has been really helpful for my mental health. It’s winter here in Portland right now, so it has been raining more days than not for the past few months. I’m naturally a homebody and I tend to really hunker down when it’s cold and wet outside. That’s usually a recipe for a SAD season, but it’s been different this year. I still hate winter, but at least I am willing to venture outside multiple times a day – even in the rain.

I definitely wasn’t walking this much this time last year!

In addition to the increased physical activity and vitamin D, having constant goals assigned to me with useful rewards given upon achieving those goals has given me some much needed dopamine hits. Yes, the rewards are useless outside of the game and yes, my eyes are glued to my phone a little more often than I’d like, but this silly little phone game has brought me happiness and enjoyment that I never thought I’d get from a game.

There’s always rewards to work toward – and who doesn’t love bonuses?

P.S. If anyone out there wants to play, I’ll happily send you my code!

Categories
Uncategorized

Knowing When To Take A Break

I can easily get lost in a task. When I get into something, hours can pass without my noticing. This can be great sometimes – I can sit and grind away at a problem for hours if I find it interesting.

This often means that I can make a lot of progress all at once if things go smoothly. That’s not always the case, though. Bugs and other issues come up while I’m working. Most of the time I can just handle them and move on, but sometimes I’ll run into an issue that I just can’t figure out.

In many situations, being able to continue working on a stubborn problem until you find a solution is a good thing. At a certain point, it’s better to take a break and walk away from the problem for a while.

Photo by Elisa Ventur on Unsplash

It’s difficult to know when I’m at that point. I fall into the trap of thinking “I know I can figure this out if I just try one more thing.” For awhile, this isn’t a problem. Suddenly, I’ll find myself getting so frustrated that I feel physically ill. Even at that point, it’s hard to step away because, again, “I know I can figure this out if I just try one more thing.”

I know from experience that sometimes all it takes to solve a previously unsolvable problem is to take the dog for a walk and revisit the issue after a break. Sometimes the best option is to call it a day and come back to the problem with fresh eyes in the morning.

The current issue I’m dealing with (which prompted me to write this post)

Right now, I’m deciding to step away from the computer for the rest of the night. I’ve been trying to figure out why VSCode isn’t recognizing numpy anymore, even though it had been up until this afternoon. I’ve spent way too much time on this issue and I haven’t gotten anywhere. Tomorrow, I’ll start fresh.

Categories
Uncategorized

HelloWorld.ipynb

Today, I wrote my first simple program using scikit-learn, a machine learning library for Python. During our kickoff meeting, our sponsor recommended that we familiarize ourselves with this library before getting started on our project. My teammate found a helpful tutorial and shared it with the rest of us.

“Machine Learning with Python” tutorial by Programming with Mosh

Of course, the first thing the tutorial had us do was write a Hello World program. Instead of using an IDE like PyCharm or Visual Studio Code, we used Jupyter. Jupyter is helpful when writing a program that interacts with data because it allows you to view the data just below any function calls you make.

Jupyter allows you to view data just below function calls. Here, Jupyter is showing the output of describe() and values() when working with the Video Game Sales dataset from Kaggle.

After getting familiar with Jupyter and its shortcuts, we begin working on a program that predicts a person’s musical preference based on their age and sex. We are using a simple dataset with only a few attributes and we are assuming that all males within a certain age range prefer the same type of music. The same is assumed to be true about females. At this point, the intimidation I was feeling about getting started faded away. Working with such a small set of data and having only 2 factors (age and sex) made it easy to grasp.

Our first step was to train our model to be able to predict a person’s musical preference. Since we only had one set of data, we learned how to split the data into input data for training, input data for testing, output data for training, and output data for testing. We were also able to obtain the accuracy of the model by comparing the testing output (musical preference) with the actual data. Then, we played around with using different ratios of training data to testing data and saw how drastically this changes the accuracy.

Once we got a model with a sufficiently high accuracy score, we learned how to make our model persistent so we don’t have to create a new model each time we edit our program. This isn’t exactly essential for this simple program as it deals with only a small amount of data, but it would absolutely be necessary when dealing with more complex programs and large amount of data.

We also learned how to create a .dot file, which shows us the decision tree that our model creates and uses. Below, you can see the line of code that creates this file, followed by the visual representation of the decision tree.

This exports a .dot file that shows the decision tree created and used by our model.
When opened in VSCode with a .dot viewer extension, we can see the decision tree created and used by our model.

This tutorial showed how accessible machine learning is – with this help of scikit-learn, anyone who is familiar with Python and has even a small amount of data can write a program that utilizes machine learning to make predictions when tested. This program uses a binary decision tree, but there are several other approaches (including neural network, which we will be using in our Capstone project). I’m excited to start working with other components from this library!

Categories
Uncategorized

Fire Risk Prediction

I’ve been waiting to write this post in the hopes that we would get our project assignments before the first blog post is due. I’m very happy that I got my first choice, the fire risk prediction project! There were a few others that I would have enjoyed working on, but this one immediately stood out to me.

I’m a little nervous about this project, too. I’ve never done anything with machine learning or artificial intelligence, so I don’t know too much about it. The first thing that comes to mind when I think of AI is how many wonderful and disgusting cat names become possible when a computer is given basic training. The second thing I think of is the programmer who used Generative Adversarial Networks to create a generation of freakishly sort-of-believable Pokémon. Beyond that, I’m basically a layperson in this subject.

Luckily the project brief says that understanding the basics of machine learning and artificial intelligence is an objective, not a prerequisite. I expect that I’ll need to spend quite a bit more than 10 hours per week to get a good grasp on the subject and be an asset to my team. Thankfully, this is the only class I’m taking this term and my job will be somewhat less demanding after I finish my current project, so I should be able to devote plenty of time to this class.

Overall, I’m very excited to get started on this project! I know it will be challenging, but what better way to learn a new topic than to jump in with “code that could save lives”?