MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_cost

Method get_cost

hmm_class/hmmd_tf.py:44–48  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

42 plt.show()
43
44 def get_cost(self, x):
45 # returns log P(x | model)
46 # using the forward part of the forward-backward algorithm
47 # print "getting cost for:", x
48 return self.session.run(self.cost, feed_dict={self.tfx: x})
49
50 def log_likelihood(self, x):
51 return -self.session.run(self.cost, feed_dict={self.tfx: x})

Callers 1

get_cost_multiMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected