We will train machine learning models in earnest using preprocessed data. Supervised learning is divided into regression, which predicts continuous numbers, and classification, which identifies specific categories. In this unit, we will understand the principles of Gradient Descent, where a model reduces the loss—the difference between the correct answer and the predicted value—and classify iris varieties and Palmer penguin species using Logistic Regression and Decision Tree models.
Learn the mathematical intuition of gradient descent, which involves finding the lowest valley (minimum loss) from the mountaintop.
Unlike linear regression that draws a straight line, probability ($0 \sim 1$Verify the principle of performing classification with ).
Learn how tree models work to classify data by throwing conditional branches like twenty questions.
Open each notebook, save your own copy, and complete the exercises.
Visualize the Iris features, examine how loss changes during training, and interpret the confusion matrix. Explain inference and loss in your own words.
Train a linear classifier and a decision tree on the same dataset. Compare their accuracy and consider why the results differ.
Complete the missing code to classify penguin species, then compare your work with the completed example.
Open the practice | View the completed example
Mission (Model Hyperparameter Experiment): Palmer_Penguins_Classification_Completed.ipynbReplace the classification model in DecisionTreeClassifier(max_depth=2)and DecisionTreeClassifier(max_depth=10)with and run it, and analyze how training accuracy and test accuracy change depending on the depth of the tree ( ) with at least 3 lines of comments.max_depth