Browse Source

Improved Bayesian

Loweel 4 years ago
parent
commit
a819146488
1 changed files with 5 additions and 0 deletions
  1. 5 0
      matrix.go

+ 5 - 0
matrix.go

@@ -91,6 +91,11 @@ 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)
 
 }