athena.feature_map.rff_map¶
-
rff_map
(inputs, pr_matrix, bias, n_features, sigma_f)[source]¶ Random Fourier Features map. It can be vectorized for inputs of shape n_samples-by-input_dim.
- Parameters
inputs (numpy.ndarray) – input_dim dimensional inputs to project to the RKHS.
pr_matrix (numpy.ndarray) – n_features-by-input_dim projection matrix, whose rows are sampled from the spectral distribution.
bias (numpy.ndarray) – n_features dimensional bias. It is sampled from a Unifrom distribution on the interval [0, 2*PI].
n_features (int) – dimension of the RKHS
sigma_f (int) – multiplicative term representing the empirical variance the outptus.
- Returns
n_features dimensional projection of the inputs to the RKHS
- Return type