home»research»kml»reference»linear

linear<T>

Description

Linear<T> is a Kernel. Specifically, it is a Mercer Kernel. When using a linear kernel, input space eqn_0j1j is identical to feature space eqn_jwxw. If k is an object of class linear<T>, and u and v are objects of class T, then k(u,v) returns the inner product

eqn_q52h

which is defined to be the product if T is a scalar type.

Example

vector< double > u(10); 
vector< double > v(10); 
linear< vector< double > > kernel; 
cout << kernel( u, v ) << endl; 

Definition

Defined in the KML header <kml/linear.hpp>.

Template Parameters

Parameter Description Default
T The linear argument type

Model of

Mercer Kernel, Default Constructible, Copy Constructible

Type requirements

T must be a vector type or a numeric type; distance_squared<T> should evaluate.

Members

Member Where defined Description
linear() Default Constructible The default constructor
result_type Input value The type of the result: input_value<T>

Notes

See also

Mercer Kernel, gaussian, hermitian, polynomial, sigmoid