public class CountingErrorConsumer extends EasyPredictModelWrapper.ErrorConsumer
EasyPredictModelWrapper.ErrorConsumer
counting number of each kind of error even receivedModifier and Type | Class and Description |
---|---|
static class |
CountingErrorConsumer.Config |
Constructor and Description |
---|
CountingErrorConsumer(GenModel model) |
CountingErrorConsumer(GenModel model,
CountingErrorConsumer.Config config) |
Modifier and Type | Method and Description |
---|---|
void |
dataTransformError(java.lang.String columnName,
java.lang.Object value,
java.lang.String message)
Observe transformation error for data from the predicted dataset.
|
long |
getDataTransformationErrorsCount() |
java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
getDataTransformationErrorsCountPerColumn()
An unmodifiable, thread-safe map of all columns with counts of data transformation errors observed.
|
long |
getTotalUnknownCategoricalLevelsSeen()
Counts and returns all previously unseen categorical variables across all columns.
|
java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
getUnknownCategoricalsPerColumn()
Returns a thread-safe Map with column names as keys and number of observed unknown categorical values
associated with each column.
|
java.util.Map<java.lang.Object,java.util.concurrent.atomic.AtomicLong> |
getUnseenCategoricals(java.lang.String column) |
void |
unseenCategorical(java.lang.String columnName,
java.lang.Object value,
java.lang.String message)
Previously unseen categorical level has been detected
|
public CountingErrorConsumer(GenModel model)
model
- An instance of GenModel
public CountingErrorConsumer(GenModel model, CountingErrorConsumer.Config config)
model
- An instance of GenModel
config
- An instance of CountingErrorConsumer.Config
public void dataTransformError(java.lang.String columnName, java.lang.Object value, java.lang.String message)
EasyPredictModelWrapper.ErrorConsumer
dataTransformError
in class EasyPredictModelWrapper.ErrorConsumer
columnName
- Name of the column for which the error is raisedvalue
- Original value that could not be transformed properlymessage
- Transformation error messagepublic void unseenCategorical(java.lang.String columnName, java.lang.Object value, java.lang.String message)
EasyPredictModelWrapper.ErrorConsumer
unseenCategorical
in class EasyPredictModelWrapper.ErrorConsumer
columnName
- Name of the column to which the categorical value belongsvalue
- Original valuemessage
- Reason and/or actions takenpublic long getTotalUnknownCategoricalLevelsSeen()
public java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> getUnknownCategoricalsPerColumn()
CountingErrorConsumer
. Iteration during prediction phase may end up with
undefined results.
All the columns are listed.public java.util.Map<java.lang.Object,java.util.concurrent.atomic.AtomicLong> getUnseenCategoricals(java.lang.String column)
public java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> getDataTransformationErrorsCountPerColumn()
CountingErrorConsumer
.
Iteration during prediction phase may end up with undefined results.Map
public long getDataTransformationErrorsCount()