title: How to incorporate Weka Naive Bayes model into Java Code
body: <p>I run a training set using Naive Bayes classifier using Weka. The resulted model is shown below. My question is: </p>
  
  <p>a. Is it possible to incorporate the model into my java code?</p>
  
  <p>b. If so, how can I do that?</p>
  
  <p>c. If not, what should I do?</p>
  
  <p>Thanks.</p>
  
  <p>=== Classifier model (full training set) ===</p>
  
  <p>Naive Bayes (simple)</p>
  
  <p>Class A: P(C) = 0.42074928</p>
  
  <p>Attribute mcv
  'All'<br>
  1           </p>
  
  <p>Attribute alkphos
  'All'<br>
  1           </p>
  
  <p>Attribute sgpt
  'All'<br>
  1           </p>
  
  <p>Attribute sgot
  'All'<br>
  1           </p>
  
  <p>Attribute gammagt
  '(-inf-20.5]'   '(20.5-inf)'<br>
  0.54421769  0.45578231  </p>
  
  <p>Attribute drinks
  'All'<br>
  1           </p>
  
  <p>Class B: P(C) = 0.57925072</p>
  
  <p>Attribute mcv
  'All'<br>
  1           </p>
  
  <p>Attribute alkphos
  'All'<br>
  1           </p>
  
  <p>Attribute sgpt
  'All'<br>
  1           </p>
  
  <p>Attribute sgot
  'All'<br>
  1           </p>
  
  <p>Attribute gammagt
  '(-inf-20.5]'   '(20.5-inf)'<br>
  0.30693069  0.69306931  </p>
  
  <p>Attribute drinks
  'All'<br>
  1           </p>
  
  <p>Time taken to build model: 0 seconds</p>