Skip to content

Commit

Permalink
WIP on shap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzwanenburg committed Feb 19, 2025
1 parent f68aca8 commit 2d892f9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions R/FamiliarDataComputationSHAP.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,22 @@ setMethod(
if (is.null(coalitions)) return(NULL)

# From here, work with mapping representations of the data (h).
mapping_input <- .shap_data_to_mapping(
mapping_input <- mapping <- .shap_data_to_mapping(
data = data,
feature_set = feature_set
)

# TODO: convert input to dataObject
# TODO: predict input data.

# Determine additional mapping.
# TODO: seed should depend on iteration in convergence.
mapping <- .shap_randomise_mapping_from_coalition(
samples = mapping_input,
coalitions = coalitions,
feature_set = feature_set,
seed = 1L
)
mapping <- unique(rbind(
mapping,
.shap_randomise_mapping_from_coalition(
samples = mapping_input,
coalitions = coalitions,
feature_set = feature_set,
seed = 1L
)
))

# Check which parts of mapping lack predictions.

Expand Down

0 comments on commit 2d892f9

Please sign in to comment.