CST383 - Week 1
Overall this first module has been a good introduction into NumPy, and it was great seeing exactly how useful it is for data science in comparison to normal Python lists. I have used Python before but never actually used NumPy arrays in this much depth, so quite a lot of the slicing and operations were new to me. I quite like how you can operate on a full array rather than having to use a loop for it. For example, creating a boolean mask like tuition > 12000 and then using that mask to pull only certain values from the array was a lot simpler than I initially expected. I also thought fancy indexing and slicing were pretty easy once I could actually see the results of each expression.
The 2D arrays took a little more thought for me. I had to pay closer attention to which number represented the row and which represented the column, especially when we started combining indexing with conditions. Problem 20 in the 2D lab was probably the part that made me think the most because I had to first determine which colleges had an above-average number of full-time undergraduates and then find the average tuition for only those colleges. Breaking it into those two ideas made the expression make a lot more sense to me. I think I understand the syntax now, but I could see more complicated multidimensional arrays becoming confusing if there were a lot more rows, columns, and conditions involved.
I also thought the machine learning reading helped connect the coding to what we will actually be doing later in the class. The difference between supervised and unsupervised learning makes more sense to me now, especially with an example like spam detection where we already know which emails are spam or not spam and can use those labels to train a model. I also hadn't really thought about why accuracy should be tested on data the model wasn't trained on. It makes sense that testing it on the same data would not really tell us how well it handles something new.
Something I'm curious about going forward is how much of the NumPy work we will actually do ourselves once we start building machine learning models. Will we normally be creating and filtering arrays ourselves like we did in these labs, or will libraries handle most of that behind the scenes? I can already see why understanding NumPy is important either way, because it gives me a better idea of what is actually happening to the data instead of just calling a function and getting a result.
Comments
Post a Comment