Created
April 12, 2019 16:08
-
-
Save razhangwei/72882051dbeed766f991ae0e141dc76b to your computer and use it in GitHub Desktop.
__init__.py example #Python
This file contains hidden or 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 .sccs import NeuralSCCS | |
from .log_linear_hawkes import LogLinearHawkes, StochasticLogAdditiveHawkes | |
__all__ = ["NeuralSCCS", "LogLinearHawkes", "StochasticLogLinearHawkes"] | |
def get_model(model, **kwargs): | |
if model == 'N-SCCS': | |
model = NeuralSCCS(**kwargs) | |
elif model == 'MSCCS': | |
kwargs["mlp_config"] = {"n_output": kwargs["n_outcomes"]} | |
model = NeuralSCCS(**kwargs) | |
elif model == "LLH": | |
model = LogLinearHawkes(**kwargs) | |
elif model == "SLLH": | |
model = StochasticLogAdditiveHawkes(include_ddi=False, **kwargs) | |
elif model == "SLA^2H": | |
model = StochasticLogAdditiveHawkes(include_ddi=True, **kwargs) | |
else: | |
raise NotImplementedError() | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment