public class ConfusionMatrixBase<I extends ConfusionMatrix,S extends ConfusionMatrixBase> extends Schema<I,ConfusionMatrixBase<I,S>>
Schema.Meta
Modifier and Type | Field and Description |
---|---|
long[][] |
confusion_matrix |
double |
prediction_error |
double[] |
prediction_error_by_class |
TwoDimTable |
table |
__meta, _impl_class, _version_pattern
Constructor and Description |
---|
ConfusionMatrixBase() |
Modifier and Type | Method and Description |
---|---|
I |
createImpl()
Create an implementation object and any child objects but DO NOT fill them.
|
S |
fillFromImpl(I cm)
Version and Schema-specific filling from the implementation object.
|
acceptsFrame, createAndFillImpl, extractVersion, fillFromParms, fillImpl, getHighestSupportedVersion, getImplClass, getImplClass, getLatestVersion, getSchemaVersion, markdown, markdown, markdown, markdown, newInstance, register, registerAllSchemasIfNecessary, schema, schema, schema, schema, schema, schemaClass, schemaClass, schemaClass, schemaClass, schemas
clone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, toJsonString, write_impl, write, writeExternal, writeHTML_impl, writeHTML, writeJSON_impl, writeJSON
@API(help="Confusion matrix (Actual/Predicted)", direction=OUTPUT) public long[][] confusion_matrix
@API(help="Prediction error by class", direction=OUTPUT) public double[] prediction_error_by_class
@API(help="Annotated confusion matrix", direction=OUTPUT) public TwoDimTable table
public I createImpl()
Schema
For objects without children this method does all the required work. For objects with children the subclass will need to override, e.g. by calling super.createImpl() and then calling createImpl() on its children.
Note that impl objects for schemas which override this method don't need to have a default constructor (e.g., a Keyed object constructor can still create and set the Key), but they must not fill any fields which can be filled later from the schema.
TODO: We *could* handle the common case of children with the same field names here by finding all of our fields that are themselves Schemas.
createImpl
in class Schema<I extends ConfusionMatrix,ConfusionMatrixBase<I extends ConfusionMatrix,S extends ConfusionMatrixBase>>
public S fillFromImpl(I cm)
Schema
fillFromImpl
in class Schema<I extends ConfusionMatrix,ConfusionMatrixBase<I extends ConfusionMatrix,S extends ConfusionMatrixBase>>