logo
Loading...

負相關前方的係數範圍應該如何決定? - Cupoy

本題x亂數範圍為0~50 . (x = np.random.randint(0, 50, 1000)...

ml100-3,ml100-3-d14

負相關前方的係數範圍應該如何決定?

2019/09/23 下午 00:40
機器學習共學討論版
herohsu
觀看數:35
回答數:1
收藏數:0
ml100-3
ml100-3-d14

本題x亂數範圍為0~50 . (x = np.random.randint(0, 50, 1000))

直覺上會使用

y = 50 -x + np.random.normal(0,5,1000) 來計算

但答案卻是有點差異如下,請問是如何決定這項數值的?

y = 100 - x + np.random.normal(0, 5, 1000)

回答列表

  • 2019/09/24 上午 10:20
    張維元 (WeiYuan)
    贊同數:1
    不贊同數:0
    留言數:0

    前面那個數不影響,這邊應該只是用來方便觀察而已。主要只要寫到 x 有個負號,即可達到負相關的行為。