Last active
February 26, 2024 17:35
-
-
Save ThomasParistech/9aa9dab93f214b9fd60be42ab1dee979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.special import logit | |
def transformed_kde(x_data: np.ndarray, x_prediction: np.ndarray) -> np.ndarray: | |
x_data_logit = logit(x_data) | |
x_prediction_logit = logit(x_prediction) | |
densities_logit = basic_kde(x_data_logit, x_prediction_logit) | |
return densities_logit / (x_prediction * (1.0-x_prediction)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment