linda-0.1.2: LINear Discriminant Analysis

Portabilityportable
Stabilitystable
Maintainerlennart...schmitt@<nospam>gmail.com

Numeric.Function

Contents

Description

This module implements the simple functionality of multidimensional linear function calculation.

Synopsis

Data Types

type LinFunction a = [a]Source

The function-type represents a function by its constants, e.g.

 [b0,b1,...,bn] 

represents the function f = b0 + b1 * X1 + ... + bn * Xn

type Values a = [a]Source

Similare to the function-type, but die value-type represents the values of the variables in a function, e.g.

 [X1,...,Xn]

Functions

calcLinFunction :: Num a => LinFunction a -> Values a -> aSource

Calculates the result of a given function with given values, e.g.

 calcLinFunction [1,1,1] [1,2] == 1 + 1 * 1 + 1 * 2 == 4
 calcLinFunction [1,2,3] [1,1] == 1 + 2 * 1 + 3 * 1 == 6
 calcLinFunction [1,2,3] [1..] == 1 + 2 * 1 + 3 * 2 == 9