Stretch: Gaussian Naive Bayes
Intermediate classical-mlprobabilisticnaive-bayesstretch
Implement:
def gaussian_nb_fit(input: np.ndarray, labels: np.ndarray, var_smoothing: float = 1e-9) -> dict: ...
def gaussian_log_likelihood(x: np.ndarray, mean: np.ndarray, variance: np.ndarray) -> float: ...
def gaussian_nb_predict(model: dict, queries: np.ndarray) -> np.ndarray: ...
input is real-valued this time, 02-naive-bayes-bernoulli's features were binary.
- Same overall shape as
02-naive-bayes-bernoulli, only the per-feature probability model changes.