title: How apply gradient boosting to this function and this data?
body: <pre><code>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
  
  </code></pre>
  <p>The variable that i want to minimize is &quot;B_estimated&quot;.
  If you need more information about the prblem ask me.</p>