View source: R/environmentSetup.R
setup_python_pkgs | R Documentation |
This function sets up the Python environment for the package. It imports essential Python
libraries using the reticulate
package. This setup is used across various functions in the
package that require Python interoperability. This package depends on Python 3.9.18 being installed and the conda environment being loaded.
setup_python_pkgs()
The function imports the following Python libraries:
sklearn
: Comprehensive machine learning library in Python.
numpy
: Fundamental package for scientific computing in Python.
shap
: Library for SHAP (SHapley Additive exPlanations) values, which explain the output of machine learning models.
These libraries are essential for various machine learning tasks and analyses within the package. This centralized setup ensures consistency and reduces redundancy.
A list containing imported Python modules: sklearn
, numpy
, and shap
.
python_pkgs <- setup_python_pkgs()
# You can now use python_pkgs$sklearn, python_pkgs$numpy, and python_pkgs$shap in other functions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.