ExponentialWeights#
- class frlearn.weights.ExponentialWeights(base: float = 2)#
(8/15, 4/15, 2/15, 1/15)Exponentially decreasing weights with parametrisable base.- Parameters:
- base: float
Exponential base. Should be larger than 1.
- Returns:
- f: int -> np.array
Function that takes a positive integer
kand returns a weight vector of lengthkwith exponentially decreasing weights with baseb.
Notes
With base 2, weights rapidly approach 0, meaning:
the resulting weight vector is not very useful, and quickly becomes insensitive to increasing
k,using large values for
kwill produce weights that are so small as to cause computational wonkiness.
These issues are exacerbated for larger bases, so bases only slightly larger than 1 may be most useful.