cvtLabel.RdThis function convert a soft probability matrix to factor or one hot matrix.
cvtLabel(prob, idx = FALSE)
| prob | a matrix to convert. |
|---|---|
| idx | the type of output. If idx= TRUE will return the index of largest probability of each row. If idx= FALSE will return a one-hot matrix. |
a index of largest probability or one hot matrix.