From 1d03c6a03fa503d46d89f47e6711e9bd826a5d91 Mon Sep 17 00:00:00 2001 From: "Win Cowger, PhD" Date: Tue, 6 Aug 2024 17:31:13 -0700 Subject: [PATCH] tests passing --- R/match_spec.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/match_spec.R b/R/match_spec.R index 82b4a581..1ad2daa2 100644 --- a/R/match_spec.R +++ b/R/match_spec.R @@ -336,11 +336,12 @@ ai_classify.OpenSpecy <- function(x, library, fill = NULL, ...) { proc <- transpose(filled$spectra, make.names = "wavenumber") |> as.matrix() - pred <- predict.glmnet(library$model, + pred <- predict(library$model, newx = proc, min(library$model$lambda), type = "response") |> as.data.table() + names(pred)[1:3] <- c("x", "y", "z") pred$x <- as.integer(pred$x) pred$y <- as.integer(pred$y)