Generates a 2D linearly separable dataset with 2n samples.
The third element of the sample is the label
"""
- xb = (rand(n) * 2 - 1) / 2 - 0.5
+ xb = (rand(n) * 2 - 1) / 2 + 0.5
yb = (rand(n) * 2 - 1) / 2
xr = (rand(n) * 2 - 1) / 2 + 1.5
yr = (rand(n) * 2 - 1) / 2 - 0.5
return coeffs, support_set
-print(perceptron_k(X, Y, k1))
-# print(perceptron_k(X, Y, kg))
+def f(x, y, w):
+ return
+
+
+coeffs, support_set = perceptron_k(X, Y, k1)
+# coeffs, support_set = perceptron_k(X, Y, kg)
+print(coeffs)
+print(support_set)
X = apply_plongement(X, plongement_phi)
w = perceptron_nobias(X, Y)