{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Comprehend.Types.EntityTypesEvaluationMetrics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EntityTypesEvaluationMetrics = EntityTypesEvaluationMetrics'
{
EntityTypesEvaluationMetrics -> Maybe Double
recall :: Prelude.Maybe Prelude.Double,
EntityTypesEvaluationMetrics -> Maybe Double
precision :: Prelude.Maybe Prelude.Double,
EntityTypesEvaluationMetrics -> Maybe Double
f1Score :: Prelude.Maybe Prelude.Double
}
deriving (EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool
(EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool)
-> (EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool)
-> Eq EntityTypesEvaluationMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool
$c/= :: EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool
== :: EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool
$c== :: EntityTypesEvaluationMetrics
-> EntityTypesEvaluationMetrics -> Bool
Prelude.Eq, ReadPrec [EntityTypesEvaluationMetrics]
ReadPrec EntityTypesEvaluationMetrics
Int -> ReadS EntityTypesEvaluationMetrics
ReadS [EntityTypesEvaluationMetrics]
(Int -> ReadS EntityTypesEvaluationMetrics)
-> ReadS [EntityTypesEvaluationMetrics]
-> ReadPrec EntityTypesEvaluationMetrics
-> ReadPrec [EntityTypesEvaluationMetrics]
-> Read EntityTypesEvaluationMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EntityTypesEvaluationMetrics]
$creadListPrec :: ReadPrec [EntityTypesEvaluationMetrics]
readPrec :: ReadPrec EntityTypesEvaluationMetrics
$creadPrec :: ReadPrec EntityTypesEvaluationMetrics
readList :: ReadS [EntityTypesEvaluationMetrics]
$creadList :: ReadS [EntityTypesEvaluationMetrics]
readsPrec :: Int -> ReadS EntityTypesEvaluationMetrics
$creadsPrec :: Int -> ReadS EntityTypesEvaluationMetrics
Prelude.Read, Int -> EntityTypesEvaluationMetrics -> ShowS
[EntityTypesEvaluationMetrics] -> ShowS
EntityTypesEvaluationMetrics -> String
(Int -> EntityTypesEvaluationMetrics -> ShowS)
-> (EntityTypesEvaluationMetrics -> String)
-> ([EntityTypesEvaluationMetrics] -> ShowS)
-> Show EntityTypesEvaluationMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntityTypesEvaluationMetrics] -> ShowS
$cshowList :: [EntityTypesEvaluationMetrics] -> ShowS
show :: EntityTypesEvaluationMetrics -> String
$cshow :: EntityTypesEvaluationMetrics -> String
showsPrec :: Int -> EntityTypesEvaluationMetrics -> ShowS
$cshowsPrec :: Int -> EntityTypesEvaluationMetrics -> ShowS
Prelude.Show, (forall x.
EntityTypesEvaluationMetrics -> Rep EntityTypesEvaluationMetrics x)
-> (forall x.
Rep EntityTypesEvaluationMetrics x -> EntityTypesEvaluationMetrics)
-> Generic EntityTypesEvaluationMetrics
forall x.
Rep EntityTypesEvaluationMetrics x -> EntityTypesEvaluationMetrics
forall x.
EntityTypesEvaluationMetrics -> Rep EntityTypesEvaluationMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EntityTypesEvaluationMetrics x -> EntityTypesEvaluationMetrics
$cfrom :: forall x.
EntityTypesEvaluationMetrics -> Rep EntityTypesEvaluationMetrics x
Prelude.Generic)
newEntityTypesEvaluationMetrics ::
EntityTypesEvaluationMetrics
newEntityTypesEvaluationMetrics :: EntityTypesEvaluationMetrics
newEntityTypesEvaluationMetrics =
EntityTypesEvaluationMetrics' :: Maybe Double
-> Maybe Double -> Maybe Double -> EntityTypesEvaluationMetrics
EntityTypesEvaluationMetrics'
{ $sel:recall:EntityTypesEvaluationMetrics' :: Maybe Double
recall =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:precision:EntityTypesEvaluationMetrics' :: Maybe Double
precision = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:f1Score:EntityTypesEvaluationMetrics' :: Maybe Double
f1Score = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
entityTypesEvaluationMetrics_recall :: Lens.Lens' EntityTypesEvaluationMetrics (Prelude.Maybe Prelude.Double)
entityTypesEvaluationMetrics_recall :: (Maybe Double -> f (Maybe Double))
-> EntityTypesEvaluationMetrics -> f EntityTypesEvaluationMetrics
entityTypesEvaluationMetrics_recall = (EntityTypesEvaluationMetrics -> Maybe Double)
-> (EntityTypesEvaluationMetrics
-> Maybe Double -> EntityTypesEvaluationMetrics)
-> Lens
EntityTypesEvaluationMetrics
EntityTypesEvaluationMetrics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityTypesEvaluationMetrics' {Maybe Double
recall :: Maybe Double
$sel:recall:EntityTypesEvaluationMetrics' :: EntityTypesEvaluationMetrics -> Maybe Double
recall} -> Maybe Double
recall) (\s :: EntityTypesEvaluationMetrics
s@EntityTypesEvaluationMetrics' {} Maybe Double
a -> EntityTypesEvaluationMetrics
s {$sel:recall:EntityTypesEvaluationMetrics' :: Maybe Double
recall = Maybe Double
a} :: EntityTypesEvaluationMetrics)
entityTypesEvaluationMetrics_precision :: Lens.Lens' EntityTypesEvaluationMetrics (Prelude.Maybe Prelude.Double)
entityTypesEvaluationMetrics_precision :: (Maybe Double -> f (Maybe Double))
-> EntityTypesEvaluationMetrics -> f EntityTypesEvaluationMetrics
entityTypesEvaluationMetrics_precision = (EntityTypesEvaluationMetrics -> Maybe Double)
-> (EntityTypesEvaluationMetrics
-> Maybe Double -> EntityTypesEvaluationMetrics)
-> Lens
EntityTypesEvaluationMetrics
EntityTypesEvaluationMetrics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityTypesEvaluationMetrics' {Maybe Double
precision :: Maybe Double
$sel:precision:EntityTypesEvaluationMetrics' :: EntityTypesEvaluationMetrics -> Maybe Double
precision} -> Maybe Double
precision) (\s :: EntityTypesEvaluationMetrics
s@EntityTypesEvaluationMetrics' {} Maybe Double
a -> EntityTypesEvaluationMetrics
s {$sel:precision:EntityTypesEvaluationMetrics' :: Maybe Double
precision = Maybe Double
a} :: EntityTypesEvaluationMetrics)
entityTypesEvaluationMetrics_f1Score :: Lens.Lens' EntityTypesEvaluationMetrics (Prelude.Maybe Prelude.Double)
entityTypesEvaluationMetrics_f1Score :: (Maybe Double -> f (Maybe Double))
-> EntityTypesEvaluationMetrics -> f EntityTypesEvaluationMetrics
entityTypesEvaluationMetrics_f1Score = (EntityTypesEvaluationMetrics -> Maybe Double)
-> (EntityTypesEvaluationMetrics
-> Maybe Double -> EntityTypesEvaluationMetrics)
-> Lens
EntityTypesEvaluationMetrics
EntityTypesEvaluationMetrics
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityTypesEvaluationMetrics' {Maybe Double
f1Score :: Maybe Double
$sel:f1Score:EntityTypesEvaluationMetrics' :: EntityTypesEvaluationMetrics -> Maybe Double
f1Score} -> Maybe Double
f1Score) (\s :: EntityTypesEvaluationMetrics
s@EntityTypesEvaluationMetrics' {} Maybe Double
a -> EntityTypesEvaluationMetrics
s {$sel:f1Score:EntityTypesEvaluationMetrics' :: Maybe Double
f1Score = Maybe Double
a} :: EntityTypesEvaluationMetrics)
instance Core.FromJSON EntityTypesEvaluationMetrics where
parseJSON :: Value -> Parser EntityTypesEvaluationMetrics
parseJSON =
String
-> (Object -> Parser EntityTypesEvaluationMetrics)
-> Value
-> Parser EntityTypesEvaluationMetrics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EntityTypesEvaluationMetrics"
( \Object
x ->
Maybe Double
-> Maybe Double -> Maybe Double -> EntityTypesEvaluationMetrics
EntityTypesEvaluationMetrics'
(Maybe Double
-> Maybe Double -> Maybe Double -> EntityTypesEvaluationMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double -> Maybe Double -> EntityTypesEvaluationMetrics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Recall")
Parser
(Maybe Double -> Maybe Double -> EntityTypesEvaluationMetrics)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> EntityTypesEvaluationMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Precision")
Parser (Maybe Double -> EntityTypesEvaluationMetrics)
-> Parser (Maybe Double) -> Parser EntityTypesEvaluationMetrics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"F1Score")
)
instance
Prelude.Hashable
EntityTypesEvaluationMetrics
instance Prelude.NFData EntityTypesEvaluationMetrics