|
- {-# LANGUAGE DeriveDataTypeable #-}
-
- import System.Console.CmdArgs.Implicit
-
- data CostFunction = Quadratic | CrossEntropy
- deriving (Show, Data)
-
- data Sample = Sample { lambda :: Double, eta :: Double, fileName :: String,
- costFunction :: CostFunction }
- deriving (Show, Data, Typeable)
-
- sample = Sample { lambda = 5 &= help "Lambda value for regularization",
- eta = 0.5 &= help "Learning rate",
- fileName = "" &= help "Load from file",
- costFunction = Quadratic &= help "Cost function" }
- &= summary "Sample v2"
-
- main = print =<< cmdArgs sample
|