packages feed

HLearn-algebra 0.1.0 → 0.1.0.1

raw patch · 2 files changed

+22/−3 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ HLearn.Algebra.Morphism: class Morphism domain params codomain => Homomorphism domain params codomain
+ HLearn.Algebra.Morphism: class Morphism domain params codomain => Injective domain params codomain
+ HLearn.Algebra.Morphism: class Morphism domain params codomain => Surjective domain params codomain

Files

HLearn-algebra.cabal view
@@ -1,5 +1,5 @@ Name:                HLearn-algebra-Version:             0.1.0+Version:             0.1.0.1 Synopsis:            Algebraic foundation for homomorphic learning Description:         This module contains the algebraic basis for the HLearn library.  It is separated out in it's own library because it contains routines that may be useful to others.  In particular, it contains methods for automatically converting algorithms into online/parallel versions, and its structure is slightly more modular (although much less complete) than other algebra packages. Category:            Data Mining, Machine Learning
src/HLearn/Algebra/Morphism.hs view
@@ -7,10 +7,23 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE UndecidableInstances #-} +-- | A \"morphism\" is a general term for a function that converts one data structure into another.  The HLearn library uses this module to allow arbitrary morphisms to be declared, chained together, and assigned properties like surjectivity and homomorphic.+--+-- NOTE: This module is still under heavy development and will probably change drastically!+ module HLearn.Algebra.Morphism-    ( Morphism (..)-    , MorphismComposition (..)+    ( +    -- * Morphisms+    Morphism (..)     , DefaultMorphism (..)+    +    -- * Morphism properties+    , Surjective (..)+    , Injective (..)+    , Homomorphism (..)+    +    -- * Chaining morphisms+    , MorphismComposition (..)     )     where @@ -18,6 +31,8 @@ import HLearn.Algebra.Models import HLearn.Algebra.Structures.Groups +-- | A Morphism converts from a domain to a codomain using the given parameters.  We perform the actual conversion using the @$>@ operator.+ class Morphism domain params codomain | params -> codomain where     morph' :: domain -> params -> codomain     morph' = ($>)@@ -28,6 +43,8 @@     (<.>) :: params -> domain -> codomain     (<.>) = flip morph' ++-- | This data structure allow us to chain arbitrary morphisms together to generate a new morphism. data      ( Morphism domain params1 interdomain     , Morphism interdomain params2 codomain@@ -40,6 +57,8 @@     where         morph' x (params2 :. params1) = morph' (morph' x params1) params2 ++-- | If there is a reasonable default parameter (or no parameters at all) for performing the morphism, this class provides a shortcut syntax. class (Morphism domain params codomain) => DefaultMorphism domain params codomain | domain codomain -> params  where     defMorphParams :: domain -> codomain -> params