setup_python_pkgs: Centralized Setup for Python Environment

View source: R/environmentSetup.R

setup_python_pkgsR Documentation

Centralized Setup for Python Environment

Description

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.

Usage

setup_python_pkgs()

Details

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.

Value

A list containing imported Python modules: sklearn, numpy, and shap.

Examples

python_pkgs <- setup_python_pkgs()
# You can now use python_pkgs$sklearn, python_pkgs$numpy, and python_pkgs$shap in other functions

tkolisnik/Rf2pval documentation built on Feb. 20, 2024, 5:39 a.m.