Ridge2Regressor.RdParameters' description can be found at https://techtonique.github.io/nnetsauce/
Ridge2Regressor(
n_hidden_features = 5L,
activation_name = "relu",
a = 0.01,
nodes_sim = "sobol",
bias = TRUE,
dropout = 0,
n_clusters = 2L,
cluster_encode = TRUE,
type_clust = "kmeans",
lambda1 = 0.1,
lambda2 = 0.1,
seed = 123L,
backend = c("cpu", "gpu", "tpu"),
venv_path = "./venv",
...
)
set.seed(123)
n <- 50 ; p <- 3
X <- matrix(rnorm(n * p), n, p) # no intercept!
y <- rnorm(n)
obj <- nnetsauce::Ridge2Regressor(n_hidden_features = 5L)
#> Error in reticulate::use_virtualenv(venv_path, required = TRUE): Directory ./venv is not a Python virtualenv
print(obj$fit(X, y))
#> Error: object 'obj' not found
print(obj$score(X, y))
#> Error: object 'obj' not found