CST383 Week 1
This was our first week in CST 383 - Data Science. This class discusses machine learning, how to analyze data, and how to use Python for data analysis. Python Array Operations In this week's video lecture we discussed various operations one can perform on python arrays. Slicing: Python arrays can be accessed using [start:stop:step]. Start defaults to 0, stop defaults to the end of the array, and step defaults to 1. For example, to access the last three elements in an array we would use array[len(array) - 3:], to access the first half of the array we would use array[:(len(array) / 2], and to access every other element we would use array[::2]. Fancy Indexing: We can use an array as a list of indices we want to get from a different array. For example, array[[0, 2, 4]] would return the first, third, and fifth elements of the array. Broadcasting: We can perform operations on arrays to quickly perform operations on each element in said array. If we have the array [1, 2...