To run the whole thing with sample_weight, you only need to run;
grid.fit(X, y, sample_weight=np.log(1 + df['Amount']));
Note that we're not using the sample_weight in our own custom scorer, but you should see a huge effect on the metric.
scikit metrics: sample weight
To run the whole thing with sample_weight, you only need to run;
grid.fit(X, y, sample_weight=np.log(1 + df['Amount']));
Note that we're not using the sample_weight in our own custom scorer, but you should see a huge effect on the metric.