Open g-simmons opened 5 years ago
For some reason sklearn's SVC will not return the coefficients. Running the below code gives the following attribute error. I think this may be an issue with the versions of scipy and sklearn, but I am not sure.
def f_importances(coef, names): imp = coef imp,names = zip(*sorted(zip(imp,names))) plt.barh(range(len(names)), imp, align='center') plt.yticks(range(len(names)), names) plt.show() f_importances(svc.coef_, X.columns[0:100])
Fixed the above issue, now just need to identify foods that are rich in the important dimensions
For some reason sklearn's SVC will not return the coefficients. Running the below code gives the following attribute error. I think this may be an issue with the versions of scipy and sklearn, but I am not sure.