Week 4: Meet Lucas

Mar 17, 2019

Week 4 started off the same way as others – attempting to figure out what the issue was with the glmnet function. I’m happy to say, that this week, I was finally able to work out a solution! On Tuesday morning, after meeting with Ms. Bhattacharya, I called my external advisor and within an hour, we were able to come up with possible solutions to the problem. The one that worked was this:

fitALL = glmnet(tempALL, as.factor(mnist$train$y), family = “multinomial”, lambda = 0.01)

The function “as.factor()” just converts the data into its labels. For example, the training data labels from MNIST (represented by mnist$train$y) will look something like this:

0 1 5 3 6 8 2 4 8 9 4  7 5 3 4 4 7 1 6 0 6 4 2 2 3 8 6 3 5 7 8 9 0 7 2

If I do as.factor(mnist$train$y), I’ll get the following:

0 1 2 3 4 5 6 7 8 9

This indicates that there are 10 different elements in the entire “mnist$train$y,” 0-9.

After getting the coefficients, numbers that represent the parts of each numerical digit that the computer uses to differentiate them from each other, I found that my old way of finding out the most important coefficients doesn’t work for classifying all 10 digits. I had to now create individual “filters” that indicated the significant areas of each picture for each and every numerical digit. However, the accuracy of the glmnet function was only 75%, whereas I’m looking for an accuracy higher than 85%. Therefore, next week, I’ll be focusing on increasing my accuracy.

Lastly, I learned how to transfer files onto the Argon Cluster! I can now run programs much faster than I can on my own computer with the help of this cluster of computers. In addition, I can run code line by line, similarly to an R console, in Argon.

Now that we’ve reached the end of this blog post, you might be wondering why this week’s title is Meet Lucas. My family and I are fostering a dog! Here’s Lucas:

See you next week,


7 Replies to “Week 4: Meet Lucas”

  1. Simran S. says:

    I miss him

    1. Arshia S. says:

      I know, me too 🙁

  2. Sahithi P. says:


  3. Shreya S. says:

    Love lucas but still scarred 🙁

  4. Vidur G. says:

    Lucas looks awesome!

    Are there any alternatives to the glmnet function and is there any way you would like to optimize your existing code?

    1. Arshia S. says:

      Hey Vidur,

      As of right now, I think glmnet is the best option for accuracy – I was able to get it up pretty high during week 5!

  5. lucas ur dog says:

    hi arshia I miss u
    bark bark meow

Leave a Reply

Your email address will not be published.