Class MutableRegressionInfo

java.lang.Object
org.tribuo.regression.RegressionInfo
org.tribuo.regression.MutableRegressionInfo
All Implemented Interfaces:
Serializable, MutableOutputInfo<Regressor>, OutputInfo<Regressor>, ProtoSerializable<org.tribuo.protos.core.OutputDomainProto>

public class MutableRegressionInfo extends RegressionInfo implements MutableOutputInfo<Regressor>
A MutableOutputInfo for Regressors. All observed Regressors must contain the same named dimensions.
See Also:
  • Constructor Details

    • MutableRegressionInfo

      public MutableRegressionInfo(RegressionInfo info)
      Constructs a mutable copy of the supplied regression info.
      Parameters:
      info - The info to copy.
  • Method Details

    • deserializeFromProto

      public static MutableRegressionInfo 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 the message.
    • serialize

      public org.tribuo.protos.core.OutputDomainProto serialize()
      Description copied from interface: ProtoSerializable
      Serializes this object to a protobuf.
      Specified by:
      serialize in interface ProtoSerializable<org.tribuo.protos.core.OutputDomainProto>
      Returns:
      The protobuf.
    • observe

      public void observe(Regressor output)
      Description copied from interface: MutableOutputInfo
      Records an output value or statistics thereof.
      Specified by:
      observe in interface MutableOutputInfo<Regressor>
      Parameters:
      output - The observed output.
    • clear

      public void clear()
      Description copied from interface: MutableOutputInfo
      Clears the OutputInfo, removing all things it's observed.
      Specified by:
      clear in interface MutableOutputInfo<Regressor>
    • copy

      public MutableRegressionInfo copy()
      Description copied from interface: OutputInfo
      Generates a copy of this OutputInfo, including it's mutability.
      Specified by:
      copy in interface OutputInfo<Regressor>
      Specified by:
      copy in class RegressionInfo
      Returns:
      A copy of the OutputInfo.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toReadableString

      public String toReadableString()
      Description copied from interface: OutputInfo
      Generates a String form of this OutputInfo.

      This String can contain newlines, tabs and other formatting.

      Specified by:
      toReadableString in interface OutputInfo<Regressor>
      Returns:
      A formatted String representing this OutputInfo.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object