Ridge2Regressor.Rd
Parameters' 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")
)
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)
print(obj$fit(X, y))
#> Error in py_call_impl(callable, call_args$unnamed, call_args$named): AttributeError: 'list' object has no attribute 'dtype'
#> Run `reticulate::py_last_error()` for details.
print(obj$score(X, y))
#> Error in py_call_impl(callable, call_args$unnamed, call_args$named): AttributeError: 'NoneType' object has no attribute 'ndim'
#> Run `reticulate::py_last_error()` for details.