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

scala.googleapis.bigquery.ConfusionMatrix.scala Maven / Gradle / Ivy

There is a newer version: 0.6.1-v2-20241111
Show newest version
package googleapis.bigquery

import io.circe._
import io.circe.syntax._

final case class ConfusionMatrix(
    /** Confidence threshold used when computing the entries of the confusion matrix.
      */
    confidenceThreshold: Option[Double] = None,
    /** One row per actual label.
      */
    rows: Option[List[Row]] = None,
)
object ConfusionMatrix {
  implicit val encoder: Encoder[ConfusionMatrix] = Encoder.instance { x =>
    Json.obj("confidenceThreshold" := x.confidenceThreshold, "rows" := x.rows)
  }
  implicit val decoder: Decoder[ConfusionMatrix] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[Double]]("confidenceThreshold")
      v1 <- c.get[Option[List[Row]]]("rows")
    } yield ConfusionMatrix(v0, v1)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy