8000 Bug: Fail to train SVM when got "warning: class label 0 specified in weight is not found" · Issue #9494 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Bug: Fail to train SVM when got "warning: class label 0 specified in weight is not found" #9494
Closed
@whitezhang

Description

@whitezhang

I found this problem just by accident(when I use K-fold to train huge data)
The problem that I have is similar with issue #5150. However, when I get this warning "class label 0 specified in weight is not found", I can not even get the model(The kernel is linear).

>>> clf.coef_
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/xxx/lib/python2.7/site-packages/sklearn/svm/base.py", line 488, in coef_
    coef = self._get_coef()
  File "/xxx/lib/python2.7/site-packages/sklearn/svm/base.py", line 707, in _get_coef
    if sp.issparse(coef[0]):
IndexError: list index out of range

I have checked the weight of this parameters, none of them is zero.

Here is my x, y and w, which are a bit ... Anyone who wants to have a try can just copy and paster

x=np.array([
[0.221013,0.226153,0.282691,0.31353,0.251852,0.308391,0.215873],
[0.180749,0.184952,0.23119,0.256411,0.20597,0.252208,0.176545],
[0.222546,0.0,0.1632,0.232437,0.0,0.158255,0.0],
[0.227261,0.166658,0.19696,0.176759,0.166658,0.161608,0.0],
[0.0,0.201937,0.156216,0.243849,0.224798,0.179077,0.156216],
[0.246202,0.230318,0.270028,0.246202,0.230318,0.0,0.0],
[0.0,0.0,0.277108,0.204819,0.0,0.0,0.277108],
[0.0,0.245757,0.230397,0.245757,0.281596,0.0,0.240637],
[0.275273,0.0,0.18742,0.158136,0.122994,0.128851,0.181563],
[0.183367,0.141454,0.199084,0.199084,0.0,0.146693,0.151932],
[0.170215,0.170215,0.160202,0.160202,0.180228,0.120152,0.140177],
[0.195171,0.157221,0.18975,0.206014,0.140957,0.0,0.173486],
[0.216668,0.0,0.132114,0.174391,0.0,0.137399,0.158537],
[0.199718,0.168651,0.208594,0.217471,0.155336,0.155336,0.150898],
[0.192048,0.150524,0.186857,0.176476,0.0,0.160905,0.145333],
[0.148973,0.153111,0.202769,0.235874,0.219321,0.144835,0.211045],
[0.235466,0.267575,0.219411,0.246169,0.278278,0.235466,0.0],
[0.0,0.0,0.245299,0.0,0.0,0.0,0.0],
[0.0,0.199034,0.160092,0.19038,0.194707,0.177399,0.155765],
[0.0,0.195129,0.151225,0.253668,0.190251,0.200007,0.151225],
[0.179558,0.212965,0.175383,0.26725,0.200437,0.238019,0.0],
[0.19131,0.166356,0.174674,0.220422,0.182992,0.170515,0.141403],
[0.0,0.0,0.221161,0.0,0.0,0.0,0.221161],
[0.167066,0.194263,0.182607,0.237001,0.217575,0.22923,0.14764],
[0.162041,0.234534,0.183363,0.17057,0.264383,0.179098,0.174834],
[0.16344,0.141648,0.152544,0.266952,0.147096,0.234264,0.152544],
[0.173247,0.140763,0.167833,0.281526,0.140763,0.227386,0.151591],
[0.172934,0.15062,0.122727,0.256611,0.184091,0.228719,0.156198],
[0.205508,0.222633,0.222633,0.278292,0.196945,0.231196,0.158412],
[0.173024,0.0,0.11123,0.10505,0.0,0.098871,0.0],
[0.201942,0.196764,0.196764,0.253723,0.176052,0.212298,0.0],
[0.180137,0.165126,0.185141,0.190145,0.180137,0.155118,0.140107],
[0.221433,0.0,0.178109,0.163668,0.173295,0.149227,0.0],
[0.0,0.238448,0.238448,0.354899,0.316082,0.243993,0.0],
[0.0,0.0,0.200569,0.386811,0.114611,0.229221,0.200569],
[0.0,0.199234,0.207535,0.207535,0.0,0.0,0.207535],
[0.302458,0.0,0.219282,0.294897,0.0,0.219282,0.219282],
[0.0,0.178394,0.143866,0.207167,0.178394,0.166885,0.149621],
[0.0,0.185012,0.136038,0.233986,0.152363,0.190454,0.14148],
[0.150329,0.0,0.162857,0.0,0.0,0.0939558,0.16912],
[0.0,0.18193,0.138016,0.16311,0.188203,0.156836,0.144289],
[0.0,0.0,0.224781,0.265126,0.0,0.224781,0.224781],
[0.320702,0.0,0.152465,0.168237,0.0,0.14195,0.152465],
[0.296016,0.158972,0.131563,0.169935,0.0,0.15349,0.126081],
[0.34793,0.234651,0.186102,0.323656,0.218468,0.194194,0.186102],
[0.0936984,0.209443,0.137792,0.23149,0.19842,0.19842,0.137792],
[0.0,0.145074,0.181343,0.157164,0.163208,0.0,0.181343],
[0.0,0.16445,0.173105,0.216381,0.207726,0.212054,0.177433],
[0.381308,0.210936,0.227162,0.219049,0.235275,0.0,0.235275],
[0.147876,0.185901,0.160551,0.236601,0.198576,0.207026,0.160551],
[0.169889,0.18232,0.157458,0.269336,0.236187,0.198895,0.157458],
[0.0,0.167127,0.13788,0.259047,0.146236,0.2298,0.0],
[0.204202,0.141371,0.136135,0.235618,0.198967,0.162315,0.141371],
[0.0,0.154276,0.134992,0.221772,0.173561,0.183203,0.110886],
[0.0,0.189585,0.13034,0.242906,0.13034,0.189585,0.118491],
[0.0,0.103397,0.10948,0.225042,0.133808,0.158137,0.10948],
[0.0,0.116798,0.137409,0.212984,0.212984,0.178632,0.137409],
[0.0,0.234808,0.245481,0.245481,0.0,0.0,0.240144],
[0.0,0.0,0.213891,0.23249,0.334786,0.0,0.223191],
[0.378203,0.0,0.200225,0.222473,0.229888,0.0,0.19281],
[0.0,0.172642,0.142429,0.267595,0.151061,0.237382,0.0],
[0.239908,0.148029,0.127611,0.193968,0.280744,0.178655,0.122506],
[0.0,0.228352,0.126862,0.215666,0.0,0.158578,0.133205],
[0.210478,0.167426,0.133941,0.229613,0.205695,0.167426,0.133941],
[0.0,0.187774,0.132546,0.226433,0.209865,0.165683,0.138069],
[0.171349,0.205619,0.13708,0.198765,0.178203,0.191911,0.143934],
[0.0,0.171582,0.131209,0.196814,0.181675,0.196814,0.126163],
[0.343867,0.157606,0.121786,0.171934,0.150442,0.0,0.114622],
[0.111733,0.144596,0.170886,0.203749,0.190604,0.157741,0.164314],
[0.169785,0.217167,0.161888,0.248755,0.197425,0.193476,0.161888],
[0.0,0.234905,0.223719,0.279648,0.0,0.223719,0.0],
[0.0,0.156358,0.108771,0.224339,0.176752,0.197147,0.101972],
[0.0,0.228355,0.11125,0.204934,0.199079,0.158092,0.11125],
[0.285902,0.178689,0.136995,0.202514,0.172732,0.190601,0.131038],
[0.328013,0.0,0.123005,0.146434,0.0,0.0,0.117148],
[0.0,0.260043,0.119003,0.246821,0.202745,0.149855,0.0],
[0.161919,0.198929,0.120283,0.245192,0.254444,0.18505,0.120283],
[0.220375,0.291673,0.129633,0.0907428,0.220375,0.0,0.103706],
[0.0,0.228322,0.122316,0.220168,0.0,0.187551,0.13047],
[0.119829,0.220738,0.119829,0.208124,0.214431,0.126136,0.0],
[0.0,0.141744,0.129932,0.23624,0.20671,0.188992,0.129932],
[0.0,0.337112,0.286545,0.0,0.0,0.337112,0.286545],
[0.0,0.217903,0.165606,0.148174,0.217903,0.20047,0.165606],
[0.161919,0.198929,0.120283,0.245192,0.254444,0.18505,0.120283],
[0.0,0.225626,0.10992,0.202485,0.196699,0.156203,0.10992],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.198456,0.146479,0.203181,0.16538,0.203181,0.141754],
[0.0,0.0,0.218498,0.0,0.0,0.0,0.238361],
[0.217274,0.182708,0.148141,0.25184,0.22715,0.207398,0.143203],
[0.0,0.213782,0.188631,0.289234,0.207494,0.251508,0.0],
[0.258565,0.26503,0.213317,0.0,0.232709,0.0,0.206852],
[0.0,0.165636,0.143842,0.244095,0.183071,0.22666,0.143842],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.144539,0.180674,0.156584,0.162606,0.0,0.180674],
[0.11211,0.156955,0.156955,0.241037,0.16256,0.196193,0.140138],
[0.0,0.271929,0.24973,0.266379,0.24973,0.271929,0.244181],
[0.0,0.271929,0.24973,0.266379,0.24973,0.271929,0.244181],
[0.0,0.143991,0.135763,0.222158,0.160448,0.21393,0.135763],
[0.0,0.0,0.168314,0.245647,0.150118,0.191059,0.168314],
[0.0,0.228352,0.126862,0.215666,0.0,0.158578,0.133205],
[0.206432,0.309649,0.206432,0.309649,0.248933,0.358221,0.0],
[0.0,0.242947,0.224726,0.0,0.206505,0.291536,0.218652],
[0.298136,0.0,0.109074,0.181791,0.189062,0.109074,0.109074],
[0.339879,0.198263,0.106212,0.134535,0.0,0.106212,0.0991313],
[0.0,0.0,0.189076,0.275736,0.0,0.228467,0.0],
[0.0,0.146404,0.183005,0.158604,0.164705,0.0,0.183005],
[0.0,0.221274,0.163907,0.254056,0.155712,0.0,0.163907],
[0.0,0.0,0.206144,0.323941,0.0,0.228231,0.206144],
[0.0,0.271531,0.225422,0.240791,0.276654,0.0,0.220299],
[0.0,0.0,0.193523,0.314475,0.0,0.225777,0.18546],
[0.0,0.0831926,0.181511,0.294956,0.0,0.211763,0.173948],
[0.0,0.0,0.239422,0.257379,0.0,0.0,0.0],
[0.0,0.0,0.250704,0.0,0.0,0.0,0.0],
[0.0,0.2685,0.222906,0.238104,0.278632,0.0,0.21784],
[0.381057,0.0,0.218905,0.0,0.0,0.0,0.218905],
[0.289345,0.0,0.218964,0.344086,0.281525,0.0,0.218964],
[0.393248,0.17656,0.224713,0.200637,0.208662,0.0,0.216688],
[0.251832,0.221121,0.202694,0.233406,0.0,0.214979,0.196552],
[0.0,0.185759,0.137108,0.278638,0.159222,0.212296,0.137108],
[0.0,0.0,0.234456,0.220246,0.0,0.0,0.24156],
[0.0,0.190666,0.122222,0.176,0.180889,0.176,0.127111],
[0.34793,0.234651,0.186102,0.323656,0.218468,0.194194,0.186102],
[0.157984,0.193092,0.157984,0.250142,0.232588,0.232588,0.162373],
[0.204719,0.17913,0.158658,0.0,0.189365,0.209837,0.158658],
[0.0,0.291904,0.181182,0.0,0.221444,0.0,0.0],
[0.339919,0.0,0.134968,0.139967,0.0,0.129969,0.134968],
[0.209506,0.1471,0.1471,0.200591,0.245167,0.160473,0.156015],
[0.148083,0.226238,0.172763,0.259145,0.185104,0.201557,0.172763],
[0.147924,0.0,0.112064,0.0,0.0,0.0,0.0],
[0.0,0.0,0.204281,0.0,0.0,0.0,0.1919],
[0.0,0.161613,0.123903,0.210097,0.177774,0.188548,0.123903],
[0.0,0.185662,0.161859,0.228507,0.157098,0.204704,0.152338],
[0.0,0.217695,0.143586,0.222327,0.166745,0.194536,0.15285],
[0.0,0.163026,0.172083,0.203783,0.203783,0.190197,0.172083],
[0.0,0.210283,0.156594,0.25055,0.201335,0.165542,0.147645],
[0.129986,0.167724,0.134179,0.2432,0.150952,0.222234,0.138372],
[0.0,0.0,0.14765,0.287098,0.0,0.172258,0.0],
[0.0,0.0,0.136579,0.265571,0.0,0.159343,0.0],
[0.0,0.195016,0.125367,0.213589,0.181086,0.190373,0.0],
[0.145802,0.179128,0.133304,0.208288,0.212454,0.149967,0.133304],
[0.0,0.240255,0.144153,0.244623,0.187836,0.218414,0.148521],
[0.199273,0.132848,0.16606,0.143919,0.149454,0.0,0.16606],
[0.143605,0.243023,0.154651,0.298256,0.176744,0.176744,0.154651],
[0.0,0.154694,0.165743,0.193367,0.215466,0.187842,0.165743],
[0.0,0.15015,0.160875,0.187687,0.209137,0.182325,0.160875],
[0.140221,0.210332,0.140221,0.302353,0.188423,0.210332,0.166513],
[0.0,0.1908,0.1802,0.0,0.0,0.212,0.1802],
[0.12188,0.12188,0.107541,0.301116,0.150558,0.172066,0.107541],
[0.146065,0.261146,0.132786,0.22131,0.177048,0.22131,0.132786],
[0.162882,0.0,0.154077,0.206904,0.215708,0.180491,0.154077],
[0.0,0.213782,0.188631,0.289234,0.207494,0.251508,0.0],
[0.185508,0.231884,0.102029,0.217971,0.227247,0.227247,0.0973914],
[0.118983,0.191407,0.124156,0.206926,0.124156,0.155195,0.124156],
[0.0,0.146404,0.183005,0.158604,0.164705,0.0,0.183005],
[0.0,0.169408,0.183526,0.216466,0.141174,0.183526,0.183526],
[0.405793,0.146925,0.104946,0.146925,0.0,0.104946,0.104946],
[0.0,0.156948,0.143495,0.260084,0.228695,0.215242,0.147979],
[0.229956,0.0,0.190308,0.0,0.0,0.0,0.0],
[0.0,0.2733,0.174609,0.280892,0.197384,0.250525,0.0],
[0.0,0.0,0.134749,0.18528,0.0,0.151593,0.151593],
[0.0,0.0,0.158186,0.263643,0.0,0.165718,0.165718],
[0.0,0.168139,0.132109,0.210173,0.228188,0.216178,0.138114],
[0.0,0.171125,0.143524,0.220806,0.154564,0.220806,0.138004],
[0.0,0.190603,0.149391,0.1803,0.200906,0.200906,0.14424],
[0.0,0.0,0.167532,0.293182,0.0,0.209415,0.0],
[0.0,0.152473,0.132799,0.236087,0.191821,0.201658,0.137717],
[0.0,0.177477,0.153276,0.217813,0.157309,0.189578,0.145209],
[0.0,0.226376,0.169782,0.0,0.220716,0.254673,0.169782],
[0.0,0.273845,0.174957,0.281452,0.197777,0.251025,0.0],
[0.152436,0.190545,0.152436,0.247709,0.200073,0.200073,0.1572],
[0.0,0.2733,0.174609,0.280892,0.197384,0.250525,0.0],
[0.0,0.247039,0.247039,0.303652,0.247039,0.216159,0.236746],
[0.0,0.274897,0.175629,0.282533,0.198537,0.251989,0.0],
[0.0,0.275404,0.175952,0.283054,0.198903,0.252453,0.0],
[0.42133,0.219092,0.227518,0.286504,0.210665,0.0,0.227518],
[0.0,0.0,0.193648,0.0,0.0,0.0,0.193648],
[0.240859,0.0,0.110107,0.144515,0.130752,0.137634,0.137634],
[0.0,0.144725,0.180907,0.156786,0.162816,0.0,0.180907],
[0.0,0.21165,0.154866,0.237461,0.160028,0.201325,0.149703],
[0.0,0.27773,0.177438,0.285444,0.200582,0.254585,0.0],
[0.0,0.275404,0.175952,0.283054,0.198903,0.252453,0.0],
[0.0,0.292871,0.208093,0.0,0.331407,0.0,0.208093],
[0.0,0.247848,0.149741,0.247848,0.175559,0.170395,0.149741],
[0.265937,0.0,0.214047,0.278909,0.0,0.227019,0.0],
[0.378203,0.0,0.200225,0.222473,0.229888,0.0,0.19281],
[0.0,0.205028,0.160457,0.2496,0.213943,0.178286,0.156],
[0.0,0.276841,0.176871,0.284531,0.199941,0.253771,0.0],
[0.0,0.13568,0.155062,0.271359,0.0,0.193828,0.145371],
[0.0,0.13568,0.155062,0.271359,0.0,0.193828,0.145371],
[0.0,0.203989,0.150308,0.220093,0.128835,0.182516,0.150308],
[0.0,0.190297,0.154295,0.231443,0.154295,0.180011,0.154295],
[0.0,0.193024,0.168278,0.217771,0.163328,0.212822,0.163328],
[0.220006,0.148828,0.135886,0.284714,0.200594,0.0,0.122945],
[0.16351,0.0,0.15697,0.176591,0.0,0.130808,0.15043],
[0.268192,0.0,0.158726,0.169673,0.0,0.164199,0.158726],
[0.142648,0.222363,0.155235,0.264319,0.239146,0.184604,0.155235],
[0.179425,0.21623,0.14262,0.253035,0.207028,0.174824,0.14262],
[0.0,0.204028,0.194075,0.248815,0.223933,0.233886,0.199052],
[0.0,0.144021,0.13922,0.225633,0.182427,0.168025,0.13922],
[0.0,0.166743,0.132413,0.225593,0.156934,0.18636,0.142222],
[0.0,0.0,0.144662,0.0,0.0,0.0,0.130196],
[0.0,0.118588,0.162278,0.118588,0.0,0.0,0.162278],
[0.144284,0.208963,0.179111,0.258716,0.24379,0.203988,0.179111],
[0.0,0.205886,0.131978,0.248119,0.17949,0.190048,0.131978],
[0.0,0.207838,0.156939,0.26722,0.203596,0.246012,0.156939],
[0.257155,0.182347,0.135591,0.201049,0.163644,0.16832,0.135591],
[0.237959,0.181714,0.160082,0.19902,0.164408,0.151429,0.160082],
[0.393248,0.17656,0.224713,0.200637,0.208662,0.0,0.216688],
[0.0,0.0,0.16486,0.0,0.0,0.210655,0.174019],
[0.0,0.189666,0.164377,0.206525,0.185451,0.206525,0.164377],
[0.0,0.263097,0.175398,0.0,0.350796,0.0,0.0],
[0.293203,0.293203,0.200612,0.0,0.293203,0.0,0.208328],
[0.238162,0.181869,0.160218,0.19486,0.164548,0.151558,0.160218],
[0.42133,0.219092,0.227518,0.286504,0.210665,0.0,0.227518],
[0.0,0.171454,0.161929,0.247656,0.161929,0.195267,0.161929],
[0.160006,0.244454,0.133339,0.213342,0.191119,0.186674,0.133339],
[0.305846,0.0,0.133191,0.157856,0.14799,0.128258,0.128258],
[0.0,0.210547,0.158984,0.270703,0.20625,0.249219,0.158984],
[0.235009,0.235009,0.26501,0.220008,0.215008,0.210008,0.25501],
[0.254397,0.188442,0.13191,0.230842,0.169598,0.150754,0.13191],
[0.180893,0.214215,0.161852,0.299901,0.199934,0.242777,0.161852],
[0.194027,0.161689,0.129351,0.198647,0.166309,0.161689,0.133971],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.267481,0.226953,0.25127,0.316113,0.235059,0.226953],
[0.199126,0.15069,0.145308,0.258326,0.188363,0.177599,0.139927],
[0.181897,0.172324,0.14839,0.28242,0.210618,0.172324,0.153177],
[0.0,0.0,0.182455,0.228069,0.223922,0.215628,0.178308],
[0.220375,0.291673,0.129633,0.0907428,0.220375,0.0,0.103706],
[0.15816,0.180126,0.162553,0.232846,0.18452,0.22406,0.14498],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.162962,0.101149,0.219156,0.191059,0.157343,0.0],
[0.0,0.171916,0.167723,0.243198,0.226426,0.209653,0.171916],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.193278,0.0,0.128852,0.23788,0.208145,0.173454,0.128852],
[0.0,0.135124,0.123374,0.193873,0.176248,0.135124,0.111624],
[0.181972,0.177639,0.160308,0.216633,0.181972,0.19497,0.160308],
[0.330471,0.18884,0.101164,0.168607,0.18884,0.0876759,0.0944202],
[0.330471,0.18884,0.101164,0.168607,0.18884,0.0876759,0.0944202],
[0.144262,0.240437,0.158689,0.240437,0.206776,0.163497,0.163497],
[0.0,0.144539,0.180674,0.156584,0.162606,0.0,0.180674],
[0.26305,0.237998,0.144051,0.0,0.212945,0.0,0.144051],
[0.0,0.0,0.160128,0.231296,0.160128,0.0,0.124544],
[0.158716,0.225274,0.138236,0.250873,0.209914,0.199675,0.148476],
[0.0,0.214538,0.107269,0.28605,0.200235,0.193084,0.11442],
[0.137417,0.199879,0.131171,0.287326,0.18114,0.224864,0.118678],
[0.152331,0.147254,0.121865,0.24373,0.167565,0.192953,0.132021],
[0.180795,0.218017,0.12762,0.260557,0.19143,0.180795,0.132937],
[0.0,0.179537,0.129043,0.235643,0.20198,0.168316,0.134653],
[0.0,0.246432,0.150597,0.273813,0.209923,0.260122,0.159724],
[0.139335,0.22758,0.139335,0.264736,0.199713,0.232224,0.148624],
[0.32043,0.0,0.154874,0.192258,0.0,0.0,0.160215],
[0.0,0.0,0.170846,0.19932,0.0,0.14949,0.170846],
[0.0,0.120202,0.13165,0.246129,0.16027,0.148822,0.13165],
[0.0,0.0,0.180421,0.189917,0.180421,0.208909,0.132942],
[0.0,0.229128,0.141002,0.211503,0.198284,0.233535,0.145408],
[0.140548,0.0,0.0936987,0.0,0.0,0.0,0.0995549],
[0.237775,0.0,0.123841,0.0,0.0,0.0,0.123841],
[0.0,0.178394,0.143866,0.207167,0.178394,0.166885,0.149621],
[0.0,0.185012,0.136038,0.233986,0.152363,0.190454,0.14148],
[0.150329,0.0,0.162857,0.0,0.0,0.0939558,0.16912],
[0.0,0.18193,0.138016,0.16311,0.188203,0.156836,0.144289],
[0.0,0.0,0.224781,0.265126,0.0,0.224781,0.224781],
[0.320702,0.0,0.152465,0.168237,0.0,0.14195,0.152465],
[0.296016,0.158972,0.131563,0.169935,0.0,0.15349,0.126081],
[0.34793,0.234651,0.186102,0.323656,0.218468,0.194194,0.186102],
[0.0936984,0.209443,0.137792,0.23149,0.19842,0.19842,0.137792],
[0.0,0.145074,0.181343,0.157164,0.163208,0.0,0.181343],
[0.0,0.16445,0.173105,0.216381,0.207726,0.212054,0.177433],
[0.381308,0.210936,0.227162,0.219049,0.235275,0.0,0.235275],
[0.147876,0.185901,0.160551,0.236601,0.198576,0.207026,0.160551],
[0.169889,0.18232,0.157458,0.269336,0.236187,0.198895,0.157458],
[0.0,0.167127,0.13788,0.259047,0.146236,0.2298,0.0],
[0.204202,0.141371,0.136135,0.235618,0.198967,0.162315,0.141371],
[0.0,0.154276,0.134992,0.221772,0.173561,0.183203,0.110886],
[0.0,0.189585,0.13034,0.242906,0.13034,0.189585,0.118491],
[0.0,0.103397,0.10948,0.225042,0.133808,0.158137,0.10948],
[0.0,0.116798,0.137409,0.212984,0.212984,0.178632,0.137409],
[0.0,0.234808,0.245481,0.245481,0.0,0.0,0.240144],
[0.0,0.0,0.213891,0.23249,0.334786,0.0,0.223191],
[0.378203,0.0,0.200225,0.222473,0.229888,0.0,0.19281],
[0.0,0.172642,0.142429,0.267595,0.151061,0.237382,0.0],
[0.239908,0.148029,0.127611,0.193968,0.280744,0.178655,0.122506],
[0.0,0.228352,0.126862,0.215666,0.0,0.158578,0.133205],
[0.210478,0.167426,0.133941,0.229613,0.205695,0.167426,0.133941],
[0.0,0.187774,0.132546,0.226433,0.209865,0.165683,0.138069],
[0.171349,0.205619,0.13708,0.198765,0.178203,0.191911,0.143934],
[0.0,0.171582,0.131209,0.196814,0.181675,0.196814,0.126163],
[0.343867,0.157606,0.121786,0.171934,0.150442,0.0,0.114622],
[0.111733,0.144596,0.170886,0.203749,0.190604,0.157741,0.164314],
[0.169785,0.217167,0.161888,0.248755,0.197425,0.193476,0.161888],
[0.0,0.234905,0.223719,0.279648,0.0,0.223719,0.0],
[0.0,0.156358,0.108771,0.224339,0.176752,0.197147,0.101972],
[0.0,0.228355,0.11125,0.204934,0.199079,0.158092,0.11125],
[0.285902,0.178689,0.136995,0.202514,0.172732,0.190601,0.131038],
[0.328013,0.0,0.123005,0.146434,0.0,0.0,0.117148],
[0.0,0.260043,0.119003,0.246821,0.202745,0.149855,0.0],
[0.161919,0.198929,0.120283,0.245192,0.254444,0.18505,0.120283],
[0.220375,0.291673,0.129633,0.0907428,0.220375,0.0,0.103706],
[0.0,0.228322,0.122316,0.220168,0.0,0.187551,0.13047],
[0.119829,0.220738,0.119829,0.208124,0.214431,0.126136,0.0],
[0.0,0.141744,0.129932,0.23624,0.20671,0.188992,0.129932],
[0.0,0.337112,0.286545,0.0,0.0,0.337112,0.286545],
[0.0,0.217903,0.165606,0.148174,0.217903,0.20047,0.165606],
[0.161919,0.198929,0.120283,0.245192,0.254444,0.18505,0.120283],
[0.0,0.225626,0.10992,0.202485,0.196699,0.156203,0.10992],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.198456,0.146479,0.203181,0.16538,0.203181,0.141754],
[0.0,0.0,0.218498,0.0,0.0,0.0,0.238361],
[0.217274,0.182708,0.148141,0.25184,0.22715,0.207398,0.143203],
[0.0,0.213782,0.188631,0.289234,0.207494,0.251508,0.0],
[0.258565,0.26503,0.213317,0.0,0.232709,0.0,0.206852],
[0.0,0.165636,0.143842,0.244095,0.183071,0.22666,0.143842],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.144539,0.180674,0.156584,0.162606,0.0,0.180674],
[0.11211,0.156955,0.156955,0.241037,0.16256,0.196193,0.140138],
[0.0,0.271929,0.24973,0.266379,0.24973,0.271929,0.244181],
[0.0,0.271929,0.24973,0.266379,0.24973,0.271929,0.244181],
[0.0,0.143991,0.135763,0.222158,0.160448,0.21393,0.135763],
[0.0,0.0,0.168314,0.245647,0.150118,0.191059,0.168314],
[0.0,0.228352,0.126862,0.215666,0.0,0.158578,0.133205],
[0.206432,0.309649,0.206432,0.309649,0.248933,0.358221,0.0],
[0.0,0.242947,0.224726,0.0,0.206505,0.291536,0.218652],
[0.298136,0.0,0.109074,0.181791,0.189062,0.109074,0.109074],
[0.339879,0.198263,0.106212,0.134535,0.0,0.106212,0.0991313],
[0.0,0.0,0.189076,0.275736,0.0,0.228467,0.0],
[0.0,0.146404,0.183005,0.158604,0.164705,0.0,0.183005],
[0.0,0.221274,0.163907,0.254056,0.155712,0.0,0.163907],
[0.0,0.0,0.206144,0.323941,0.0,0.228231,0.206144],
[0.0,0.271531,0.225422,0.240791,0.276654,0.0,0.220299],
[0.0,0.0,0.193523,0.314475,0.0,0.225777,0.18546],
[0.0,0.0831926,0.181511,0.294956,0.0,0.211763,0.173948],
[0.0,0.0,0.239422,0.257379,0.0,0.0,0.0],
[0.0,0.0,0.250704,0.0,0.0,0.0,0.0],
[0.0,0.2685,0.222906,0.238104,0.278632,0.0,0.21784],
[0.381057,0.0,0.218905,0.0,0.0,0.0,0.218905],
[0.289345,0.0,0.218964,0.344086,0.281525,0.0,0.218964],
[0.393248,0.17656,0.224713,0.200637,0.208662,0.0,0.216688],
[0.251832,0.221121,0.202694,0.233406,0.0,0.214979,0.196552],
[0.0,0.185759,0.137108,0.278638,0.159222,0.212296,0.137108],
[0.0,0.0,0.234456,0.220246,0.0,0.0,0.24156],
[0.0,0.190666,0.122222,0.176,0.180889,0.176,0.127111],
[0.34793,0.234651,0.186102,0.323656,0.218468,0.194194,0.186102],
[0.157984,0.193092,0.157984,0.250142,0.232588,0.232588,0.162373],
[0.204719,0.17913,0.158658,0.0,0.189365,0.209837,0.158658],
[0.0,0.291904,0.181182,0.0,0.221444,0.0,0.0],
[0.339919,0.0,0.134968,0.139967,0.0,0.129969,0.134968],
[0.209506,0.1471,0.1471,0.200591,0.245167,0.160473,0.156015],
[0.148083,0.226238,0.172763,0.259145,0.185104,0.201557,0.172763],
[0.147924,0.0,0.112064,0.0,0.0,0.0,0.0],
[0.0,0.0,0.204281,0.0,0.0,0.0,0.1919],
[0.0,0.161613,0.123903,0.210097,0.177774,0.188548,0.123903],
[0.0,0.185662,0.161859,0.228507,0.157098,0.204704,0.152338],
[0.0,0.217695,0.143586,0.222327,0.166745,0.194536,0.15285],
[0.0,0.163026,0.172083,0.203783,0.203783,0.190197,0.172083],
[0.0,0.210283,0.156594,0.25055,0.201335,0.165542,0.147645],
[0.129986,0.167724,0.134179,0.2432,0.150952,0.222234,0.138372],
[0.0,0.0,0.14765,0.287098,0.0,0.172258,0.0],
[0.0,0.0,0.136579,0.265571,0.0,0.159343,0.0],
[0.0,0.195016,0.125367,0.213589,0.181086,0.190373,0.0],
[0.145802,0.179128,0.133304,0.208288,0.212454,0.149967,0.133304],
[0.0,0.240255,0.144153,0.244623,0.187836,0.218414,0.148521],
[0.199273,0.132848,0.16606,0.143919,0.149454,0.0,0.16606],
[0.143605,0.243023,0.154651,0.298256,0.176744,0.176744,0.154651],
[0.0,0.154694,0.165743,0.193367,0.215466,0.187842,0.165743],
[0.0,0.15015,0.160875,0.187687,0.209137,0.182325,0.160875],
[0.140221,0.210332,0.140221,0.302353,0.188423,0.210332,0.166513],
[0.0,0.1908,0.1802,0.0,0.0,0.212,0.1802],
[0.12188,0.12188,0.107541,0.301116,0.150558,0.172066,0.107541],
[0.146065,0.261146,0.132786,0.22131,0.177048,0.22131,0.132786],
[0.162882,0.0,0.154077,0.206904,0.215708,0.180491,0.154077],
[0.0,0.213782,0.188631,0.289234,0.207494,0.251508,0.0],
[0.185508,0.231884,0.102029,0.217971,0.227247,0.227247,0.0973914],
[0.118983,0.191407,0.124156,0.206926,0.124156,0.155195,0.124156],
[0.0,0.146404,0.183005,0.158604,0.164705,0.0,0.183005],
[0.0,0.169408,0.183526,0.216466,0.141174,0.183526,0.183526],
[0.405793,0.146925,0.104946,0.146925,0.0,0.104946,0.104946],
[0.0,0.156948,0.143495,0.260084,0.228695,0.215242,0.147979],
[0.229956,0.0,0.190308,0.0,0.0,0.0,0.0],
[0.0,0.2733,0.174609,0.280892,0.197384,0.250525,0.0],
[0.0,0.0,0.134749,0.18528,0.0,0.151593,0.151593],
[0.0,0.0,0.158186,0.263643,0.0,0.165718,0.165718],
[0.0,0.168139,0.132109,0.210173,0.228188,0.216178,0.138114],
[0.0,0.171125,0.143524,0.220806,0.154564,0.220806,0.138004],
[0.0,0.190603,0.149391,0.1803,0.200906,0.200906,0.14424],
[0.0,0.0,0.167532,0.293182,0.0,0.209415,0.0],
[0.0,0.152473,0.132799,0.236087,0.191821,0.201658,0.137717],
[0.0,0.177477,0.153276,0.217813,0.157309,0.189578,0.145209],
[0.0,0.226376,0.169782,0.0,0.220716,0.254673,0.169782],
[0.0,0.273845,0.174957,0.281452,0.197777,0.251025,0.0],
[0.152436,0.190545,0.152436,0.247709,0.200073,0.200073,0.1572],
[0.0,0.2733,0.174609,0.280892,0.197384,0.250525,0.0],
[0.0,0.247039,0.247039,0.303652,0.247039,0.216159,0.236746],
[0.0,0.274897,0.175629,0.282533,0.198537,0.251989,0.0],
[0.0,0.275404,0.175952,0.283054,0.198903,0.252453,0.0],
[0.42133,0.219092,0.227518,0.286504,0.210665,0.0,0.227518],
[0.0,0.0,0.193648,0.0,0.0,0.0,0.193648],
[0.240859,0.0,0.110107,0.144515,0.130752,0.137634,0.137634],
[0.0,0.144725,0.180907,0.156786,0.162816,0.0,0.180907],
[0.0,0.21165,0.154866,0.237461,0.160028,0.201325,0.149703],
[0.0,0.27773,0.177438,0.285444,0.200582,0.254585,0.0],
[0.0,0.275404,0.175952,0.283054,0.198903,0.252453,0.0],
[0.0,0.292871,0.208093,0.0,0.331407,0.0,0.208093],
[0.0,0.247848,0.149741,0.247848,0.175559,0.170395,0.149741],
[0.265937,0.0,0.214047,0.278909,0.0,0.227019,0.0],
[0.378203,0.0,0.200225,0.222473,0.229888,0.0,0.19281],
[0.0,0.205028,0.160457,0.2496,0.213943,0.178286,0.156],
[0.0,0.276841,0.176871,0.284531,0.199941,0.253771,0.0],
[0.0,0.13568,0.155062,0.271359,0.0,0.193828,0.145371],
[0.0,0.13568,0.155062,0.271359,0.0,0.193828,0.145371],
[0.0,0.203989,0.150308,0.220093,0.128835,0.182516,0.150308],
[0.0,0.190297,0.154295,0.231443,0.154295,0.180011,0.154295],
[0.0,0.193024,0.168278,0.217771,0.163328,0.212822,0.163328],
[0.220006,0.148828,0.135886,0.284714,0.200594,0.0,0.122945],
[0.16351,0.0,0.15697,0.176591,0.0,0.130808,0.15043],
[0.268192,0.0,0.158726,0.169673,0.0,0.164199,0.158726],
[0.142648,0.222363,0.155235,0.264319,0.239146,0.184604,0.155235],
[0.179425,0.21623,0.14262,0.253035,0.207028,0.174824,0.14262],
[0.0,0.204028,0.194075,0.248815,0.223933,0.233886,0.199052],
[0.0,0.144021,0.13922,0.225633,0.182427,0.168025,0.13922],
[0.0,0.166743,0.132413,0.225593,0.156934,0.18636,0.142222],
[0.0,0.0,0.144662,0.0,0.0,0.0,0.130196],
[0.0,0.118588,0.162278,0.118588,0.0,0.0,0.162278],
[0.144284,0.208963,0.179111,0.258716,0.24379,0.203988,0.179111],
[0.0,0.205886,0.131978,0.248119,0.17949,0.190048,0.131978],
[0.0,0.207838,0.156939,0.26722,0.203596,0.246012,0.156939],
[0.257155,0.182347,0.135591,0.201049,0.163644,0.16832,0.135591],
[0.237959,0.181714,0.160082,0.19902,0.164408,0.151429,0.160082],
[0.393248,0.17656,0.224713,0.200637,0.208662,0.0,0.216688],
[0.0,0.0,0.16486,0.0,0.0,0.210655,0.174019],
[0.0,0.189666,0.164377,0.206525,0.185451,0.206525,0.164377],
[0.0,0.263097,0.175398,0.0,0.350796,0.0,0.0],
[0.293203,0.293203,0.200612,0.0,0.293203,0.0,0.208328],
[0.238162,0.181869,0.160218,0.19486,0.164548,0.151558,0.160218],
[0.42133,0.219092,0.227518,0.286504,0.210665,0.0,0.227518],
[0.0,0.171454,0.161929,0.247656,0.161929,0.195267,0.161929],
[0.160006,0.244454,0.133339,0.213342,0.191119,0.186674,0.133339],
[0.305846,0.0,0.133191,0.157856,0.14799,0.128258,0.128258],
[0.0,0.210547,0.158984,0.270703,0.20625,0.249219,0.158984],
[0.235009,0.235009,0.26501,0.220008,0.215008,0.210008,0.25501],
[0.254397,0.188442,0.13191,0.230842,0.169598,0.150754,0.13191],
[0.180893,0.214215,0.161852,0.299901,0.199934,0.242777,0.161852],
[0.194027,0.161689,0.129351,0.198647,0.166309,0.161689,0.133971],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.267481,0.226953,0.25127,0.316113,0.235059,0.226953],
[0.199126,0.15069,0.145308,0.258326,0.188363,0.177599,0.139927],
[0.181897,0.172324,0.14839,0.28242,0.210618,0.172324,0.153177],
[0.0,0.0,0.182455,0.228069,0.223922,0.215628,0.178308],
[0.220375,0.291673,0.129633,0.0907428,0.220375,0.0,0.103706],
[0.15816,0.180126,0.162553,0.232846,0.18452,0.22406,0.14498],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.0,0.162962,0.101149,0.219156,0.191059,0.157343,0.0],
[0.0,0.171916,0.167723,0.243198,0.226426,0.209653,0.171916],
[0.0,0.0,0.135569,0.242895,0.0,0.180759,0.124272],
[0.193278,0.0,0.128852,0.23788,0.208145,0.173454,0.128852],
[0.0,0.135124,0.123374,0.193873,0.176248,0.135124,0.111624],
[0.181972,0.177639,0.160308,0.216633,0.181972,0.19497,0.160308],
[0.330471,0.18884,0.101164,0.168607,0.18884,0.0876759,0.0944202],
[0.330471,0.18884,0.101164,0.168607,0.18884,0.0876759,0.0944202],
[0.144262,0.240437,0.158689,0.240437,0.206776,0.163497,0.163497],
[0.0,0.144539,0.180674,0.156584,0.162606,0.0,0.180674],
[0.26305,0.237998,0.144051,0.0,0.212945,0.0,0.144051],
[0.0,0.0,0.160128,0.231296,0.160128,0.0,0.124544],
[0.158716,0.225274,0.138236,0.250873,0.209914,0.199675,0.148476],
[0.0,0.214538,0.107269,0.28605,0.200235,0.193084,0.11442],
[0.137417,0.199879,0.131171,0.287326,0.18114,0.224864,0.118678],
[0.152331,0.147254,0.121865,0.24373,0.167565,0.192953,0.132021],
[0.180795,0.218017,0.12762,0.260557,0.19143,0.180795,0.132937],
[0.0,0.179537,0.129043,0.235643,0.20198,0.168316,0.134653],
[0.0,0.246432,0.150597,0.273813,0.209923,0.260122,0.159724],
[0.139335,0.22758,0.139335,0.264736,0.199713,0.232224,0.148624],
[0.32043,0.0,0.154874,0.192258,0.0,0.0,0.160215],
[0.0,0.0,0.170846,0.19932,0.0,0.14949,0.170846],
[0.0,0.120202,0.13165,0.246129,0.16027,0.148822,0.13165],
[0.0,0.0,0.180421,0.189917,0.180421,0.208909,0.132942],
[0.0,0.229128,0.141002,0.211503,0.198284,0.233535,0.145408],
[0.140548,0.0,0.0936987,0.0,0.0,0.0,0.0995549],
[0.237775,0.0,0.123841,0.0,0.0,0.0,0.123841],
])

