2021-11-08 KMeans 机器学习 机器学习课程(魏) 1234from sklearn.datasets import make_blobsimport matplotlib.pyplot as pltfrom sklearn.cluster import KMeansimport numpy
2021-11-08 KNN 机器学习 机器学习课程(魏) 12345from sklearn.datasets import make_blobs #调用生成数据函数from sklearn.neighbors import KNeighborsClassifier #调用KNN分类器函数impo
2021-11-08 SVM 机器学习 机器学习课程(魏) 12345678910111213141516171819202122232425262728293031323334353637383940414243import numpy as npimport pandas as pdimport
2021-11-08 主成分分析 机器学习 机器学习课程(魏) 对数据降维后使用KNN算法进行分类的案例 123456789101112131415161718192021222324252627from scipy.io import loadmatimport numpy as npfrom sk
2021-11-08 决策树 机器学习 机器学习课程(魏) 12345678910111213141516import numpy as npfrom scipy.io import loadmatimport matplotlib.pyplot as pltfrom sklearn.tree im
2021-11-08 拟合 机器学习 机器学习课程(魏) 12345import numpy as npimport matplotlib.pyplot as pltimport numpy.linalg as lgfrom sklearn.linear_model import LinearRe
2021-11-08 朴素贝叶斯 机器学习 机器学习课程(魏) 123456789101112131415161718from scipy.io import loadmatimport numpy as npfrom sklearn.naive_bayes import BernoulliNB #伯努
2021-11-08 线性规划 机器学习 机器学习课程(魏) 123from scipy import optimize as opimport numpy as np scipy.optimize.linprog(c, A_ub=None, b_ub=None, A_eq=None, b_eq=N
2021-11-08 随机森林 机器学习 机器学习课程(魏) 1234567891011121314151617181920#beggingimport numpy as npfrom sklearn.datasets import make_moonsfrom sklearn.metrics imp
2021-11-08 非线性规划 机器学习 机器学习课程(魏) 12345678910111213def minimize(fun: Callable, x0: ndarray, args: Union[Iterable, tuple, None] =