Basic Statistics#
Basic statistics algorithm computes the following set of quantitative dataset characteristics:
minimums/maximums
sums
means
sums of squares
sums of squared differences from the means
second order raw moments
variances
standard deviations
variations
Operation |
Computational methods |
Programming Interface |
||
Mathematical formulation#
Refer to Developer Guide: Basic statistics.
Programming Interface#
All types and functions in this section are declared in the
oneapi::dal::basic_statistics
namespace and are available via inclusion of the
oneapi/dal/algo/basic_statistics.hpp
header file.
Descriptor#
-
template<typename Float = detail::descriptor_base<>::float_t, typename Method = detail::descriptor_base<>::method_t, typename Task = detail::descriptor_base<>::task_t>
class descriptor# - Template Parameters
Properties
-
result_option_id result_options#
Choose which results should be computed and returned.
- Getter & Setter
result_option_id get_result_options() const
auto & set_result_options(const result_option_id &value)
Training compute(...)#
Input#
-
template<typename Task = task::by_default>
class compute_input# - Template Parameters
Task – Tag-type that specifies the type of the problem to solve. Can be task::compute.
Constructors
-
compute_input()#
-
compute_input(const table &data)#
Creates a new instance of the class with the given
data
property value.
Properties
Result#
-
template<typename Task = task::by_default>
class compute_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 &mean#
A \(1 \times p\) table, where element \(j\) is the mean result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_mean() const
auto & set_mean(const table &value)
-
const table &variation#
A \(1 \times p\) table, where element \(j\) is the variation result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_variation() const
auto & set_variation(const table &value)
-
const table &min#
A \(1 \times p\) table, where element \(j\) is the minimum result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_min() const
auto & set_min(const table &value)
-
const table &variance#
A \(1 \times p\) table, where element \(j\) is the variance result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_variance() const
auto & set_variance(const table &value)
-
const table &sum#
A \(1 \times p\) table, where element \(j\) is the sum result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_sum() const
auto & set_sum(const table &value)
-
const result_option_id &result_options#
Result options that indicates availability of the properties. Default value: full set of.
- Getter & Setter
const result_option_id & get_result_options() const
auto & set_result_options(const result_option_id &value)
-
const table &sum_squares#
A \(1 \times p\) table, where element \(j\) is the sum_squares result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_sum_squares() const
auto & set_sum_squares(const table &value)
-
const table &standard_deviation#
A \(1 \times p\) table, where element \(j\) is the standard_deviation result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_standard_deviation() const
auto & set_standard_deviation(const table &value)
-
const table &sum_squares_centered#
A \(1 \times p\) table, where element \(j\) is the sum_squares_centered result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_sum_squares_centered() const
auto & set_sum_squares_centered(const table &value)
Operation#
-
template<typename Descriptor>
basic_statistics::compute_result compute(const Descriptor &desc, const basic_statistics::compute_input &input)# - Parameters
desc – Basic statistics algorithm descriptor basic_statistics::descriptor
input – Input data for the computing operation
- Preconditions
- input.data.is_empty == false
Partial Training#
Partial Input#
-
template<typename Task = task::by_default>
class partial_compute_input# Constructors
-
partial_compute_input()#
-
partial_compute_input(const partial_compute_result<Task> &prev, const table &data)#
-
partial_compute_input(const partial_compute_result<Task> &prev, const table &data, const table &weights)#
Properties
-
const table &data#
- Getter & Setter
const table & get_data() const
auto & set_data(const table &value)
-
const table &weights#
- Getter & Setter
const table & get_weights() const
auto & set_weights(const table &value)
-
const partial_compute_result<Task> &prev#
- Getter & Setter
const partial_compute_result< Task > & get_prev() const
auto & set_prev(const partial_compute_result< Task > &value)
-
partial_compute_input()#
Partial Result and Finalize Input#
-
template<typename Task = task::by_default>
class partial_compute_result# Constructors
-
partial_compute_result()#
Properties
-
const table &partial_sum_squares#
A \(1 \times p\) table, where element \(j\) is the sum_squares result of current blocks for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_partial_sum_squares() const
auto & set_partial_sum_squares(const table &value)
-
const table &partial_n_rows#
The nobs value. Default value: table{}.
- Getter & Setter
const table & get_partial_n_rows() const
auto & set_partial_n_rows(const table &value)
-
const table &partial_min#
A \(1 \times p\) table, where element \(j\) is the minimum current result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_partial_min() const
auto & set_partial_min(const table &value)
-
const table &partial_max#
A \(1 \times p\) table, where element \(j\) is the maximum current result for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_partial_max() const
auto & set_partial_max(const table &value)
-
const table &partial_sum_squares_centered#
A \(1 \times p\) table, where element \(j\) is the sum_squares_centered result of current blocks for feature \(j\). Default value: table{}.
- Getter & Setter
const table & get_partial_sum_squares_centered() const
auto & set_partial_sum_squares_centered(const table &value)
-
partial_compute_result()#