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

commonMain.aws.sdk.kotlin.services.glue.model.FindMatchesMetrics.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 evaluation metrics for the find matches algorithm. The quality of your machine learning transform is measured by getting your transform to predict some matches and comparing the results to known matches from the same dataset. The quality metrics are based on a subset of your data, so they are not precise.
 */
public class FindMatchesMetrics private constructor(builder: Builder) {
    /**
     * The area under the precision/recall curve (AUPRC) is a single number measuring the overall quality of the transform, that is independent of the choice made for precision vs. recall. Higher values indicate that you have a more attractive precision vs. recall tradeoff.
     *
     * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
     */
    public val areaUnderPrCurve: kotlin.Double? = builder.areaUnderPrCurve
    /**
     * A list of `ColumnImportance` structures containing column importance metrics, sorted in order of descending importance.
     */
    public val columnImportances: List? = builder.columnImportances
    /**
     * 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 val confusionMatrix: aws.sdk.kotlin.services.glue.model.ConfusionMatrix? = builder.confusionMatrix
    /**
     * The maximum F1 metric indicates the transform's accuracy between 0 and 1, where 1 is the best accuracy.
     *
     * For more information, see [F1 score](https://en.wikipedia.org/wiki/F1_score) in Wikipedia.
     */
    public val f1: kotlin.Double? = builder.f1
    /**
     * The precision metric indicates when often your transform is correct when it predicts a match. Specifically, it measures how well the transform finds true positives from the total true positives possible.
     *
     * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
     */
    public val precision: kotlin.Double? = builder.precision
    /**
     * The recall metric indicates that for an actual match, how often your transform predicts the match. Specifically, it measures how well the transform finds true positives from the total records in the source data.
     *
     * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
     */
    public val recall: kotlin.Double? = builder.recall

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

    override fun toString(): kotlin.String = buildString {
        append("FindMatchesMetrics(")
        append("areaUnderPrCurve=$areaUnderPrCurve,")
        append("columnImportances=$columnImportances,")
        append("confusionMatrix=$confusionMatrix,")
        append("f1=$f1,")
        append("precision=$precision,")
        append("recall=$recall")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = areaUnderPrCurve?.hashCode() ?: 0
        result = 31 * result + (columnImportances?.hashCode() ?: 0)
        result = 31 * result + (confusionMatrix?.hashCode() ?: 0)
        result = 31 * result + (f1?.hashCode() ?: 0)
        result = 31 * result + (precision?.hashCode() ?: 0)
        result = 31 * result + (recall?.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 FindMatchesMetrics

        if (!(areaUnderPrCurve?.equals(other.areaUnderPrCurve) ?: (other.areaUnderPrCurve == null))) return false
        if (columnImportances != other.columnImportances) return false
        if (confusionMatrix != other.confusionMatrix) return false
        if (!(f1?.equals(other.f1) ?: (other.f1 == null))) return false
        if (!(precision?.equals(other.precision) ?: (other.precision == null))) return false
        if (!(recall?.equals(other.recall) ?: (other.recall == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The area under the precision/recall curve (AUPRC) is a single number measuring the overall quality of the transform, that is independent of the choice made for precision vs. recall. Higher values indicate that you have a more attractive precision vs. recall tradeoff.
         *
         * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
         */
        public var areaUnderPrCurve: kotlin.Double? = null
        /**
         * A list of `ColumnImportance` structures containing column importance metrics, sorted in order of descending importance.
         */
        public var columnImportances: List? = null
        /**
         * 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 var confusionMatrix: aws.sdk.kotlin.services.glue.model.ConfusionMatrix? = null
        /**
         * The maximum F1 metric indicates the transform's accuracy between 0 and 1, where 1 is the best accuracy.
         *
         * For more information, see [F1 score](https://en.wikipedia.org/wiki/F1_score) in Wikipedia.
         */
        public var f1: kotlin.Double? = null
        /**
         * The precision metric indicates when often your transform is correct when it predicts a match. Specifically, it measures how well the transform finds true positives from the total true positives possible.
         *
         * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
         */
        public var precision: kotlin.Double? = null
        /**
         * The recall metric indicates that for an actual match, how often your transform predicts the match. Specifically, it measures how well the transform finds true positives from the total records in the source data.
         *
         * For more information, see [Precision and recall](https://en.wikipedia.org/wiki/Precision_and_recall) in Wikipedia.
         */
        public var recall: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.FindMatchesMetrics) : this() {
            this.areaUnderPrCurve = x.areaUnderPrCurve
            this.columnImportances = x.columnImportances
            this.confusionMatrix = x.confusionMatrix
            this.f1 = x.f1
            this.precision = x.precision
            this.recall = x.recall
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.ConfusionMatrix] inside the given [block]
         */
        public fun confusionMatrix(block: aws.sdk.kotlin.services.glue.model.ConfusionMatrix.Builder.() -> kotlin.Unit) {
            this.confusionMatrix = aws.sdk.kotlin.services.glue.model.ConfusionMatrix.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy