markov-models/markovlog.py

10 lines
329 B
Python
Raw Permalink Normal View History

2020-12-31 19:30:39 +00:00
from numpy import log as ln
from maths import gaussian
from markov import MarkovModel
# child object to replace normal prob/likeli operations with log prob operations (normal prob for debugging)
class LogMarkovModel(MarkovModel):
def log_state_transitions(self):
self.state_transitions = ln(self.state_transitions)