Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def objective(x):
- Q = np.asmatrix(DF.cov()) # Covariance matrix
- x = np.asmatrix(x)
- return x.transpose() * Q * x
- minimize(objective, x0, method='Nelder-Mead',options={'xtol': 1e-6, 'disp': True})
- def der_objective(x):
- Q = np.asmatrix(DF.cov()) # Covariance matrix
- x = np.asmatrix(x)
- return Q * x
Add Comment
Please, Sign In to add comment