You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemml.apache.org by GitBox <gi...@apache.org> on 2020/06/05 08:28:38 UTC

[GitHub] [systemml] wizard-420 opened a new pull request #952: This PR contains docs for ConfusionMatrix function.

wizard-420 opened a new pull request #952:
URL: https://github.com/apache/systemml/pull/952


   please review if any changes are there to be done.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] wizard-420 commented on pull request #952: [DOC] Documentation for builtin ConfusionMatrix function.

Posted by GitBox <gi...@apache.org>.
wizard-420 commented on pull request #952:
URL: https://github.com/apache/systemml/pull/952#issuecomment-639338011


   > please review if any changes are there to be done.
   
   I have also uploaded the output in private doc.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] j143 commented on a change in pull request #952: [DOC] Documentation for builtin ConfusionMatrix function.

Posted by GitBox <gi...@apache.org>.
j143 commented on a change in pull request #952:
URL: https://github.com/apache/systemml/pull/952#discussion_r436232635



##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.
+This confusionMatrix function accepts two matrices with one column each, these two matrices are vector for prediction and one-hot-encoded matrix respectively.
+Then it computes the max value of each vector and compare them, after whichit calculates and returns the sum of classifications and the average of each true class.
+
+### Usage
+```r
+confusionMatrix(P,Y)
+```
+
+### Arguments
+
+| Name    | Type                   | Default  | Description |
+| :------ | :-------------         |  :---    | :---------- |
+| P       |      Matrix[Double]    |   ---    |vector of prediction |

Review comment:
       Can this be made consistent? - i.e., after `|` one space only, and one space in the end. Tables syntax for other functions is good for reference.

##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.

Review comment:
       `you`, `your` if possible can be avoided, instead. So, it is (without these two words!)
   `a confusion matrix can give a better idea of what the classification model is getting right.`

##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.
+This confusionMatrix function accepts two matrices with one column each, these two matrices are vector for prediction and one-hot-encoded matrix respectively.
+Then it computes the max value of each vector and compare them, after whichit calculates and returns the sum of classifications and the average of each true class.
+
+### Usage
+```r
+confusionMatrix(P,Y)
+```
+
+### Arguments
+
+| Name    | Type                   | Default  | Description |
+| :------ | :-------------         |  :---    | :---------- |
+| P       |      Matrix[Double]    |   ---    |vector of prediction |
+| Y       |      Matrix[Double]    |   ---    | vector of Golden standard One Hot Encoded|
+
+### Returns
+ 
+|Name  	          	| Type           | Description |
+|:-----------------| :------------- | :---------- |
+|ConfusionSum      | Matrix[Double] | The Confusion Matrix Sums of classifications |
+|ConfusionAvg      | Matrix[Double] | The Confusion Matrix averages of each true class|
+
+### Example
+ #here numClasses is assigned to 1 as numClasses is directly proportional to the 
+ number of columns in the one hot data matrix, as confusion matrix accepts only matrices with one column.
+ 
+```r
+numClasses = 1  

Review comment:
       Can this be added in the example snippet itself.
   ```r
    # here numClasses is assigned to 1 as numClasses is directly proportional to the 
    # number of columns in the one hot data matrix, as confusion matrix accepts only matrices with one column.
   ```

##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.
+This confusionMatrix function accepts two matrices with one column each, these two matrices are vector for prediction and one-hot-encoded matrix respectively.
+Then it computes the max value of each vector and compare them, after whichit calculates and returns the sum of classifications and the average of each true class.
+
+### Usage
+```r
+confusionMatrix(P,Y)
+```
+
+### Arguments
+
+| Name    | Type                   | Default  | Description |
+| :------ | :-------------         |  :---    | :---------- |
+| P       |      Matrix[Double]    |   ---    |vector of prediction |
+| Y       |      Matrix[Double]    |   ---    | vector of Golden standard One Hot Encoded|
+
+### Returns
+ 
+|Name  	          	| Type           | Description |
+|:-----------------| :------------- | :---------- |
+|ConfusionSum      | Matrix[Double] | The Confusion Matrix Sums of classifications |
+|ConfusionAvg      | Matrix[Double] | The Confusion Matrix averages of each true class|
+
+### Example
+ #here numClasses is assigned to 1 as numClasses is directly proportional to the 
+ number of columns in the one hot data matrix, as confusion matrix accepts only matrices with one column.

Review comment:
       These lines can be removed.

##########
File path: scripts/builtin/outlier.dml
##########
@@ -18,6 +18,13 @@
 # under the License.
 #
 #-------------------------------------------------------------
+#An outlier in a probability distribution function is a number that is more 
+#than 1.5 times the length of the data set away from either the lower or upper quartiles.
+#Specifically, if a number is less than Q1−1.5×IQR or greater than Q3+1.5×IQR, then it is an outlier.
+#
+
+
+

Review comment:
       Shall we delete thi

##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.
+This confusionMatrix function accepts two matrices with one column each, these two matrices are vector for prediction and one-hot-encoded matrix respectively.
+Then it computes the max value of each vector and compare them, after whichit calculates and returns the sum of classifications and the average of each true class.

Review comment:
       These lines are long, can they be curtailed a bit, to be readable. 
   For example `331` line we can stop the  line at `what types` and `of errors it is making.` comes in the `332` line.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] j143 commented on pull request #952: [DOC] Documentation for builtin confusionMatrix function.

Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #952:
URL: https://github.com/apache/systemml/pull/952#issuecomment-640472646


   Thank you, @wizard-420 - LGTM. 👍 
   🎉 🚀


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] wizard-420 commented on a change in pull request #952: [DOC] Documentation for builtin ConfusionMatrix function.

Posted by GitBox <gi...@apache.org>.
wizard-420 commented on a change in pull request #952:
URL: https://github.com/apache/systemml/pull/952#discussion_r436241640



##########
File path: scripts/builtin/outlier.dml
##########
@@ -18,6 +18,13 @@
 # under the License.
 #
 #-------------------------------------------------------------
+#An outlier in a probability distribution function is a number that is more 
+#than 1.5 times the length of the data set away from either the lower or upper quartiles.
+#Specifically, if a number is less than Q1−1.5×IQR or greater than Q3+1.5×IQR, then it is an outlier.
+#
+
+
+

Review comment:
       changes have been applied




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] asfgit closed pull request #952: [DOC] Documentation for builtin confusionMatrix function.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #952:
URL: https://github.com/apache/systemml/pull/952


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] wizard-420 commented on a change in pull request #952: [DOC] Documentation for builtin ConfusionMatrix function.

Posted by GitBox <gi...@apache.org>.
wizard-420 commented on a change in pull request #952:
URL: https://github.com/apache/systemml/pull/952#discussion_r436240465



##########
File path: dev/docs/builtins-reference.md
##########
@@ -318,7 +320,47 @@ slicefinder(X,W, y, k, paq, S);
 ### Usage
 ```r
 X = rand (rows = 50, cols = 10)
