注意: 每个文件只有开始的 class 是模型本身,其它代码都是用来测试的,每个模型的实现都在 100 行以内
Note: Only the class at the beginning of each file is the model itself, the rest of the code is for testing, and the implementation of each model is within 100 lines
File - logistic_regression.py
Cost Function -
Optimization Algorithm - Gradient descent method
File - support_vector_machine.py
Example -
Cost Function -
Optimization Algorithm - Sequential minimal optimization (SMO)
File - perception.py
Example -
File - naive_bayes.py
Example -
File - k_nearest_neighbor.py | util_kd_tree.py
Example -
File - decision_tree.py
Optimization Algorithm - Generalized Iterative Scaling (GIS)
Example -
File - random_forest.py | | decision_tree.py
Example -
File - gradient_boosting_decision_tree.py | decision_tree.py
File - linear_discriminant_analysis.py
File - maximum_entropy.py
Example -
File - gaussian_discriminant_analysis.py
File - principal_component_analysis.py
Example -
File - kmeans.py | util_kd_tree.py