データセット#
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
テンプレート・パラメーター#
|
データセットのタイプ。 |
|
データセットの観測行列のレイアウト。固有の値は次のとおりです: |
構造体メンバー#
名前 |
タイプ |
説明 |
|---|---|---|
n_dims |
|
次元数 (変数) |
n_observations |
|
観測数 |
layout |
|
観測行列のレイアウト (行または列を優先) を特徴付けます |
observations |
|
観察の行列。 |
weights |
|
サイズ n_observations の重みの配列。配列の要素は負でない数値です。パラメーターが指定されていない場合、各観測値には 1 に等しい重みが割り当てられます。 |
indices |
|
処理されるベクトル・コンポーネントの配列。配列のサイズは |