lib/google_api/big_query/v2/model/binary_confusion_matrix.ex

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigQuery.V2.Model.BinaryConfusionMatrix do
  @moduledoc """
  Confusion matrix for binary classification models.

  ## Attributes

  *   `accuracy` (*type:* `float()`, *default:* `nil`) - The fraction of predictions given the correct label.
  *   `f1Score` (*type:* `float()`, *default:* `nil`) - The equally weighted average of recall and precision.
  *   `falseNegatives` (*type:* `String.t`, *default:* `nil`) - Number of false samples predicted as false.
  *   `falsePositives` (*type:* `String.t`, *default:* `nil`) - Number of false samples predicted as true.
  *   `positiveClassThreshold` (*type:* `float()`, *default:* `nil`) - Threshold value used when computing each of the following metric.
  *   `precision` (*type:* `float()`, *default:* `nil`) - The fraction of actual positive predictions that had positive actual labels.
  *   `recall` (*type:* `float()`, *default:* `nil`) - The fraction of actual positive labels that were given a positive prediction.
  *   `trueNegatives` (*type:* `String.t`, *default:* `nil`) - Number of true samples predicted as false.
  *   `truePositives` (*type:* `String.t`, *default:* `nil`) - Number of true samples predicted as true.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accuracy => float() | nil,
          :f1Score => float() | nil,
          :falseNegatives => String.t() | nil,
          :falsePositives => String.t() | nil,
          :positiveClassThreshold => float() | nil,
          :precision => float() | nil,
          :recall => float() | nil,
          :trueNegatives => String.t() | nil,
          :truePositives => String.t() | nil
        }

  field(:accuracy)
  field(:f1Score)
  field(:falseNegatives)
  field(:falsePositives)
  field(:positiveClassThreshold)
  field(:precision)
  field(:recall)
  field(:trueNegatives)
  field(:truePositives)
end

defimpl Poison.Decoder, for: GoogleApi.BigQuery.V2.Model.BinaryConfusionMatrix do
  def decode(value, options) do
    GoogleApi.BigQuery.V2.Model.BinaryConfusionMatrix.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQuery.V2.Model.BinaryConfusionMatrix do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end