commonMain.aws.sdk.kotlin.services.comprehend.model.FlywheelModelEvaluationMetrics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The evaluation metrics associated with the evaluated model.
*/
public class FlywheelModelEvaluationMetrics private constructor(builder: Builder) {
/**
* Average accuracy metric for the model.
*/
public val averageAccuracy: kotlin.Double? = builder.averageAccuracy
/**
* The average F1 score from the evaluation metrics.
*/
public val averageF1Score: kotlin.Double? = builder.averageF1Score
/**
* Average precision metric for the model.
*/
public val averagePrecision: kotlin.Double? = builder.averagePrecision
/**
* Average recall metric for the model.
*/
public val averageRecall: kotlin.Double? = builder.averageRecall
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.FlywheelModelEvaluationMetrics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FlywheelModelEvaluationMetrics(")
append("averageAccuracy=$averageAccuracy,")
append("averageF1Score=$averageF1Score,")
append("averagePrecision=$averagePrecision,")
append("averageRecall=$averageRecall")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = averageAccuracy?.hashCode() ?: 0
result = 31 * result + (averageF1Score?.hashCode() ?: 0)
result = 31 * result + (averagePrecision?.hashCode() ?: 0)
result = 31 * result + (averageRecall?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as FlywheelModelEvaluationMetrics
if (!(averageAccuracy?.equals(other.averageAccuracy) ?: (other.averageAccuracy == null))) return false
if (!(averageF1Score?.equals(other.averageF1Score) ?: (other.averageF1Score == null))) return false
if (!(averagePrecision?.equals(other.averagePrecision) ?: (other.averagePrecision == null))) return false
if (!(averageRecall?.equals(other.averageRecall) ?: (other.averageRecall == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.FlywheelModelEvaluationMetrics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Average accuracy metric for the model.
*/
public var averageAccuracy: kotlin.Double? = null
/**
* The average F1 score from the evaluation metrics.
*/
public var averageF1Score: kotlin.Double? = null
/**
* Average precision metric for the model.
*/
public var averagePrecision: kotlin.Double? = null
/**
* Average recall metric for the model.
*/
public var averageRecall: kotlin.Double? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.FlywheelModelEvaluationMetrics) : this() {
this.averageAccuracy = x.averageAccuracy
this.averageF1Score = x.averageF1Score
this.averagePrecision = x.averagePrecision
this.averageRecall = x.averageRecall
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.FlywheelModelEvaluationMetrics = FlywheelModelEvaluationMetrics(this)
internal fun correctErrors(): Builder {
return this
}
}
}