All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.AudienceQualityMetrics.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cleanroomsml.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Metrics that describe the quality of the generated audience.
 */
public class AudienceQualityMetrics private constructor(builder: Builder) {
    /**
     * The recall score of the generated audience. Recall is the percentage of the most similar users (by default, the most similar 20%) from a sample of the training data that are included in the seed audience by the audience generation job. Values range from 0-1, larger values indicate a better audience. A recall value approximately equal to the maximum bin size indicates that the audience model is equivalent to random selection.
     */
    public val recallMetric: kotlin.Double? = builder.recallMetric
    /**
     * The relevance scores of the generated audience.
     */
    public val relevanceMetrics: List = requireNotNull(builder.relevanceMetrics) { "A non-null value must be provided for relevanceMetrics" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.AudienceQualityMetrics = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AudienceQualityMetrics(")
        append("recallMetric=$recallMetric,")
        append("relevanceMetrics=$relevanceMetrics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = recallMetric?.hashCode() ?: 0
        result = 31 * result + (relevanceMetrics.hashCode())
        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 AudienceQualityMetrics

        if (!(recallMetric?.equals(other.recallMetric) ?: (other.recallMetric == null))) return false
        if (relevanceMetrics != other.relevanceMetrics) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.AudienceQualityMetrics = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The recall score of the generated audience. Recall is the percentage of the most similar users (by default, the most similar 20%) from a sample of the training data that are included in the seed audience by the audience generation job. Values range from 0-1, larger values indicate a better audience. A recall value approximately equal to the maximum bin size indicates that the audience model is equivalent to random selection.
         */
        public var recallMetric: kotlin.Double? = null
        /**
         * The relevance scores of the generated audience.
         */
        public var relevanceMetrics: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.AudienceQualityMetrics) : this() {
            this.recallMetric = x.recallMetric
            this.relevanceMetrics = x.relevanceMetrics
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.AudienceQualityMetrics = AudienceQualityMetrics(this)

        internal fun correctErrors(): Builder {
            if (relevanceMetrics == null) relevanceMetrics = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy