We have a set of points and a line. Each point in the set has a weight attribute that is an integer. How we could penalize this weight based on the distance of the point from the line without using any sort of a threshold?
So, points that are closer to the line going to see a decrease in their weights and points that are farther from the line are not going to see that much of a difference in their weights. Is it possible to do this with some kind of a distribution?
Currently I am working on a context matching problem for shipping trajectories and their activity and in my findings, I have came across the problem of having lots of fishing activities near the coast line which is not correct and this why I am asking this question. If I manage to penalize the weight factor of points near the coastline, I can decrease the error of seeing fishing activities there.
Consider a weight scaling function $f(d)$, that only depends on the distance from a line. When, the actual used weight would be $w f(d)$, a real number (instead of an integer), or that rounded to the closest integer.
The shape of $f(d)$ for $d \ge 0$ should be nondecreasing, with $\lim_{d \to \infty} f(d) = 1$, and $f(0) = \epsilon$, where $\epsilon$ is the minimum weight scaling at exactly on the line, possibly $\epsilon = 0$ (so that weights on the line are exactly zero).
Exponential functions are commonly used for this: $$f(d) = 1 - C e^{-d/d_0}$$ where $1 - C$ is the minimum weight scale at $d = 0$, i.e. $C = 1 - \epsilon$; and $d_0$ defines the range. At $d = d_0$, the weight scale is $1 - C e^{-1} \approx 1 - 0.368 C$.
For example, with $C = 1$ (so weight at exactly on the line will be zero), and $d_0 = 1$, the scale at distance $d = \log_e 2 \approx 0.693$ will be one $1/2$; at distance $d = \log_e 4 \approx 1.386$ will be $3/4$; at distance $d = \log_e 5 \approx 1.609$ will be $4/5$, and so on. At distance $d = \log_e 255$, the scale will be $255/256 \approx 0.996$. (With $C=1$ and $d_0=1$, the weight will be $N/(N+1)$ at distance $d = \log_e N$.)
If you set $C = 1$, then you can use $d_0$ as the distance where the weight scale grows to $1 - e^{-1} \approx 0.63212$, i.e. to $63.2%%$.