import request from './request'

export function getGlobalImportance(model) {
  return request.get(`/shap/global?model=${model || 'random_forest'}`)
}

export function getLocalExplanation(data) {
  return request.post('/shap/local', data)
}

export function getInteractions(model, topN) {
  return request.get(`/shap/interaction?model=${model || 'random_forest'}&top_n=${topN || 10}`)
}

export function getDependence(feature, model) {
  return request.get(`/shap/dependence?feature=${feature}&model=${model || 'random_forest'}`)
}
