HaskellNN-0.1: src/AI/Model/General.hs
----------------------------------------------------
-- |
-- Module : AI.Network
-- License : GPL
--
-- Maintainer : Kiet Lam <ktklam9@gmail.com>
--
--
-- This module provides an initialization for
-- a general neural network model that can do
-- either regression or classification
--
-- If for regression, the training
-- data must be normalized by user to have
-- range of [-1,1]
--
----------------------------------------------------
module AI.Model.General (
initializeGeneral
) where
import Data.Packed.Vector
import System.Random
import AI.Calculation
import AI.Network
import AI.Model.GenericModel
-- | This is a general neural network
-- model that can be used for classification
-- or regression using HyperbolicTangent
-- as the activation model and MeanSquared as
-- the cost model
initializeGeneral :: [Int] -- ^ The architecture of the neural network
-> Double -- ^ The regularization constant
-> StdGen -- ^ The random generator
-> GenericModel -- ^ Returns the initialized general model
initializeGeneral arch la gen =
initializeModel HyperbolicTangent MeanSquared arch la gen