Visible to Intel only — GUID: GUID-852751BE-9A68-4A36-B86C-AE464B9A19EA
Visible to Intel only — GUID: GUID-852751BE-9A68-4A36-B86C-AE464B9A19EA
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
Computing
Given a set X of np-dimensional feature vectors , the problem is to compute the following sample characteristics for each feature in the data set:
Statistic |
Definition |
---|---|
Minimum |
|
Maximum |
|
Sum |
|
Sum of squares |
|
Means |
|
Second order raw moment |
|
Sum of squared difference from the means |
|
Variance |
|
Standard deviation |
|
Variation coefficient |
Computation method: dense
The method computes the basic statistics for each feature in the data set.
Programming Interface
Refer to API Reference: Basic statistics.
Distributed mode
The algorithm supports distributed execution in SPMD mode (only on GPU).
Usage Example
Computing
void run_computing(const table& data) { const auto bs_desc = dal::basic_statistics::descriptor{}; const auto result = dal::compute(bs_desc, data); std::cout << "Minimum:\n" << result.get_min() << std::endl; std::cout << "Maximum:\n" << result.get_max() << std::endl; std::cout << "Sum:\n" << result.get_sum() << std::endl; std::cout << "Sum of squares:\n" << result.get_sum_squares() << std::endl; std::cout << "Sum of squared difference from the means:\n" << result.get_sum_squares_centered() << std::endl; std::cout << "Mean:\n" << result.get_mean() << std::endl; std::cout << "Second order raw moment:\n" << result.get_second_order_raw_moment() << std::endl; std::cout << "Variance:\n" << result.get_variance() << std::endl; std::cout << "Standard deviation:\n" << result.get_standard_deviation() << std::endl; std::cout << "Variation:\n" << result.get_variation() << std::endl; }
Examples
oneAPI DPC++
Batch Processing:
oneAPI C++
Batch Processing: