Package com.apple.foundationdb.kmeans
Record Class PartitionEvaluator.EvaluationResult
java.lang.Object
java.lang.Record
com.apple.foundationdb.kmeans.PartitionEvaluator.EvaluationResult
- Record Components:
decision- the evaluator's decision for this candidatecurrentStats- quality statistics of the current (existing) partitioningcandidateStats- quality statistics of the proposed candidate partitioningrelativeSseGain- relative improvement in SSE:(currentSSE - candidateSSE) / currentSSEscoreGain- composite quality score difference between candidate and currentreason- human-readable explanation of why this decision was made
- Enclosing class:
PartitionEvaluator
public static record PartitionEvaluator.EvaluationResult(@Nonnull PartitionEvaluator.Decision decision, @Nonnull PartitionEvaluator.PartitionStats currentStats, @Nonnull PartitionEvaluator.PartitionStats candidateStats, double relativeSseGain, double scoreGain, String reason)
extends Record
The outcome of evaluating a candidate partitioning against the current layout. Contains the
decision (accept, keep current, or invalid), the statistics for both partitionings, and the
computed quality metrics that led to the decision.
-
Constructor Summary
ConstructorsConstructorDescriptionEvaluationResult(PartitionEvaluator.Decision decision, PartitionEvaluator.PartitionStats currentStats, PartitionEvaluator.PartitionStats candidateStats, double relativeSseGain, double scoreGain, String reason) Creates an instance of aEvaluationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecandidateStatsrecord component.Returns the value of thecurrentStatsrecord component.decision()Returns the value of thedecisionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.doubleReturns the value of therelativeSseGainrecord component.doubleReturns the value of thescoreGainrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EvaluationResult
public EvaluationResult(@Nonnull PartitionEvaluator.Decision decision, @Nonnull PartitionEvaluator.PartitionStats currentStats, @Nonnull PartitionEvaluator.PartitionStats candidateStats, double relativeSseGain, double scoreGain, String reason) Creates an instance of aEvaluationResultrecord class.- Parameters:
decision- the value for thedecisionrecord componentcurrentStats- the value for thecurrentStatsrecord componentcandidateStats- the value for thecandidateStatsrecord componentrelativeSseGain- the value for therelativeSseGainrecord componentscoreGain- the value for thescoreGainrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
decision
Returns the value of thedecisionrecord component.- Returns:
- the value of the
decisionrecord component
-
currentStats
Returns the value of thecurrentStatsrecord component.- Returns:
- the value of the
currentStatsrecord component
-
candidateStats
Returns the value of thecandidateStatsrecord component.- Returns:
- the value of the
candidateStatsrecord component
-
relativeSseGain
public double relativeSseGain()Returns the value of therelativeSseGainrecord component.- Returns:
- the value of the
relativeSseGainrecord component
-
scoreGain
public double scoreGain()Returns the value of thescoreGainrecord component.- Returns:
- the value of the
scoreGainrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-