吴恩达机器学习作业8 :Anomaly Detection and Recommender Systems python 实现(附源码)
一、异常检测例子1:二维数据的异常检测1.数据可视化data=scio.loadmat(r'ex8data1.mat')X=data['X']Xval=data['Xval']yval=data['yval']#数据可视化plt.scatter(X[:,0],X[:,1],c='b',marker='x')plt.show()结果:2.正态分布图mu,sigma2=estimate_gaussia