| 
Oracle Data Mining Java API Reference 10g Release 1 (10.1) B12276-01  | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.CategoryMatrix
An instance of CategoryMatrix represents a sparse square matrix whose axes are categories. This class supports the confusion matrix, an output of the test operation for a classification model, and the cost matrix, an input of the build operation for a classification model.
| Constructor Summary | |
CategoryMatrix()Creates an empty instance of CategoryMatrix. | |
| Method Summary | |
 void | 
addEntry(Category rowValue, Category columnValue, float value)Deprecated. As of ODM 10.1.0, Use other CostMatrix.addEntry() method | 
 float | 
getDiagonalDefault()Deprecated. As of ODM 9.2.0, this method is not supported.  | 
 float | 
getOffDiagonalDefault()Deprecated. As of ODM 9.2.0, this method is not supported.  | 
 float | 
getValue(Category row, Category column)Returns the value of the entry at the specified row Category and column Category position. | 
 float | 
getValue(java.lang.String row, java.lang.String column)Returns the value of the entry whose row and column display names match to the specified names.  | 
 boolean | 
isPresent(Category indexValue)Returns true if the given index value is found in the matrix. | 
 Category[] | 
listCategories()Returns all row and column index values in the matrix.  | 
 java.lang.String[] | 
listColumnDisplayNames()Deprecated. As of 9.2.0, replaced by listDisplayNames method. | 
 Category[] | 
listColumnValues()Deprecated. As of 9.2.0, replaced by listCategories method. | 
 java.lang.String[] | 
listDisplayNames()Returns all display names used in the matrix.  | 
 java.lang.String[] | 
listRowDisplayNames()Deprecated. As of 9.2.0, replaced by listDisplayNames method. | 
 Category[] | 
listRowValues()Deprecated. As of 9.2.0, replaced by listCategories method. | 
 float | 
sumAllCells()Returns the sum of all cells in the matrix.  | 
 float | 
sumForColumn(Category column)Returns sum of all cells in the given column index of the matrix.  | 
 float | 
sumForRow(Category row)Returns sum of all cells in the given row index of the matrix  | 
 java.lang.String | 
toString()Returns a formatted string representation of a CategoryMatrix instance. | 
 void | 
validate()Deprecated. As of ODM 10.1.0, Use other CostMatrix.validate() method | 
| Methods inherited from class java.lang.Object | 
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public CategoryMatrix()
CategoryMatrix.| Method Detail | 
public float getDiagonalDefault()
float - The default value of the diagonal elementspublic float getOffDiagonalDefault()
float - The default value of the off-diagonal elements
public void addEntry(Category rowValue,
Category columnValue,
                     float value)
              throws ODMException
CostMatrix.addEntry() methodODMException - 
rowValue or columnValue is null,value is negative,rowValue and columnValue do not have the same data type,
public float getValue(java.lang.String row,
                      java.lang.String column)
               throws ODMException
row - A row display name in the matrixcolumn - A column display name in the matrixfloat - The value in the matrix at (row, column) position.ODMException - when no entry was found at the position (row, column).
public float getValue(Category row,
Category column)
               throws ODMException
Category and column Category position.row - A row index in the matrixcolumn - A column index in the matrixvalue - The value at the specified positionODMException - when no entry was found at the position (row, column).
public void validate()
              throws ODMException
CostMatrix.validate() methodODMException - 
ODMException - when the object is invalid.public Category[] listRowValues()
listCategories method.Category[] - All row index valuespublic Category[] listColumnValues()
listCategories method.Category[] - All column index valuespublic Category[] listCategories()
Category[] - All index valuespublic java.lang.String toString()
CategoryMatrix instance.toString in class java.lang.ObjectString - A formatted string of the instancepublic java.lang.String[] listRowDisplayNames()
listDisplayNames method.String[] - An array of display namespublic java.lang.String[] listColumnDisplayNames()
listDisplayNames method.String[] - An array of display namespublic java.lang.String[] listDisplayNames()
String[] - An array of display names
public float sumAllCells()
                  throws ODMException
float - The total value of all cells in the matrix.ODMException - when an invalid value is found.
public float sumForRow(Category row)
                throws ODMException
row - A row index in the matrixfloat - The total value of all cells in the given row index.ODMException - when an invalid value is found.
public float sumForColumn(Category column)
                   throws ODMException
column - A column index in the matrixfloat - The total value of all cells in the given column index.ODMException - when an invalid value is found.public boolean isPresent(Category indexValue)
true if the given index value is found in the matrix.true if cat is found, false otherwise. 
  | 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||