データセット#

oneapi::mkl::stats::dataset 構造体は、多次元データセットの情報を統合します。

API#

構文#

namespace oneapi::mkl::stats { 
  template<layout ObservationsLayout = layout::row_major, 
  typename Type = float*>
namespace oneapi::mkl::stats { 
  struct dataset {} 
}

バッファー API の特殊化

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 の特殊化

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; 
 }; 
}

インクルード・ファイル#

  • oneapi/mkl/stats.hpp

テンプレート・パラメーター#

typename DataType

データセットのタイプ。sycl::buffer<float,1>sycl::buffer<double,1> (バッファーベースのデータセットの場合)、または float*double* (USM ベースのデータセットの場合) になります。

oneapi::mkl::stats::layout ObservationsLayout

データセットの観測行列のレイアウト。固有の値は次のとおりです: oneapi::mkl::stats::layout::row_major oneapi::mkl::stats::layout::col_major

構造体メンバー#

名前

タイプ

説明

n_dims

std::int64_t

次元数 (変数)

n_observations

std::int64_t

観測数

layout

oneapi::mkl::stats::layout

観測行列のレイアウト (行または列を優先) を特徴付けます

observations

sycl::buffer<Type, 1> / Type*

観察の行列。

weights

sycl::buffer<Type, 1> / Type*

サイズ n_observations の重みの配列。配列の要素は負でない数値です。パラメーターが指定されていない場合、各観測値には 1 に等しい重みが割り当てられます。

indices

sycl::buffer<std::int64_t, 1> / std::int64_t*

処理されるベクトル・コンポーネントの配列。配列のサイズは n_dims です。パラメーターが指定されていない場合は、ベクトルのすべてのコンポーネントが処理されます。