-y = X %*% rand(rows=ncol(X), 1)
+y = X %*% rand(rows = ncol(X), cols = 1)
 w = lm(X = X, y = y)
 ress = slicefinder(X = X,W = w, Y = y,  k = 5, paq = 1, S = 2);
 ```
+
+## `confusionMatrix`-Function
+
+A `confusionMatrix` is a technique for summarizing the performance of a classification algorithm.
+Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making.
+This confusionMatrix function accepts two matrices with one column each, these two matrices are vector for prediction and one-hot-encoded matrix respectively.
+Then it computes the max value of each vector and compare them, after whichit calculates and returns the sum of classifications and the average of each true class.
+
+### Usage
+```r
+confusionMatrix(P,Y)
+```
+
+### Arguments
+
+| Name    | Type                   | Default  | Description |
+| :------ | :-------------         |  :---    | :---------- |
+| P       |      Matrix[Double]    |   ---    |vector of prediction |
+| Y       |      Matrix[Double]    |   ---    | vector of Golden standard One Hot Encoded|
+
+### Returns
+ 
+|Name  	          	| Type           | Description |
+|:-----------------| :------------- | :---------- |
+|ConfusionSum      | Matrix[Double] | The Confusion Matrix Sums of classifications |
+|ConfusionAvg      | Matrix[Double] | The Confusion Matrix averages of each true class|
+
+### Example
+ #here numClasses is assigned to 1 as numClasses is directly proportional to the 
+ number of columns in the one hot data matrix, as confusion matrix accepts only matrices with one column.

Review comment:
       ok I will make all the neccecary changes




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [systemml] j143 commented on pull request #952: [DOC] Documentation for builtin ConfusionMatrix function.

Posted by GitBox <gi...@apache.org>.
j143 commented on pull request #952:
URL: https://github.com/apache/systemml/pull/952#issuecomment-639390973


   Hi @wizard-420 - Try to make sure that there are only commits related to `ConfusionMatrix`.
   
   Tip: Google these keywords - `how to rebase from command line`, `git rebase -i`


----------------------------------------------------------------
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:
users@infra.apache.org