2

The procedure of writing my code:

  1. 3 parameters----> X1, X2, X3 defined
  2. 15 normal random numbers produced for each parameter
  3. Put 3 parameters in a formula(like : a= X1*X2-X3) and classified based on positive and negative results of the function( in the example a , if a<0 the y=-1 and if a>0 y=1) (-1,1 classes)
  4. Separated them it using SVM (rbf kernel)

Now I'm trying to pot the decision boundary of 3 features and 2 classes using plot_decision_regions form mlxtend.plotting but i get the error:

could not broadcast input array from shape (15) into shape (2509056).

Does anyone now how to fix it and have an example of the same situation?

plot_decision_regions(X_train, t, clf = svclassifier, hide_spines = False, colors = 'purple,limegreen', markers = ['x','o'],
                      filler_feature_values={0: X1[:,0], 1: X1[:,1], 2: X1[:,2]},
                      filler_feature_ranges={0: range1, 1: range1, 2:range1})
plt.title('Support Vector Machine')
Siavash
  • 21
  • 2
  • sorry but I find it hard to read. could you please make your text cleaner like this question for example? https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do?noredirect=1&lq=1 – Peyman Aug 20 '19 at 20:24

0 Answers0