Covariance¶
Covariance algorithm computes the following set of quantitative dataset characteristics:
means
covariance
correlation
Operation |
Computational methods |
Programming Interface |
||
Mathematical formulation¶
Refer to Developer Guide: Covariance.
Programming Interface¶
All types and functions in this section are declared in the
oneapi::dal::covariance namespace and are available via inclusion of the
oneapi/dal/algo/covariance.hpp header file.
Descriptor¶
-
template<typename
Float= 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
-
result_option_id
result_options¶ Choose which results should be computed and returned.
- Getter & Setter
result_option_id get_result_options() constauto & set_result_options(const result_option_id &value)
Training compute(...)¶
Input¶
-
template<typename
Task= task::by_default>
classcompute_input¶ - Template Parameters
Task – Tag-type that specifies the type of the problem to solve. Can be
task::compute.
Constructors
-
compute_input(const table &data)¶ Creates a new instance of the class with the given
dataproperty value.
Properties
Result¶
-
template<typename
Task= task::by_default>
classcompute_result¶ - Template Parameters
Task – Tag-type that specifies the type of the problem to solve. Can be
task::compute.
Constructors
-
compute_result()¶ Creates a new instance of the class with the default property values.
Properties
-
const table &
cov_matrix¶ The covariance matrix. Default value: table{}.
- Getter & Setter
const table & get_cov_matrix() constauto & set_cov_matrix(const table &value)
-
const result_option_id &
result_options¶ Result options that indicates availability of the properties. Default value: default_result_options<Task>.
- Getter & Setter
const result_option_id & get_result_options() constauto & set_result_options(const result_option_id &value)
Operation¶
-
template<typename
Descriptor>
covariance::compute_resultcompute(const Descriptor &desc, const covariance::compute_input &input)¶ - Parameters
desc – Covariance algorithm descriptor
covariance::descriptorinput – Input data for the computing operation
- Preconditions
input.data.is_empty == false