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

commonMain.aws.sdk.kotlin.services.glue.model.ConfusionMatrix.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The confusion matrix shows you what your transform is predicting accurately and what types of errors it is making.
 *
 * For more information, see [Confusion matrix](https://en.wikipedia.org/wiki/Confusion_matrix) in Wikipedia.
 */
public class ConfusionMatrix private constructor(builder: Builder) {
    /**
     * The number of matches in the data that the transform didn't find, in the confusion matrix for your transform.
     */
    public val numFalseNegatives: kotlin.Long? = builder.numFalseNegatives
    /**
     * The number of nonmatches in the data that the transform incorrectly classified as a match, in the confusion matrix for your transform.
     */
    public val numFalsePositives: kotlin.Long? = builder.numFalsePositives
    /**
     * The number of nonmatches in the data that the transform correctly rejected, in the confusion matrix for your transform.
     */
    public val numTrueNegatives: kotlin.Long? = builder.numTrueNegatives
    /**
     * The number of matches in the data that the transform correctly found, in the confusion matrix for your transform.
     */
    public val numTruePositives: kotlin.Long? = builder.numTruePositives

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

    override fun toString(): kotlin.String = buildString {
        append("ConfusionMatrix(")
        append("numFalseNegatives=$numFalseNegatives,")
        append("numFalsePositives=$numFalsePositives,")
        append("numTrueNegatives=$numTrueNegatives,")
        append("numTruePositives=$numTruePositives")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = numFalseNegatives?.hashCode() ?: 0
        result = 31 * result + (numFalsePositives?.hashCode() ?: 0)
        result = 31 * result + (numTrueNegatives?.hashCode() ?: 0)
        result = 31 * result + (numTruePositives?.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 ConfusionMatrix

        if (numFalseNegatives != other.numFalseNegatives) return false
        if (numFalsePositives != other.numFalsePositives) return false
        if (numTrueNegatives != other.numTrueNegatives) return false
        if (numTruePositives != other.numTruePositives) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of matches in the data that the transform didn't find, in the confusion matrix for your transform.
         */
        public var numFalseNegatives: kotlin.Long? = null
        /**
         * The number of nonmatches in the data that the transform incorrectly classified as a match, in the confusion matrix for your transform.
         */
        public var numFalsePositives: kotlin.Long? = null
        /**
         * The number of nonmatches in the data that the transform correctly rejected, in the confusion matrix for your transform.
         */
        public var numTrueNegatives: kotlin.Long? = null
        /**
         * The number of matches in the data that the transform correctly found, in the confusion matrix for your transform.
         */
        public var numTruePositives: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.ConfusionMatrix) : this() {
            this.numFalseNegatives = x.numFalseNegatives
            this.numFalsePositives = x.numFalsePositives
            this.numTrueNegatives = x.numTrueNegatives
            this.numTruePositives = x.numTruePositives
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy