简体   繁体   中英

Predict OR Classify set of values by using independent variables using Python

I have a dataset like this:

y1 | y2 | y3 | x1 | x2 | x3 | x4 | ..... xn|
1  | 0  | 0  | 1  | 1  | 0  | 1  | ..... 1 |
1  | 0  | 1  | 1  | 0  | 0  | 0  | ..... 0 |
1  | 1  | 0  | 0  | 1  | 1  | 1  | ..... 0 |

Using the above data, I have independent variables x1, x2 ... xn and dependent variables y1, y2, y3. I want to run some (Machine learning) algorithm which can classify not only one dependent variable but a set of dependent variables. One way is to learn the model one by one for each dependent variable but this could be too time consuming because originally I have more than 50 dependent variables. Is there any suggestions about the algorithm which can do it for me in a faster way ? Thanks.

From the official scikit-learn documentation :

Multioutput classification support can be added to any classifier with MultiOutputClassifier. This strategy consists of fitting one classifier per target. This allows multiple target variable classifications. The purpose of this class is to extend estimators to be able to estimate a series of target functions (f1,f2,f3...,fn) that are trained on a single X predictor matrix to predict a series of reponses (y1,y2,y3...,yn).

So you can use this fantistic library to do the work for you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM