From 96ece8b00b4e3e0c1a9d96a928b20b4a3af438bd Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:18:38 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- scikit-learn/svm/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scikit-learn/svm/README.md b/scikit-learn/svm/README.md index ecc92d6..a1941a7 100644 --- a/scikit-learn/svm/README.md +++ b/scikit-learn/svm/README.md @@ -66,20 +66,20 @@ a_y: np.ndarray = rng.normal(3.0, 1.0, size=(1000))[:, np.newaxis] data_train_0: np.ndarray = np.concatenate((a_x, a_y), axis=-1) class_train_0: np.ndarray = np.full((data_train_0.shape[0],), -1) -a_x: np.ndarray = rng.normal(1.5, 1.0, size=(1000))[:, np.newaxis] -a_y: np.ndarray = rng.normal(3.0, 1.0, size=(1000))[:, np.newaxis] +a_x = rng.normal(1.5, 1.0, size=(1000))[:, np.newaxis] +a_y = rng.normal(3.0, 1.0, size=(1000))[:, np.newaxis] data_test_0: np.ndarray = np.concatenate((a_x, a_y), axis=-1) class_test_0: np.ndarray = np.full((data_test_0.shape[0],), -1) del a_x del a_y -a_x: np.ndarray = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] -a_y: np.ndarray = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] +a_x = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] +a_y = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] data_train_1: np.ndarray = np.concatenate((a_x, a_y), axis=-1) class_train_1: np.ndarray = np.full((data_train_0.shape[0],), +1) -a_x: np.ndarray = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] -a_y: np.ndarray = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] +a_x = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] +a_y = rng.normal(0.0, 1.0, size=(1000))[:, np.newaxis] data_test_1: np.ndarray = np.concatenate((a_x, a_y), axis=-1) class_test_1: np.ndarray = np.full((data_test_0.shape[0],), +1) del a_x @@ -96,6 +96,8 @@ np.save("label_train.npy", label_train) np.save("label_test.npy", label_test) ``` +## Train and test + ```python ```