第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

2類分類中的回歸誤差

2類分類中的回歸誤差

翻翻過去那場雪 2021-05-05 15:14:41
我正在嘗試使用g1作為類0和g2作為類1進行邏輯回歸:ft=np.vstack((g1,g2)) #data stacked on each otherclass = np.hstack((np.zeros(f), np.ones(f))) #class values in column matrixclc=np.reshape(cl,(2*f,1)) #class values in an arrayw=np.zeros((2,1))   #weights matrixfor n in range(0,5000):    s = np.dot(ft, w)    prediction = (1 / (1 + np.exp(-s))) #sigmoid function    gr = (np.dot(ft.T, class - prediction)) #gradient of loss function    w += 0.01 * grprint (w)我使用sklearn評估結果:from sklearn.linear_model import 我得到:w = [[6.77812323] [2.91052504]]coef _ = [[1.22724506 1.10456893]您知道重量為什么不匹配嗎?我的數學有什么問題嗎?
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 228 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號

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