亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
  • 權重更新算法示例2

    查看全部
  • 權重更新算法示例2

    查看全部
  • 權重更新算法示例

    查看全部
  • 權重更新算法

    查看全部
  • 神經網絡
    查看全部
    0 采集 收起 來源:課程的開篇詞

    2018-03-21

  • 使用anaconda,jupyter
    查看全部
  • 喜歡這樣念念碎的老師,哈哈
    查看全部
  • 2018/03/10
    查看全部
  • 軟件、代碼
    查看全部
  • 第3段 from matplotlib.colors import ListedColormap def plot_decision_regions(x,y,classifier,resolution=0.02): colors = ('red','blue','lightgreen','gray','cyan') cmap = ListedColormap(colors[:len(np.unique(y))]) x1_min,x1_max = X[:,0].min()-1,X[:,0].max() x2_min,x2_max = X[:,1].min()-1,X[:,1].max() xx1,xx2 = np.meshgrid(np.arange(x1_min,x1_max,resolution),np.arange(x2_min,x2_max,resolution)) Z = classifier.predict(np.array([xx1.ravel(),xx2.ravel()]).T) Z = Z.reshape(xx1.shape) plt.contourf(xx1,xx2,Z,alpha=0.4,cmap=cmap) plt.xlim(xx1.min(),xx1.max()) plt.ylim(xx2.min(),xx2.max()) plt.scatter(X[:50,0],X[:50,1],color='red',marker='o',label='setosa') plt.scatter(X[50:100,0],X[50:100,1],color='blue',marker='x',label='versicolor') plt.xlabel(u'花徑長度',fontproperties='SimHei') plt.ylabel(u'花瓣長度',fontproperties='SimHei') plt.legend(loc='upper left') plt.show() plot_decision_regions(X,y,ppn,resolution=0.02)
    查看全部
  • 第2段 import pandas as pd file = 'http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data' df = pd.read_csv(file,header=None) #header=None 數據第一行是有用數據,不是表頭 print(df.head(10)) # 顯示前十行 #數據可視化 scatter 散點圖 import matplotlib.pyplot as plt import numpy as np y = df.loc[0:100,4].values y = np.where(y == 'Iris-setosa',-1,1) X = df.iloc[0:100,[0,2]].values #plt.scatter(X[:50,0],X[:50,1],color='red',marker='o',label='setosa') #plt.scatter(X[50:100,0],X[50:100,1],color='blue',marker='x',label='versicolor') #plt.xlabel('花瓣長度') 亂碼坐標不顯示 #plt.xlabel(u'花瓣長度',fontproperties='SimHei') #plt.ylabel(u'花徑長度',fontproperties='SimHei') #plt.legend(loc='upper left') #plt.show() ppn = Perceptron(eta=0.1,n_iter=10) ppn.fit(X,y) plt.plot(range(1,len(ppn.errors_)+1),ppn.errors_,marker='o') plt.xlabel(u'Epochs',fontproperties='SimHei') plt.ylabel(u'錯誤分類次數',fontproperties='SimHei') plt.show()
    查看全部
  • 基本按著老師的寫的,能出圖~ 筆記字數有限制,代碼分了幾部分,注釋參考老師的講解。 (第1段) # -*- coding: utf-8 -*- import numpy as np class Perceptron(object): def __init__(self, eta = 0.01, n_iter=10): self.eta = eta; self.n_iter = n_iter; pass def fit(self, X, y): self.w_ = np.zeros(1 + X.shape[1]); self.errors_ = []; for _ in range(self.n_iter) : errors = 0 for xi, target in zip(X,y): update = self.eta * (target - self.predict(xi)) self.w_[1:] += update * xi self.w_[0] += update; errors += int(update != 0.0) self.errors_.append(errors) pass pass pass def net_input(self, X): return np.dot(X, self.w_[1:]) + self.w_[0] pass def predict(self, X): return np.where(self.net_input(X) >= 0.0 , 1, -1) pass pass
    查看全部
  • 權重更新
    查看全部
  • 算法總結
    查看全部
  • 機器學習
    查看全部
    0 采集 收起 來源:課程的開篇詞

    2018-02-26

舉報

0/150
提交
取消
課程須知
有一定的編程基礎,例如掌握C語言。
老師告訴你能學到什么?
1、機器學習的基本概念介紹 2、數據分類算法介紹 3、神經元感知器分類算法并進行實現 4、數據解析和可視化設計 5、使用數據訓練神經網絡 6、如何使用訓練后的神經網絡分類數據 7、適應性線性神經元的基本原理并實現 8、適應性線性神經元網絡進行數據分類

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!