I am trying to generate prediction from fitted model (using scikit-learn, a simple linear regression using MultiTaskLasso). I assume coef_ stores the weight of feature. Suppose there are 5 labels and 200 features, it should be 5*200 in 2D. What I did is: (in python) prediction = np.dot(X_test,coef_.T) + intercept_ . But it seems there is something wrong. When I switch to using scikit-learn's function predict(X_test), the result is right. Can anyone tell me what I did wrong?
The difference is only this step, when I use predict, it is right; when I use my code, it's wrong.