如何将梯度提升应用于此函数和此数据?

问题描述

def square_A(B_estimated,x,y):
    B_estimated = np.matrix(B_estimated)
    z = y - np.dot(x,B_estimated.T)
    return np.dot(z.T,z)
# Where x and y is defined here:
m = 1000
n = 100

x0 = np.ones([m,1]) 
x1 = np.random.uniform(0,10,([m,n]))
x = np.concatenate([x0,x1],axis = 1)

beta = np.random.randint(-5,5,size = ([1,n + 1]))
error = np.random.normal(0,1,(m,1))

y = np.dot(x,beta.T) + error

我想最小化的变量是“B_estimated”。 如果您需要有关问题的更多信息,请询问我。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)