import
matplotlib.pyplot as plt
import
numpy as np
x
=
np.array([[
2
,
1.5
], [
-
2
,
-
1
], [
-
1
,
-
1
], [
2
,
1
],
[
1
,
5
], [
0.5
,
0.5
], [
-
2
,
0.5
]])
y
=
np.array([
0
,
0
,
1
,
1
,
1
,
1
,
0
])
x_train
=
np.array([[
2
,
1.5
], [
-
2
,
-
1
], [
-
1
,
-
1
], [
2
,
1
]])
y_train
=
np.array([
0
,
0
,
1
,
1
])
x_test
=
np.array([[
1
,
5
], [
0.5
,
0.5
], [
-
2
,
0.5
]])
y_test
=
np.array([
1
,
1
,
0
])
plt.scatter(x[:,
0
], x[:,
1
], c
=
y)
plt.xlabel(
'Feature 1 --->'
)
plt.ylabel(
'Feature 2 --->'
)
plt.title(
'Created Data'
)