CS371p Spring 2022: Jonathan Randall

What did you do this past week?

  • Data Mining
    • My team finished our final project, predicting animal outcomes for Austin Animal Services using Animal Center Outcomes/Intakes data. We achieved reasonably high accuracy (70%), and experimented with a variety of models.
      • Looking back, I wish I had leaned on Scikit-Learn to do feature engineering as opposed to performing it in Pandas. This would have allowed us to input a new record in the intakes database into a “transform” function to prepare the example record for inference (in a very clean way). I have some desire to polish up this project and make it presentable.
  • Big Data
    • I am studying for our final exam.
  • OOP
    • We discussed inheritance and polymorphism. I began working on Life.

What’s in your way?

Life. I made a good deal of progress, but am not passing the hidden test cases on HackerRank. I might write some additional unit tests and attempt to debug, but I have a feeling I will benefit from some of my classmate’s acceptance tests.

I ran into some roadblocks implementing AbstractCell and its virtual methods. Spoiler alert: you have to set them = 0 in the abstract class.

I am hesitant as to whether or not AbstactCell should have a operator= defined. We did something similar with Shape in lecture, but doesn’t it seem a little fishy?

What will you do next week?

Finish Life. Finish an assignment for Data Mining. Take my final exam for Big Data. Send out graduation invitations.

What did you think of Paper #14: The New Methodology?

At my last programming job, we practiced Scrum, which is a specific implementation of Agile methodology. I found it enjoyable and effective. We did switch to Jira at one point which was a bit of a stumbling point. Some work was replicated.

What was your experience of Life, smart pointers, and virtual? (this question will vary, week to week)

The smart pointer approach is very intuitive. Virtual methods were less than intuitive; coming from Java, dynamic binding being the default was a difficult intuition to shake.

What made you happy this week?

I had some friends visit. I have been pretty productive, and I’m excited to finish up the semester in a good place.

I went to a seminar on hierarchical clustering given by Grigory Yaroslavtsev of George Mason University. We had discussed it in my Data Mining class, and I was curious as to what theoretical guarantees it promised, via the trees (dendrograms) produced by a hierarchical clustering algorithm. Grigory pointed out that single-link methods were the same as minimum spanning trees, which I had not realized.

He also went into detail on graph partitioning problems for graph analytics problems, which unexpectedly touched on some material from my Big Data course. Apparently he found some hyperparameters for graph partitioning that allowed for very balanced shards of vertices across worker machines.

What’s your pick-of-the-week or tip-of-the-week?

My tip-of-the-week is for VSCode users, and I have used it for unit tests in Darwin and Life. This is a fragment of one of my unit tests for Life:

TEST(LifeFixture, testConway0) {
    std::string result;
    result = ...;
    std::string expected = "\
*** Life<ConwayCell> 4x4 ***\n\
\n\
Generation = 0, Population = 4.\n\
....\n\
.**.\n\
.**.\n\
....\n\
\n\
Generation = 1, Population = 4.\n\
....\n\
.**.\n\
.**.\n\
....\n\
";
    ASSERT_EQ(expected, result);
}

In VSCode, you can place multiple cursors at the end of each line with alt+shift+i. It is easy to copy expected output into the test case, and add new lines and \ breaks. Highly recommend!

Headshot