{-# 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.Glue.Types.FindMatchesMetrics where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.ColumnImportance
import Amazonka.Glue.Types.ConfusionMatrix
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FindMatchesMetrics = FindMatchesMetrics'
{
FindMatchesMetrics -> Maybe Double
f1 :: Prelude.Maybe Prelude.Double,
FindMatchesMetrics -> Maybe Double
areaUnderPRCurve :: Prelude.Maybe Prelude.Double,
FindMatchesMetrics -> Maybe Double
recall :: Prelude.Maybe Prelude.Double,
FindMatchesMetrics -> Maybe Double
precision :: Prelude.Maybe Prelude.Double,
FindMatchesMetrics -> Maybe [ColumnImportance]
columnImportances :: Prelude.Maybe [ColumnImportance],
FindMatchesMetrics -> Maybe ConfusionMatrix
confusionMatrix :: Prelude.Maybe ConfusionMatrix
}
deriving (FindMatchesMetrics -> FindMatchesMetrics -> Bool
(FindMatchesMetrics -> FindMatchesMetrics -> Bool)
-> (FindMatchesMetrics -> FindMatchesMetrics -> Bool)
-> Eq FindMatchesMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindMatchesMetrics -> FindMatchesMetrics -> Bool
$c/= :: FindMatchesMetrics -> FindMatchesMetrics -> Bool
== :: FindMatchesMetrics -> FindMatchesMetrics -> Bool
$c== :: FindMatchesMetrics -> FindMatchesMetrics -> Bool
Prelude.Eq, ReadPrec [FindMatchesMetrics]
ReadPrec FindMatchesMetrics
Int -> ReadS FindMatchesMetrics
ReadS [FindMatchesMetrics]
(Int -> ReadS FindMatchesMetrics)
-> ReadS [FindMatchesMetrics]
-> ReadPrec FindMatchesMetrics
-> ReadPrec [FindMatchesMetrics]
-> Read FindMatchesMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindMatchesMetrics]
$creadListPrec :: ReadPrec [FindMatchesMetrics]
readPrec :: ReadPrec FindMatchesMetrics
$creadPrec :: ReadPrec FindMatchesMetrics
readList :: ReadS [FindMatchesMetrics]
$creadList :: ReadS [FindMatchesMetrics]
readsPrec :: Int -> ReadS FindMatchesMetrics
$creadsPrec :: Int -> ReadS FindMatchesMetrics
Prelude.Read, Int -> FindMatchesMetrics -> ShowS
[FindMatchesMetrics] -> ShowS
FindMatchesMetrics -> String
(Int -> FindMatchesMetrics -> ShowS)
-> (FindMatchesMetrics -> String)
-> ([FindMatchesMetrics] -> ShowS)
-> Show FindMatchesMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindMatchesMetrics] -> ShowS
$cshowList :: [FindMatchesMetrics] -> ShowS
show :: FindMatchesMetrics -> String
$cshow :: FindMatchesMetrics -> String
showsPrec :: Int -> FindMatchesMetrics -> ShowS
$cshowsPrec :: Int -> FindMatchesMetrics -> ShowS
Prelude.Show, (forall x. FindMatchesMetrics -> Rep FindMatchesMetrics x)
-> (forall x. Rep FindMatchesMetrics x -> FindMatchesMetrics)
-> Generic FindMatchesMetrics
forall x. Rep FindMatchesMetrics x -> FindMatchesMetrics
forall x. FindMatchesMetrics -> Rep FindMatchesMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FindMatchesMetrics x -> FindMatchesMetrics
$cfrom :: forall x. FindMatchesMetrics -> Rep FindMatchesMetrics x
Prelude.Generic)
newFindMatchesMetrics ::
FindMatchesMetrics
newFindMatchesMetrics :: FindMatchesMetrics
newFindMatchesMetrics =
FindMatchesMetrics' :: Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics
FindMatchesMetrics'
{ $sel:f1:FindMatchesMetrics' :: Maybe Double
f1 = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:areaUnderPRCurve:FindMatchesMetrics' :: Maybe Double
areaUnderPRCurve = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:recall:FindMatchesMetrics' :: Maybe Double
recall = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:precision:FindMatchesMetrics' :: Maybe Double
precision = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:columnImportances:FindMatchesMetrics' :: Maybe [ColumnImportance]
columnImportances = Maybe [ColumnImportance]
forall a. Maybe a
Prelude.Nothing,
$sel:confusionMatrix:FindMatchesMetrics' :: Maybe ConfusionMatrix
confusionMatrix = Maybe ConfusionMatrix
forall a. Maybe a
Prelude.Nothing
}
findMatchesMetrics_f1 :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe Prelude.Double)
findMatchesMetrics_f1 :: (Maybe Double -> f (Maybe Double))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_f1 = (FindMatchesMetrics -> Maybe Double)
-> (FindMatchesMetrics -> Maybe Double -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics FindMatchesMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe Double
f1 :: Maybe Double
$sel:f1:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe Double
f1} -> Maybe Double
f1) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe Double
a -> FindMatchesMetrics
s {$sel:f1:FindMatchesMetrics' :: Maybe Double
f1 = Maybe Double
a} :: FindMatchesMetrics)
findMatchesMetrics_areaUnderPRCurve :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe Prelude.Double)
findMatchesMetrics_areaUnderPRCurve :: (Maybe Double -> f (Maybe Double))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_areaUnderPRCurve = (FindMatchesMetrics -> Maybe Double)
-> (FindMatchesMetrics -> Maybe Double -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics FindMatchesMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe Double
areaUnderPRCurve :: Maybe Double
$sel:areaUnderPRCurve:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe Double
areaUnderPRCurve} -> Maybe Double
areaUnderPRCurve) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe Double
a -> FindMatchesMetrics
s {$sel:areaUnderPRCurve:FindMatchesMetrics' :: Maybe Double
areaUnderPRCurve = Maybe Double
a} :: FindMatchesMetrics)
findMatchesMetrics_recall :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe Prelude.Double)
findMatchesMetrics_recall :: (Maybe Double -> f (Maybe Double))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_recall = (FindMatchesMetrics -> Maybe Double)
-> (FindMatchesMetrics -> Maybe Double -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics FindMatchesMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe Double
recall :: Maybe Double
$sel:recall:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe Double
recall} -> Maybe Double
recall) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe Double
a -> FindMatchesMetrics
s {$sel:recall:FindMatchesMetrics' :: Maybe Double
recall = Maybe Double
a} :: FindMatchesMetrics)
findMatchesMetrics_precision :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe Prelude.Double)
findMatchesMetrics_precision :: (Maybe Double -> f (Maybe Double))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_precision = (FindMatchesMetrics -> Maybe Double)
-> (FindMatchesMetrics -> Maybe Double -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics FindMatchesMetrics (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe Double
precision :: Maybe Double
$sel:precision:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe Double
precision} -> Maybe Double
precision) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe Double
a -> FindMatchesMetrics
s {$sel:precision:FindMatchesMetrics' :: Maybe Double
precision = Maybe Double
a} :: FindMatchesMetrics)
findMatchesMetrics_columnImportances :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe [ColumnImportance])
findMatchesMetrics_columnImportances :: (Maybe [ColumnImportance] -> f (Maybe [ColumnImportance]))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_columnImportances = (FindMatchesMetrics -> Maybe [ColumnImportance])
-> (FindMatchesMetrics
-> Maybe [ColumnImportance] -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics
FindMatchesMetrics
(Maybe [ColumnImportance])
(Maybe [ColumnImportance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe [ColumnImportance]
columnImportances :: Maybe [ColumnImportance]
$sel:columnImportances:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe [ColumnImportance]
columnImportances} -> Maybe [ColumnImportance]
columnImportances) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe [ColumnImportance]
a -> FindMatchesMetrics
s {$sel:columnImportances:FindMatchesMetrics' :: Maybe [ColumnImportance]
columnImportances = Maybe [ColumnImportance]
a} :: FindMatchesMetrics) ((Maybe [ColumnImportance] -> f (Maybe [ColumnImportance]))
-> FindMatchesMetrics -> f FindMatchesMetrics)
-> ((Maybe [ColumnImportance] -> f (Maybe [ColumnImportance]))
-> Maybe [ColumnImportance] -> f (Maybe [ColumnImportance]))
-> (Maybe [ColumnImportance] -> f (Maybe [ColumnImportance]))
-> FindMatchesMetrics
-> f FindMatchesMetrics
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ColumnImportance]
[ColumnImportance]
[ColumnImportance]
[ColumnImportance]
-> Iso
(Maybe [ColumnImportance])
(Maybe [ColumnImportance])
(Maybe [ColumnImportance])
(Maybe [ColumnImportance])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ColumnImportance]
[ColumnImportance]
[ColumnImportance]
[ColumnImportance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
findMatchesMetrics_confusionMatrix :: Lens.Lens' FindMatchesMetrics (Prelude.Maybe ConfusionMatrix)
findMatchesMetrics_confusionMatrix :: (Maybe ConfusionMatrix -> f (Maybe ConfusionMatrix))
-> FindMatchesMetrics -> f FindMatchesMetrics
findMatchesMetrics_confusionMatrix = (FindMatchesMetrics -> Maybe ConfusionMatrix)
-> (FindMatchesMetrics
-> Maybe ConfusionMatrix -> FindMatchesMetrics)
-> Lens
FindMatchesMetrics
FindMatchesMetrics
(Maybe ConfusionMatrix)
(Maybe ConfusionMatrix)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesMetrics' {Maybe ConfusionMatrix
confusionMatrix :: Maybe ConfusionMatrix
$sel:confusionMatrix:FindMatchesMetrics' :: FindMatchesMetrics -> Maybe ConfusionMatrix
confusionMatrix} -> Maybe ConfusionMatrix
confusionMatrix) (\s :: FindMatchesMetrics
s@FindMatchesMetrics' {} Maybe ConfusionMatrix
a -> FindMatchesMetrics
s {$sel:confusionMatrix:FindMatchesMetrics' :: Maybe ConfusionMatrix
confusionMatrix = Maybe ConfusionMatrix
a} :: FindMatchesMetrics)
instance Core.FromJSON FindMatchesMetrics where
parseJSON :: Value -> Parser FindMatchesMetrics
parseJSON =
String
-> (Object -> Parser FindMatchesMetrics)
-> Value
-> Parser FindMatchesMetrics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FindMatchesMetrics"
( \Object
x ->
Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics
FindMatchesMetrics'
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
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
"F1")
Parser
(Maybe Double
-> Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
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
"AreaUnderPRCurve")
Parser
(Maybe Double
-> Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
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
"Recall")
Parser
(Maybe Double
-> Maybe [ColumnImportance]
-> Maybe ConfusionMatrix
-> FindMatchesMetrics)
-> Parser (Maybe Double)
-> Parser
(Maybe [ColumnImportance]
-> Maybe ConfusionMatrix -> FindMatchesMetrics)
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 [ColumnImportance]
-> Maybe ConfusionMatrix -> FindMatchesMetrics)
-> Parser (Maybe [ColumnImportance])
-> Parser (Maybe ConfusionMatrix -> FindMatchesMetrics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ColumnImportance]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ColumnImportances"
Parser (Maybe (Maybe [ColumnImportance]))
-> Maybe [ColumnImportance] -> Parser (Maybe [ColumnImportance])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ColumnImportance]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe ConfusionMatrix -> FindMatchesMetrics)
-> Parser (Maybe ConfusionMatrix) -> Parser FindMatchesMetrics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfusionMatrix)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfusionMatrix")
)
instance Prelude.Hashable FindMatchesMetrics
instance Prelude.NFData FindMatchesMetrics