Closed cgranade closed 6 years ago
The 4 CI failures look like they have nothing to do with this PR. Are they due to a new numpy thing?
Thanks for the review, @ihincks! I'll go on and fix those ASAP. As far as the CI failures, I think that's leftover from #135, and is due to NumPy finally making something an error that was a FutureWarning
for a long time. I'll investigate in #135, then, so that I can start clearing out the backlog of PRs contingent on CI failures.
Consider throwing a test or two into test_concrete_models.py
. Untested:
class TestGaussianHyperparameterizedModel(ConcreteModelTest, DerandomizedTestCase):
"""
Tests GaussianHyperparameterizedModel with CoinModel as the underlying model
(underlying model has no expparams).
"""
def instantiate_model(self):
return GaussianHyperparameterizedModel(CoinModel())
def instantiate_prior(self):
return ProductDistribution(
BetaDistribution(mean=0.5, var=0.1),
...
)
def instantiate_expparams(self):
return np.arange(100, 120).astype(self.model.expparams_dtype)
This looks great. I agree with @ihincks it is a good addition. It seems as we move forward experimentally there is an increasing focus on continuous outcome distributions. Once I find more time I want to focus on explicitly supporting continuous outcomes (right now IIRC it is maybe hinted at in the documentation but left to the user to figure out how to support them). This would also include supporting the branch me and Ian have been working on to support continuous outcomes natively include experiment design in smc.py
. I will try and clean this up and get tests passing later this week so that I can submit a PR. There will be a decent amount of documentation and testing to get it in working condition. I hope that after @ihincks defends he might be able to help me review this and come up with a plan.
Sounds great, @taalexander! Thanks as well for the typo catch, @ihincks. I think this might be good to go once I can get the CI builds working. Would anyone mind if I merge in #135, since CI seems to work there again? That would mean deprecating 3.3 in favor of Python 2.7 or ≥ 3.4. Since 3.3 is now approximately six years old, I don't think that should be a problem...
Awesome, thanks for everything! 💕
This PR adds two new models, one which learns Rabi frequencies with unknown T₂ processes, the other of which decorates two-outcome models with Gaussian hyperparameters based on a latent two-outcome variable. This allows for using QInfer to learn T₂ in cases where single-shot measurements are not directly observed, but are only observed through a secondary process that is Gaussian distributed.