How to make train/test split with given class weights I am doing simple multi class classification ML problem. 
I was given train data with perfectly balanced classes. However the data I must predict is not balanced. I was able to deduct the class proportions of test data. 
Is there a way to split train data into train/validation data sets so that validation data set will have class proportions arbitrary set?
To cut it short: lot's of people want to make balanced training and validation set from imbalanced data. I want the reverse: I want to make imbalanced validation set from balanced training set;
Reasoning: I want my validation set to look like test data set; I know that 2 labels out of 7 cover 90% of data in test set (while they cover only 28% in train); I want to pass the same structure to my validation set; 
 A: i'm not sure about the purpose of you'r taks but you can do it with 
X_train, X_test, y_train, y_test = train_test_split(X, y,
                                                    stratify=TEST_PROPORTION, 
                                                    test_size=0.25)

use the argument stratify with the proportion of each class in test set
A: For your idea I can recommend you to do k-fold cross validation: 

https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html
https://scikit-learn.org/stable/modules/cross_validation.html
this will split your data in several train/test splits so that you avoid this unbalanced dataspread. 
What I would do on top is that you should exclude some data before (randomly) to have a real test set. so that in the end after your cross validation even have one data for test left, which was not included at all.

I was given train data with perfectly balanced classes. However the data I must predict is not balanced. I was able to deduct the class proportions of test data.

this will reduce the probability to avoid this inbalanced set.

Is there a way to split train data into train/validation data sets so that validation data set will have class proportions arbitrary set?

This you really should not do, you would use knowledge from your test data, which should not be used for training.
