Category : reticulate

I am trying to follow this tutorial over here : : https://hfshr.netlify.app/posts/2020-06-07-variable-inportance-with-fastshap/ This tutorial is about using a machine learning algorithm called "SHAP" that attempts to provide the user with a method to interpret the results of complicated "blackbox" style algorithms. Following the tutorial, I was able to get everything to work – except the ..

Read more

I’m using R’s reticulate package to access some Python commands inside R: library(reticulate) py_config() returns the following which looks OK. python: C:/Users/myusername/AppData/Local/r-miniconda/envs/r-reticulate/python.exe libpython: C:/Users/myusername/AppData/Local/r-miniconda/envs/r-reticulate/python36.dll pythonhome: C:/Users/myusername/AppData/Local/r-miniconda/envs/r-reticulate version: 3.6.11 (default, Aug 5 2020, 19:41:03) [MSC v.1916 64 bit (AMD64)] Architecture: 64bit numpy: C:/Users/myusername/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy numpy_version: 1.18.1 Now, when I try to load the Python packages I need: ..

Read more

I have run python bar_chart_race successfully in jupyter notebook. import bar_chart_race as bcr bcr.bar_chart_race(df=wide_1, filename=None, title=’Mortality (per million) by Country’) I have ffmpeg installed on my machine. > Sys.which("ffmpeg") ffmpeg "C:ffmpegbinffmpeg.exe" However, when I tried the same code in rmarkdown with rstudio reticulate, import bar_chart_race as bcr bcr.bar_chart_race(wide_1) I received the following message: Exception: You ..

Read more

Is there any reason why the R script below library(reticulate) sk <- import(‘sklearn’) np <- import(‘numpy’) a <- np$random$random(c(as.integer(5000), as.integer(5000))) pca <- sk$decomposition$PCA(as.integer(100)) pca$fit(a) runs on 4 cores when I try it locally, but it uses only 1 core inside a docker container? I am using –cpuset-cpus="0-3" and have verified by running the same task ..

Read more

I have tried absolutely everything I could think of to try and figure this out. I followed this video exactly, created a new conda environment, installed the packages I want to use, and tried to import the packages. I get this error when I try to import the python packages: Error in py_call_impl(callable, dots$args, dots$keywords) ..

Read more