Implement the parzenwindow, which is the experiment 1 in Pattern Recognition.(Harbin Institute of Technology, CS, Master). I've read a few ParzenWindow samples which realized by Python, but none of them are correct, so I spend three days in understanding and programing it. Hope it'll help you:)
The implementation strictly follow the "Pattern Classification second edition". Specifically, the references are in page 138, it is as follows:
方法名 | 所属文件 | 功能 |
---|---|---|
generateDate | parzen_main.py | 生成样本 |
ShowData | parzen_main.py | 绘制样本点 |
dist | parzen_main.py | 计算L2距离 |
gaussCore | parzen_main.py | 高斯核函数 |
ShowData | parzen_main.py | 绘制样本点 |
PN | parzen_main.py | 绘制样本点 |
ShowData | parzen_main.py | Pn公式计算 |
calculate_acc | parzen_main.py | 准确率计算 |
calculate_acc | parzen_main.py | 样本点预测 |
main | parzen_main.py | 主函数 |
calc_statistics | initia_distribution.py | 核对方差、均值 |
main | initia_distribution.py | 绘制初始分布 |
We let test samples' num stay 300 during the whole lab, and adjust the training num N and window sizeh.