Professional Documents
Culture Documents
Aim: To Implement Support Vector Machines: Experiment 7
Aim: To Implement Support Vector Machines: Experiment 7
: 201803100920017
Experiment 7
import numpy as np
import pandas as pd
# plotting scatters
plt.show()
# plotting scatter
for m, b, d in [(1, 0.65, 0.33), (0.5, 1.6, 0.55), (-0.2, 2.9, 0.2)]:
yfit = m * xfit + b
plt.xlim(-1, 3.5);
plt.show()
x = pd.read_csv("cancer.csv")
a = np.array(x)
#x = np.column_stack((x.malignant,x.benign))
print (x),(y)
clf = SVC(kernel='linear')
Output: