j143 commented on a change in pull request #948:
URL: https://github.com/apache/systemml/pull/948#discussion_r435071188



##########
File path: dev/docs/builtins-reference.md
##########
@@ -251,6 +252,38 @@ w = lm(X = X, y = y)
 yp = lmpredict(X, w)
 ```
 
+## `naivebayes`-Function
+
+The `naivebayes`-function computes the conditional a-posterior probabilities 
of a categorical class variable given independent predictor variables using the 
Bayes rule.
+
+### Usage
+```r
+naivebayes(D,C,laplace,verbose)
+```
+
+### Arguments
+| Name            | Type           | Default  | Description |
+| :------         | :------------- | -------- | :---------- |
+| D               | Matrix[Double] | required | One dimensional column matrix 
with N rows. |
+| C               | Matrix[Double] | required | One dimensional column matrix 
with N rows. |
+| Laplace         | Double         | `1`      | Any Double value. |
+| Verbose         | Boolean        | `TRUE`   | Boolean value. |
+
+### Returns
+| Type           | Description |
+| :------------- | :---------- |
+| Matrix[Double] | One dimensional column matrix with N rows. |
+| Matrix[Double] | One dimensional column matrix with N rows. |
+
+### Example
+```r

Review comment:
       Can you copy paste the output of this snippet in this PR as a commit.
   
   Tip: use the following snippet to print result matrices. 🔢 
   ```
   print("-- printing prior --")
   print(toString(prior))
   print(" ")
   print("--- printing class conditionals ")
   print(toString(classConditionals))
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to