|
@@ -91,13 +91,13 @@ func (c *ByClassifier) IsGOOD(key string) {
|
|
|
//Posterior calculates the posterior probabilities in pseudo-bayes.
|
|
|
func (c *ByClassifier) Posterior(hdr string) map[string]float64 {
|
|
|
|
|
|
- for c.bayez == nil {
|
|
|
- time.Sleep(1 * time.Millisecond)
|
|
|
- log.Println("Waiting the bayesian to exist")
|
|
|
- }
|
|
|
-
|
|
|
- return c.bayez.Posterior(hdr)
|
|
|
-
|
|
|
+ var ff map[string]float64
|
|
|
+ ff = make(map[string]float64)
|
|
|
+ ff["BAD"] = 0.5
|
|
|
+ ff["GOOD"] = 0.5
|
|
|
+ defer handlepanic()
|
|
|
+ ff = c.bayez.Posterior(hdr)
|
|
|
+ return ff
|
|
|
}
|
|
|
|
|
|
//Janitor keeps the maps under a certain size, keeping the biggest values.
|