makeGramMatrix

 

 

Overview

The makeGramMatrix function returns the N by N matrix containing the dot products of the row vectors in the input {NumMatrix}, known as the Gram matrix. The makeGramMatrix function will only receive a number matrix and always returns a new number Matrix containing the result.

The input argument {NumMatrix} must be an N by M number matrix representing the original independent variable observations (the dependent variable is omitted) in the form of:

x x x x... y

x x x x... y

....

x x x x... y

The output argument will be an N by N number matrix containing the dot products of the row vectors of the original observation matrix X, where: G[r,c] = vectorDotProduct(rowX[r],rowX[c]).

If the optional dependent variable number vector is included, The output argument will be an N by N+1 number matrix containing the dot products of the row vectors of the original observation matrix X, where: G[r,c] = vectorDotProduct(rowX[r],rowX[c]), plus the N+1th column will contain the original dependent values.

Usage

The makeGramMatrix functionis a non-destructive function useful when you want to create a Gram matrix in preparation for dual form regression. See Cristianini, "Support Vector Machines", page 169.

 

Syntax


Expression:

(makeGramMatrix NumMatrix)


Arguments Name Type Description
Argument:NumMatrixNumMatrix Matrix containing the original independent observations

Returns:

A new number Matrix object containing the dot products of the row vectors of the original observation matrix.



 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

Here are the links to the data types of the function arguments.

NumMatrix Vector

Here are also a number of links to functions having arguments with any of these data types.

addMethod appendWriteln append apply
binaryInsert binarySearch bitToNumberVector boolean
cdr compareEQ compareGE compareGT
compareLE compareLT compareNE compare
comparison cons copy count
debugDetective delete dimension display
exportCsv exportSbf exportTab findBlock
find freeBlock importCsv importSbf
importTab insert inside integer
isAtom isBitVector isBoolean isByteVector
isCharAlphabetic isCharAlphanumeric isCharLowercase isCharName
isCharNumeric isCharUppercase isCharWhitespace isChar
isCharacter isComplex isDate isDictionary
isDirectory isEqual isError isFloatVector
isIdentical isInside isIntegerVector isInteger
isLambda isMatrix isMember isMoney
isNumberMatrix isNumberVector isNumber isObjectVector
isObject isPair isPcodeVector isString
isStructure isSymbol isText isType
isVector length list macroReplace
makeGaussianMatrix makeGramMatrix makeQuotedList map
mapc matrixGaussianEliminate matrixGaussianSubstitute member
money new number objectToList
objectToMatrix objectToNumMatrix objectToNumVector objectToVector
offset pair parent parse
pointer product rank refAttributes
refValues ref remove resize
reverse saveObject setAttributes setBlock
setCar setCdr setLastCdr setq
sizeof sort stringToBVector stringToVector
string svmRegression type uniqueInsert
vectorBinaryInnerProduct vectorBipolarInnerProduct vectorCosineInnerProduct vectorCubeInnerProduct
vectorExpInnerProduct vectorFill vectorInnerProduct vectorLogInnerProduct
vectorQuartInnerProduct vectorQuintInnerProduct vectorSigmoidInnerProduct vectorSineInnerProduct
vectorSquareInnerProduct vectorTanInnerProduct vectorTanhInnerProduct writelg
writeln

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE