A self-implemented nb classifer for machine learning homework