'How can I explicitly give weight to data points within one sample in python ML packages like SKLearn/KerasS? (not weight sampling: that is per sample)

I have a dataset where for every timestep I have one sample , which is a 2d 'map' of a field, filled with data points with x,y coordinates. Now some of those datapoints are measured more recently than others, hence I want to give more weight to those data points.

Weight sampling allows me to give weights to samples, but I would like to give weights to datapoints within the sample. Is there a way to explicitly do so with e.g. SKLearn/Keras?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source