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
public class Main { | |
public static void main(String[] args) { | |
for (int i=0; i<10; i++) { | |
SimplePresenter presenter = new SimplePresenter(); | |
} | |
} | |
} |
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
# Compute the probability of each component in the mixture | |
def _computeProbabilities(self, limits): | |
probabilities = np.zeros(numComponents) # numComponents refers to the number of components in this mixture | |
for component in range(numComponents): | |
# gmm is a GaussianMixture from sklearn.mixture | |
mean = gmm.means_[component] | |
cov = gmm.covariances_[component] | |
weight = gmm.weights_[component] | |
probabilities[component] = constrainedGaussianDensity(mean, cov, limits) * weight | |
return probabilities |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from functools import partial | |
#from typing import Callable, Optional, Sequence, Tuple | |
from typing import (Any, Callable, Dict, Iterable, Mapping, Optional, Sequence, Tuple, | |
Union) | |
import jax | |
from jax import lax | |
import jax.numpy as jnp | |
from flax import linen as nn |