Class MutableAnomalyInfo
java.lang.Object
org.tribuo.anomaly.AnomalyInfo
org.tribuo.anomaly.MutableAnomalyInfo
- All Implemented Interfaces:
Serializable,MutableOutputInfo<Event>,OutputInfo<Event>,ProtoSerializable<org.tribuo.protos.core.OutputDomainProto>
An
MutableOutputInfo object for Events.
Counts the number of Event.EventType.ANOMALOUS, Event.EventType.EXPECTED
and Event.EventType.UNKNOWN outputs observed. The unknown output is invalid
at training time, and used as a prediction time sentinel (similarly to other Tribuo
prediction tasks).
Anomaly detection has a fixed domain, so it will throw IllegalArgumentException
if you somehow modify the Event.EventType enum to add a new value.
- See Also:
-
Field Summary
Fields inherited from class org.tribuo.anomaly.AnomalyInfo
anomalyCount, expectedCount, unknownCountFields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the OutputInfo, removing all things it's observed.copy()Generates a copy of this OutputInfo, including it's mutability.static MutableAnomalyInfodeserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.voidRecords an output value or statistics thereof.Methods inherited from class org.tribuo.anomaly.AnomalyInfo
equals, generateImmutableOutputInfo, generateMutableOutputInfo, getAnomalyCount, getDomain, getEventCount, getExpectedCount, getUnknownCount, hashCode, outputCountsIterable, serialize, size, toReadableString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tribuo.OutputInfo
generateImmutableOutputInfo, generateMutableOutputInfo, getDomain, getUnknownCount, outputCountsIterable, size, toReadableStringMethods inherited from interface org.tribuo.protos.ProtoSerializable
serialize
-
Method Details
-
deserializeFromProto
public static MutableAnomalyInfo deserializeFromProto(int version, String className, com.google.protobuf.Any message) throws com.google.protobuf.InvalidProtocolBufferException Deserialization factory.- Parameters:
version- The serialized object version.className- The class name.message- The serialized data.- Returns:
- The deserialized object.
- Throws:
com.google.protobuf.InvalidProtocolBufferException- If the protobuf could not be parsed from themessage.
-
observe
Description copied from interface:MutableOutputInfoRecords an output value or statistics thereof.- Specified by:
observein interfaceMutableOutputInfo<Event>- Parameters:
output- The observed output.
-
clear
public void clear()Description copied from interface:MutableOutputInfoClears the OutputInfo, removing all things it's observed.- Specified by:
clearin interfaceMutableOutputInfo<Event>
-
copy
Description copied from interface:OutputInfoGenerates a copy of this OutputInfo, including it's mutability.- Specified by:
copyin interfaceOutputInfo<Event>- Specified by:
copyin classAnomalyInfo- Returns:
- A copy of the OutputInfo.
-