y=np.array([
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
])

w=np.array([
1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.1521460989,1.15139993696,1.10845261533,1.15496656138,1.064706582,1.1107623162,1.1279919521,1.06734564278,1.12185760637,1.13261930411,1.15617501209,1.09803919963,1.10070622021,1.09336739431,1.13884314402,1.08437580128,1.14947574826,1.14747540767,1.1411486782,1.15440308452,1.1217593481,1.13745883807,1.0728047731,1.13963066148,1.07789083937,1.1363838757,1.08498903414,1.15725877735,1.09932644601,1.15634416219,1.11106922116,1.10579775411,1.09524522951,1.10861159064,1.1560901432,1.15936945601,1.08072724755,1.14251189501,1.14844808823,1.10166606618,1.10235772738,1.13865503188,1.10177067121,1.15624886997,1.15374740172,1.16208865295,1.10166606618,1.15895664621,1.07596569731,1.15442017725,1.12393877795,1.08226537572,1.14253245493,1.11286295023,1.15647199258,1.07596569731,1.07596569731,1.07596569731,1.13262978246,1.10589003416,1.16128033392,1.16128033392,1.15185490992,1.12092243002,1.1363838757,1.07846792426,1.17024701979,1.06794934538,1.15292121794,1.02910149862,1.13259272355,1.13172316942,1.05326355333,1.13979934072,1.05484009294,1.09637755742,1.04604778377,1.08707814907,1.14028234108,1.19998248304,1.04161467053,1.10805719419,1.11540675515,1.15248345165,1.09021625817,1.1576100345,1.06734564278,1.10094658557,1.10210647568,1.13621179306,1.12351996233,1.08416963496,1.10042217949,1.10253893324,1.12013159843,1.15503665765,1.14950428172,1.15552899166,1.15346496532,1.1523312233,1.10647384039,1.04300032974,1.05128054848,1.14682707873,1.10217561331,1.16095059604,1.0970567253,1.101397768,1.15554943336,1.15464327907,1.10616630732,1.14484178694,1.10113632249,1.1093905903,1.08144344954,1.14253245493,1.10061886774,1.10905803327,1.13259272355,1.14307773335,1.17410787153,1.16128049751,1.11120304151,1.1485623109,1.09268886712,1.07517402213,1.16541350527,1.15256522416,1.15894676479,1.03282240172,1.15622563879,1.14897355578,1.17427012544,1.14861601702,1.10004432237,1.1485623109,1.1520284586,1.14871957291,1.14876938117,1.11230646654,1.12194144006,1.08007483271,1.13262614401,1.15206336213,1.14899785463,1.14876938117,1.1624989422,1.15306210961,1.02942861127,1.0728047731,1.15509137965,1.14891066036,1.11609402684,1.11609402684,1.14732650129,1.14848983191,1.15172949884,1.07823329496,1.07690414133,1.08995223748,1.10397774708,1.09346541893,1.15924346489,1.14992201011,1.15145382574,1.12101528969,1.12473894764,1.10185626369,1.15578158667,1.16197527872,1.08503068028,1.0855558358,1.10805719419,1.11669619218,1.15510896509,1.15024339536,1.10819925898,1.08582343442,1.11230646654,1.14820639359,1.10321261961,1.07431551089,1.16250781853,1.07405581033,1.08362707258,1.09259048155,1.09157588186,1.07596569731,1.16988914451,1.08382518765,1.08835259607,1.13940796555,1.10235772738,1.09639380231,1.07596569731,1.07596569731,1.07596569731,1.14720422097,1.15864145955,1.07596569731,1.0727982395,1.14725856429,1.09155993378,1.09039714543,1.09039714543,1.10317183357,1.13262978246,1.11419231901,1.11338473524,1.10228814962,1.16190774259,1.10545828638,1.09931718406,1.09505776485,1.15616371095,1.16808781118,1.10956484375,1.13799985317,1.08592168802,1.14275550024,1.12774630724,1.16500163654,1.1167603252,1.13353488614,-0.152146098901,-0.15139993696,-0.108452615329,-0.154966561382,-0.064706581997,-0.110762316197,-0.127991952099,-0.0673456427776,-0.12185760637,-0.132619304105,-0.156175012093,-0.0980391996282,-0.100706220214,-0.093367394306,-0.138843144023,-0.0843758012793,-0.149475748259,-0.147475407675,-0.141148678204,-0.154403084517,-0.1217593481,-0.137458838066,-0.0728047731038,-0.13963066148,-0.0778908393684,-0.136383875704,-0.0849890341377,-0.157258777349,-0.0993264460111,-0.156344162193,-0.11106922116,-0.105797754106,-0.0952452295104,-0.108611590641,-0.156090143204,-0.159369456012,-0.0807272475509,-0.142511895014,-0.148448088234,-0.101666066184,-0.102357727378,-0.138655031881,-0.101770671214,-0.15624886997,-0.153747401723,-0.162088652953,-0.101666066184,-0.158956646205,-0.0759656973097,-0.154420177249,-0.123938777952,-0.082265375721,-0.142532454926,-0.112862950229,-0.156471992576,-0.0759656973097,-0.0759656973097,-0.0759656973097,-0.132629782461,-0.105890034159,-0.161280333919,-0.161280333919,-0.151854909922,-0.120922430016,-0.136383875704,-0.0784679242634,-0.170247019794,-0.0679493453829,-0.152921217943,-0.0291014986222,-0.132592723548,-0.131723169423,-0.0532635533324,-0.13979934072,-0.0548400929355,-0.0963775574221,-0.0460477837742,-0.0870781490695,-0.140282341077,-0.199982483038,-0.0416146705267,-0.108057194189,-0.115406755148,-0.15248345165,-0.090216258174,-0.157610034504,-0.0673456427776,-0.100946585573,-0.102106475676,-0.136211793057,-0.123519962326,-0.0841696349617,-0.100422179488,-0.102538933239,-0.120131598434,-0.155036657646,-0.149504281719,-0.155528991664,-0.153464965321,-0.152331223299,-0.106473840391,-0.043000329738,-0.0512805484796,-0.146827078731,-0.10217561331,-0.160950596037,-0.0970567252977,-0.101397768005,-0.155549433357,-0.154643279066,-0.106166307324,-0.144841786944,-0.101136322487,-0.109390590299,-0.0814434495354,-0.142532454926,-0.100618867736,-0.109058033267,-0.132592723548,-0.14307773335,-0.174107871534,-0.161280497506,-0.111203041507,-0.148562310904,-0.092688867121,-0.0751740221259,-0.165413505274,-0.152565224155,-0.158946764794,-0.0328224017192,-0.156225638786,-0.148973555777,-0.174270125435,-0.148616017019,-0.100044322373,-0.148562310904,-0.152028458597,-0.148719572913,-0.148769381166,-0.112306466543,-0.121941440059,-0.080074832706,-0.132626144007,-0.152063362131,-0.148997854628,-0.148769381166,-0.162498942196,-0.153062109613,-0.0294286112661,-0.0728047731038,-0.155091379647,-0.148910660362,-0.116094026843,-0.116094026843,-0.147326501292,-0.148489831915,-0.151729498844,-0.0782332949579,-0.076904141332,-0.0899522374769,-0.10397774708,-0.0934654189265,-0.159243464893,-0.149922010115,-0.151453825742,-0.121015289688,-0.124738947638,-0.101856263693,-0.155781586672,-0.161975278721,-0.0850306802834,-0.0855558358013,-0.108057194189,-0.116696192176,-0.155108965086,-0.150243395357,-0.108199258979,-0.0858234344185,-0.112306466543,-0.148206393593,-0.103212619613,-0.0743155108869,-0.162507818534,-0.0740558103337,-0.0836270725845,-0.0925904815545,-0.0915758818635,-0.0759656973097,-0.169889144506,-0.0838251876499,-0.0883525960684,-0.139407965549,-0.102357727378,-0.0963938023135,-0.0759656973097,-0.0759656973097,-0.0759656973097,-0.147204220969,-0.158641459551,-0.0759656973097,-0.0727982395018,-0.147258564289,-0.0915599337803,-0.0903971454298,-0.0903971454298,-0.103171833569,-0.132629782461,-0.114192319007,-0.113384735236,-0.102288149616,-0.16190774259,-0.105458286382,-0.09931718406,-0.0950577648507,-0.156163710947,-0.168087811183,-0.109564843747,-0.137999853171,-0.0859216880184,-0.142755500244,-0.12774630724,-0.165001636537,-0.116760325205,-0.133534886144
])

Here is my code

>>> clf = SVC(C=0.5,class_weight='balanced',kernel='linear')
>>> clf.fit(x, y, sample_weight=w)
warning: class label 0 specified in weight is not found
SVC(C=0.5, cache_size=200, class_weight='balanced', coef0=0.0,
  decision_function_shape=None, degree=3, gamma='auto', kernel='linear',
  max_iter=-1, probability=False, random_state=None, shrinking=True,
  tol=0.001, verbose=False)
>>> clf.coef_
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/xxx/lib/python2.7/site-packages/sklearn/svm/base.py", line 488, in coef_
    coef = self._get_coef()
  File "/xxx/lib/python2.7/site-packages/sklearn/svm/base.py", line 707, in _get_coef
    if sp.issparse(coef[0]):
IndexError: list index out of range

I think this might be bug for svm
Many thanks to anyone who can help

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEasyWell-defined and straightforward way to resolve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0