From 0546cb3371a44924737a6268c30d2c8218ec3450 Mon Sep 17 00:00:00 2001 From: joaquin Date: Sun, 28 Jul 2024 11:08:21 +0200 Subject: [PATCH] fixed error messages --- test/scholar/linear/bayesian_ridge_regression_test.exs | 2 +- test/scholar/linear/isotonic_regression_test.exs | 2 +- test/scholar/linear/logistic_regression_test.exs | 2 +- test/scholar/linear/svm_test.exs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/scholar/linear/bayesian_ridge_regression_test.exs b/test/scholar/linear/bayesian_ridge_regression_test.exs index 0766d61f..c8dd6945 100644 --- a/test/scholar/linear/bayesian_ridge_regression_test.exs +++ b/test/scholar/linear/bayesian_ridge_regression_test.exs @@ -33,7 +33,7 @@ defmodule Scholar.Linear.BayesianRidgeRegressionTest do y = Nx.concatenate([y, y], axis: 1) message = - "Elixir.#{inspect(BayesianRidgeRegression)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}" + "Scholar.Linear.BayesianRidgeRegression expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}" assert_raise ArgumentError, message, diff --git a/test/scholar/linear/isotonic_regression_test.exs b/test/scholar/linear/isotonic_regression_test.exs index 74290d2d..568ff47b 100644 --- a/test/scholar/linear/isotonic_regression_test.exs +++ b/test/scholar/linear/isotonic_regression_test.exs @@ -108,7 +108,7 @@ defmodule Scholar.Linear.IsotonicRegressionTest do sample_weights = Nx.tensor([1, 3, 2, 7, 4]) message = - "Elixir.#{inspect(IsotonicRegression)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}" + "Scholar.Linear.IsotonicRegression expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}" assert_raise ArgumentError, message, diff --git a/test/scholar/linear/logistic_regression_test.exs b/test/scholar/linear/logistic_regression_test.exs index 6c64e5c7..8fc2d374 100644 --- a/test/scholar/linear/logistic_regression_test.exs +++ b/test/scholar/linear/logistic_regression_test.exs @@ -79,7 +79,7 @@ defmodule Scholar.Linear.LogisticRegressionTest do y = Nx.tensor([[0, 1], [1, 0]]) assert_raise ArgumentError, - "Elixir.#{inspect(LogisticRegression)} expected y to have shape {n_samples}, got tensor with shape: {2, 2}", + "Scholar.Linear.LogisticRegression expected y to have shape {n_samples}, got tensor with shape: {2, 2}", fn -> LogisticRegression.fit(x, y, num_classes: 2) end end end diff --git a/test/scholar/linear/svm_test.exs b/test/scholar/linear/svm_test.exs index 16bcf02d..0f643b1c 100644 --- a/test/scholar/linear/svm_test.exs +++ b/test/scholar/linear/svm_test.exs @@ -49,7 +49,7 @@ defmodule Scholar.Linear.SVMTest do Nx.concatenate([y_train, y_train], axis: 1) message = - "Elixir.#{inspect(SVM)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y_train))}" + "Scholar.Linear.SVM expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y_train))}" assert_raise ArgumentError, message,