-
Notifications
You must be signed in to change notification settings - Fork 0
/
svm_clubbed.py
133 lines (119 loc) · 6.13 KB
/
svm_clubbed.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import numpy as np
import matplotlib.pyplot as plt
#from matplotlib import style
#style.use("ggplot")
from sklearn import svm
X = np.array([
###..........odissi.........
[ 2.91545064, 6.06099271, 9.50698652, 9.87855644,
19.571627 , 12.90920883, 21.00196434],
[ 2.85621904, 5.8586471 , 9.53641152, 9.99738447,
19.76771947, 12.96670976, 20.66628557],
[ 2.93933495, 6.20764819, 10.94185744, 10.56636948,
21.40600888, 13.67062863, -21.5641724 ],
[ 2.88532854, 6.20393967, 10.18825952, 10.57046369,
20.97268858, 13.68238499, 21.44996442],
[ 2.88597064, 5.98984617, 9.56034986, 10.03273862,
19.82929495, 13.02791125, -21.95649344],
[ 2.86372591, 5.87798581, 9.86410184, 10.27113686,
20.34230314, 13.21056351, -21.23397839],
[ 2.93625433, 6.19729834, 10.45629338, 11.14834146,
21.95766886, 14.47501465, 22.6996732 ],
[ 2.8773595 , 6.20523074, 11.47598737, 10.92133209,
-22.13923594, 14.03825877, 22.65577103],
[ 2.93212509, 6.14961483, 9.58396498, 10.1181064 ,
19.96934183, 13.19291836, -21.48737971],
[ 2.90108779, 5.98242687, 9.66463175, 10.13774417,
20.03894656, 13.14262502, -22.12779681],
[ 2.96804098, 6.32780024, 10.78121761, 10.8767009 ,
21.92749568, 14.06462165, -21.80257761],
[ 2.88534604, 6.23802283, 10.55434894, 10.48485546,
21.01370348, 13.61351723, 21.69446868],
[ 2.92589358, 6.10510991, 9.5106069 , 9.91116888,
19.62206175, 12.96375841, 21.94185962],
[ 2.85817082, 5.84478748, 9.75112068, 10.07392979,
19.98646459, 13.00060831, -22.16447945],
[ 2.93730174, 6.17792275, 10.04423978, 10.28859618,
20.45942982, 13.43782062, -21.30309788],
[ 2.8915453 , 6.33722869, 9.67407359, 10.02594485,
19.88046098, 13.19663761, 20.71964128],
#............##......bharathnatyam....##
[ 2.99199017, 6.59629992, 11.51011006, 10.55518074,
-21.58824598, 13.85334681, 22.94487487],
[ 2.99111346, 6.53095668, 12.04242492, 10.75174264,
22.15298964, 14.01748284, 23.00956732],
[ 3.02405433, 6.64159053, 12.23462941, 10.6402593 ,
22.08278499, 13.96108024, 22.89562756],
[ 2.96946477, 6.47668699, 11.09649469, 10.35512792,
21.1005551 , 13.59473085, -21.61274666],
[ 2.95714734, 6.43538053, 11.79306204, 10.54323144,
-21.71471331, 13.76092231, -22.61986438],
[ 2.95667964, 6.37086313, 11.64327086, 10.71689451,
21.90113669, 13.90274638, 22.75791103],
[ 2.96461932, 6.40167335, 11.6087183 , 10.51208892,
-21.59381806, 13.71318237, 22.08699524],
[ 2.92606414, 6.28731473, 11.11858122, 10.26005622,
20.975404 , 13.40606283, -21.42290736],
[ 2.80192187, 5.88411752, 8.81179349, 9.42801355,
18.61705223, 12.39329107, -18.83009596],
[ 2.82369019, 5.88979478, 9.09382421, 9.73471779,
19.22903756, 12.70101228, -19.40448482],
[ 2.81094093, 5.87150265, 8.83731854, 9.41053662,
18.58175015, 12.37171493, -18.88868944],
[ 2.7922175 , 5.79720863, 8.86829038, 9.47650766,
18.69551541, 12.39252092, -19.00593788],
[ 2.72184886, 5.74720828, 8.6207395 , 9.46050119,
18.60476091, 12.47960802, 18.71149887],
[ 2.73822566, 5.76977597, 8.80446676, 9.68239267,
19.39730273, 13.29089538, 18.95211418],
[ 2.74738199, 5.80958557, 8.73652345, 9.20336762,
18.18545223, 12.12400142, 18.80563879],
[ 2.72729268, 5.73092566, 8.63968481, 9.27197527,
18.28700912, 12.22727042, 18.53893739],
[ 2.8330803 , 6.01471099, 9.65561636, 9.9905037 ,
20.06157264, 13.05502538, -19.89703504],
[ 2.83144992, 5.96751283, 10.07123014, 10.42728707,
21.24626993, 13.55926983, -20.69289706],
[ 2.84376342, 6.02789053, 9.47906248, 9.9525735 ,
19.89496136, 13.02943886, -19.7626903 ],
[ 2.80056069, 5.89222554, 9.38834571, 9.76108908,
19.41738241, 12.73348633, -19.58791515],
[ 2.80392673, 5.91925168, 9.38798352, 10.14824943,
-19.92646908, -13.11235803, 20.58754629],
[ 2.80867358, 5.92057728, 9.36234151, 10.15426799,
-20.07692263, -13.1239596 , 20.05008174],
[ 2.78716058, 5.86024203, 9.13536017, 9.9434736 ,
-19.69775251, -12.91140892, 19.58383162],
[ 2.81425148, 5.94721588, 9.22865431, 10.10551594,
-19.89357936, -13.31759309, -19.95731252]
])
y = [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,
9,9,9,9,10,10,10,10]
clf = svm.SVC(kernel='linear', C = 1.0)
clf.fit(X,y)
print(clf.predict(
#####......odissi........###
#[ 2.91835366, 6.06844181, 9.56426641, 10.00630939,
# 19.79245005, 13.04072395, 20.99498827],
#[ 2.87669587, 5.89769072, 9.93670264, 10.31749607,
# 20.44461717, 13.27852736, -22.44423559], #####miss
#[ 2.97411141, 6.2938703 , 10.41362321, 10.72491082,
# 21.30074381, 13.91987607, -22.05718009],
#[ 2.91701839, 6.43066168, 10.06837818, 10.42495115,
# 20.68191537, 13.64499429, 21.33871301]
####......bharathnatyam......###
#[ 3.02657561, 6.71268009, 13.27203335, 10.80548005,
# 23.05151684, 14.1618834 , -22.94979263],
#[ 3.00752967, 6.59949383, 11.66585884, 10.89315346,
# -22.28967534, 14.20063257, -22.36280146],
#[ 2.86639875, 6.06054279, 9.01774438, 9.71611246,
# 19.15357058, 12.76828145, -19.36154319],
#[ 2.72729268, 5.73092566, 8.63968481, 9.27197527,
# 18.28700912, 12.22727042, 18.53893739],
#[ 2.85671118, 6.06603423, 9.53316637, 10.07823567,
# 20.12152796, 13.21691961, -19.97246863],
#[ 2.81425148, 5.94721588, 9.22865431, 10.10551594,
# -19.89357936, -13.31759309, -19.95731252], ########miss
#[ 2.83711781, 6.00572855, 9.20509029, 10.0562421 ,
# -19.83212547, -13.09026528, 19.84285361]
))