I try to make a function selection by evaluating the outputs of the regression coefficient and select the functions with the largest coefficients. The problem is that I do not know how to get the corresponding functions, since only coefficients from the coef._ attribute are returned. The documentation states:
Estimated coefficients for the linear regression problem. If several targets are transmitted during the fitting (y 2D), this is a 2D array (n_targets, n_features), and if only one target is transmitted, it is a 1D array of length n_features.
I go into my regression .fit (A, B), where A is a 2-D array, with the tfidf value for each function in the document. Example format:
"feature1" "feature2" "Doc1" .44 .22 "Doc2" .11 .6 "Doc3" .22 .2
B are my target values ββfor data that are only 1-100 numbers associated with each document:
"Doc1" 50 "Doc2" 11 "Doc3" 99
Using regression.coef_, I get a list of coefficients, but not their corresponding functions! How can I get the functions? I assume that I need to modify the structure of my goals B, but I do not know how to do this.
source share