Dataset¶
The oneapi::mkl::stats::dataset structure consolidates information of a
multi-dimensional dataset.
API¶
Syntax¶
namespace oneapi::mkl::stats {
  template<layout ObservationsLayout = layout::row_major,
  typename Type = float*>
namespace oneapi::mkl::stats {
  struct dataset {}
}
Buffer API specialization
namespace oneapi::mkl::stats {
  template<layout ObservationsLayout, typename Type>struct dataset<ObservationsLayout, sycl::buffer<Type, 1>> {
     explicit dataset(std::int64_t n_dims_, std::int64_t n_observations_,
           sycl::buffer<Type, 1> observations_, sycl::buffer<Type, 1> weights_ = {0},
           sycl::buffer<std::int64_t, 1> indices_ = {0}) : n_dims(n_dims_), n_observations(n_observations_), observations(observations_),
           weights(weights_), indices(indices_);
 std::int64_t n_dims;
 std::int64_t n_observations;
 sycl::buffer<Type, 1> observations;
 sycl::buffer<Type, 1> weights = {0};
 sycl::buffer<std::int64_t, 1> indices = {0};
 static constexpr layout layout = ObservationsLayout;
 };
}
USM API specialization
namespace oneapi::mkl::stats {
 template< layout ObservationsLayout, typename Type>
 struct dataset<ObservationsLayout, Type*> {
      explicit dataset(std::int64_t n_dims_, std::int64_t n_observations_, Type* observations_,
           Type* weights_ = nullptr, std::int64_t* indices_ = nullptr) :
           n_dims(n_dims_), n_observations(n_observations_),
           observations(observations_),
           weights(weights_), indices(indices_);
 std::int64_t n_dims;
 std::int64_t n_observations;
 Type* observations;
 Type* weights = nullptr;
 std::int64_t* indices = nullptr;
 static constexpr layout layout = ObservationsLayout;
 };
}
Include Files¶
oneapi/mkl/stats.hpp
Template Parameters¶
  | 
Type of dataset. May be   | 
  | 
Layout of the observations matrix of the dataset. The specific values are as follows:   | 
Struct Members¶
Name  | 
Type  | 
Description  | 
|---|---|---|
n_dims  | 
  | 
The number of dimensions (variables)  | 
n_observations  | 
  | 
The number of observations  | 
layout  | 
  | 
Characterize the matrix of observations layout (row or column major)  | 
observations  | 
  | 
Matrix of observations.  | 
weights  | 
  | 
Array of weights of size n_observations. Elements of the arrays are non-negative numbers. If the parameter is not specified, each observation is assigned a weight equal to 1.  | 
indices  | 
  | 
Array of vector components that will be processed. Size of array is   |