python(2)
-
[9] Handle missing data (Python Data Analysis, Machine Learning)
Handle missing data - Missing data can be addressed in two main ways: 1. Delete a sample (Row) or column (Feature) with missing data. 2. Use interpolation to predict missing data. - Average, median, frequency, constant, etc. are used. Let's use the code to check. 0. Create a data frame with missing data Calling up required libraries import pandas as pd # When it used to make DataFrame import num..
2021.02.06 -
[6] Information gain and impurity of decision tree
Decision trees are named because they are like trees in the form of class classification through certain criteria. The criteria for classifying decision trees are information gain. Information gains can be determined based on impurity. As the name suggests, impurity is an indicator of how various classes are mixed into the node. \( IG(D_p,f) = I(D_p) - \sum_{j=1}^{m}\frac{N_j}{N_p}I(D_j) \) Info..
2021.01.06