Using naive bayes to predict new values
<p>I have a dataframe that looks like this</p>

<pre><code>weather &lt;- c("good", "good", "good", "bad", "bad", "good")
temp &lt;- c("high", "low", "low", "high", "low", "low")
golf &lt;- c("yes", "no", "yes", "no", "yes" , "no")
df &lt;- data.frame(weather, temp, golf)
</code></pre>

<p>What I would like to do now is using the naive bayes method to get probability of this new dataset</p>

<pre><code>df_new &lt;- data.frame(weather = "good", temp = "low")
</code></pre>

<p>Therefore I try</p>

<pre><code>library(e1071)
model &lt;- naiveBayes(golf ~.,data=df)
predict(model, df_new)
</code></pre>

<p>But this gives me:</p>

<pre><code>NO
</code></pre>

<p>Any idea how i can turn this into a probability?</p>