From 94870163f8eb0738ebfcc24f8b3a51c107f2146e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 15 Jan 2025 12:41:03 +0100 Subject: [PATCH] mix format --- test/scholar/neighbors/knn_regressor_test.exs | 26 +++++++++++++++++-- test/scholar/neighbors/rnn_regressor_test.exs | 13 +++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/test/scholar/neighbors/knn_regressor_test.exs b/test/scholar/neighbors/knn_regressor_test.exs index 5707ac9a..ec3d0d56 100644 --- a/test/scholar/neighbors/knn_regressor_test.exs +++ b/test/scholar/neighbors/knn_regressor_test.exs @@ -93,7 +93,18 @@ defmodule Scholar.Neighbors.KNNRegressorTest do test "predict with 2D labels" do y = - Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]]) + Nx.tensor([ + [1, 4], + [0, 3], + [2, 5], + [0, 3], + [0, 3], + [1, 4], + [2, 5], + [0, 3], + [1, 4], + [2, 5] + ]) model = KNNRegressor.fit(x_train(), y, num_neighbors: 3) y_pred = KNNRegressor.predict(model, x()) @@ -111,7 +122,18 @@ defmodule Scholar.Neighbors.KNNRegressorTest do test "predict with 2D labels, cosine metric and weights set to :distance" do y = - Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]]) + Nx.tensor([ + [1, 4], + [0, 3], + [2, 5], + [0, 3], + [0, 3], + [1, 4], + [2, 5], + [0, 3], + [1, 4], + [2, 5] + ]) model = KNNRegressor.fit(x_train(), y, num_neighbors: 3, metric: :cosine, weights: :distance) diff --git a/test/scholar/neighbors/rnn_regressor_test.exs b/test/scholar/neighbors/rnn_regressor_test.exs index 38be8798..3e69c823 100644 --- a/test/scholar/neighbors/rnn_regressor_test.exs +++ b/test/scholar/neighbors/rnn_regressor_test.exs @@ -54,7 +54,18 @@ defmodule Scholar.Neighbors.RadiusNNRegressorTest do test "predict with weights set to :distance and with specific metric and 2d labels" do y = - Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]]) + Nx.tensor([ + [1, 4], + [0, 3], + [2, 5], + [0, 3], + [0, 3], + [1, 4], + [2, 5], + [0, 3], + [1, 4], + [2, 5] + ]) model = RadiusNNRegressor.fit(x(), y,