Linear kernel
Operation | Computational methods | Programming Interface |
Mathematical formulation
Programming Interface
- template<typenameFloat= float, typenameMethod= method::by_default, typenameTask= task::by_default>classdescriptor
- Template Parameters
Constructors- descriptor() = default
- Creates a new instance of the class with the default property values.
Properties- doubleshift
- The coefficient
of the linear kernel.
Default value: 0.0.- Getter & Setter
double get_shift() const
auto & set_shift(double value)
- doublescale
- The coefficient
of the linear kernel.
Default value: 1.0.- Getter & Setter
double get_scale() const
auto & set_scale(double value)
- structdense
- Alias tag-type for the dense method.
- structcompute
- Tag-type that parameterizes entities that are used to compute statistics, distance, and so on.
- Alias tag-type for the compute task.
- Template Parameters
- Task– Tag-type that specifies the type of the problem to solve. Can betask::compute.
ConstructorsProperties- An
table with the data y, where each row stores one feature vector.
Default value: table{}.- Getter & Setter
const table & get_y() const
auto & set_y(const table &data)
- An
table with the data x, where each row stores one feature vector.
Default value: table{}.- Getter & Setter
const table & get_x() const
auto & set_x(const table &data)
- Template Parameters
- Task– Tag-type that specifies the type of the problem to solve. Can betask::compute.
Constructors- compute_result()
- Creates a new instance of the class with the default property values.
Properties- A
table with the result kernel functions.
Default value: table{}.- Getter & Setter
const table & get_values() const
auto & set_values(const table &value)
- template<typenameDescriptor> linear_kernel::compute_resultcompute(constDescriptor &desc,constlinear_kernel::compute_input &input)
- Parameters
- desc– Linear Kernel algorithm descriptorlinear_kernel::descriptor.
- input– Input data for the computing operation
- Preconditions
input.data.is_empty == false