permutation_shap.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2021, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 namespace raft {
20 class handle_t;
21 }
22 
23 namespace ML {
24 namespace Explainer {
25 
70 void permutation_shap_dataset(const raft::handle_t& handle,
71  float* dataset,
72  const float* background,
73  int nrows_bg,
74  int ncols,
75  const float* row,
76  int* idx,
77  bool row_major);
78 
79 void permutation_shap_dataset(const raft::handle_t& handle,
80  double* dataset,
81  const double* background,
82  int nrows_bg,
83  int ncols,
84  const double* row,
85  int* idx,
86  bool row_major);
87 
123 void shap_main_effect_dataset(const raft::handle_t& handle,
124  float* dataset,
125  const float* background,
126  int nrows_bg,
127  int ncols,
128  const float* row,
129  int* idx,
130  bool row_major);
131 
132 void shap_main_effect_dataset(const raft::handle_t& handle,
133  double* dataset,
134  const double* background,
135  int nrows_bg,
136  int ncols,
137  const double* row,
138  int* idx,
139  bool row_major);
140 
156 void update_perm_shap_values(const raft::handle_t& handle,
157  float* shap_values,
158  const float* y_hat,
159  const int ncols,
160  const int* idx);
161 
162 void update_perm_shap_values(const raft::handle_t& handle,
163  double* shap_values,
164  const double* y_hat,
165  const int ncols,
166  const int* idx);
167 
168 } // namespace Explainer
169 } // namespace ML
void shap_main_effect_dataset(const raft::handle_t &handle, float *dataset, const float *background, int nrows_bg, int ncols, const float *row, int *idx, bool row_major)
void permutation_shap_dataset(const raft::handle_t &handle, float *dataset, const float *background, int nrows_bg, int ncols, const float *row, int *idx, bool row_major)
void update_perm_shap_values(const raft::handle_t &handle, float *shap_values, const float *y_hat, const int ncols, const int *idx)
Definition: dbscan.hpp:30
Definition: dbscan.hpp:26