emphasise some observation weights more than the others

2018-04-16 13:40:54

I want to emphasise (increase the weight) of only a subset of data. Lets say I have old and fresh data, I would like to say that old data has to have more weight and therefore has more influence in the decision than the new data.

In scikit-learn I found only class-weight parameter, but it does not change the weight of the samples, only of all samples within the class.

Is there a way to incorporate this emphasis into the gradient boosted trees in spark or xgboost in python?