tag
机器学习 分类
2021-11-08
实验环境准备
Anoconda3.7
TensorFlow2.1
PyCharm
安装Anoconda
官网下载安装,勾选添加到环境变量。
安装TensorFlow2.1
1 打开安装好的Anoconda Prompt
2 创建
2021-11-08
1234from sklearn.datasets import make_blobsimport matplotlib.pyplot as pltfrom sklearn.cluster import KMeansimport numpy
2021-11-08
12345from sklearn.datasets import make_blobs #调用生成数据函数from sklearn.neighbors import KNeighborsClassifier #调用KNN分类器函数impo
2021-11-08
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
1 / 3