CST383 - Week 6
CST383 Week 6 This week, we are learning about how to optimize machine learning algorithms. Hyperparameters are values that are not able to be learned by the algorithm, so must be set before the training of data begins. To find the best values for hyperparameters, tuning tests on the existing data needs to be ran. With hyperparameter tuning, we can use three strategies: grid search, random search, or weighted KNN. Grid search goes through every combination in a data set to find the best value for the hyperparameters. Random search quickly calculates a best value from the minimum amount of tests, but can be inaccurate. Weighted KNN makes inverse distance of points matter more than the mode of the nearest # neighbors. The steps for hyperparameter tuning best practices is: Test/train split Cross validation with training data Train best model on full training set Compute test score with test set For supervised learning, classification predicts a category while regression predicts a qu...