# Note: For obtaining the table with Integrated Gradients method results
# the user needs to complete till sensitivity_analysis() function of the
# MLwrap pipeline using the Integrated Gradient method.
if (requireNamespace("torch", quietly = TRUE)) {
# \donttest{
wrap_object <- preprocessing(df = sim_data,
formula = psych_well ~ depression + emot_intel + resilience,
task = "regression")
wrap_object <- build_model(wrap_object, "Neural Network")
wrap_object <- fine_tuning(wrap_object, "Bayesian Optimization")
wrap_object <- sensitivity_analysis(wrap_object, methods = "Integrated Gradients")
# And then, you can obtain the Integrated Gradients results table.
table_IG <- table_integrated_gradients_results(wrap_object)
# }
}
Run the code above in your browser using DataLab