def run(self):
""" ?? """
# ????
X, Y = self._fetch_data()
clf = self.get_classifier(X, Y)
# ??
X, Y = self._fetch_test_data()
res = []
for item in range(11):
hit_ratio = self.predict(clf, X, Y, item * 0.1)
res.append([item * 0.1 * 100, hit_ratio * 100])
# ??????????????
arr = np.array(res)
plt.plot(arr[:, 0], arr[:, 1]) # ???
plt.plot(arr[:, 0], arr[:, 1], 'ro') # ???
plt.xlabel('???(%)')
plt.ylabel('???(%)')
plt.title('??Lasso?????????????')
plt.show()
评论列表
文章目录