2

I have created synthetic data like ,

X, Y = make_classification(n_features=2,n_samples=100, n_redundant=0, n_informative=1,
                                 n_clusters_per_class=1, class_sep=0.001,weights= [0.8,0.2] ,n_classes=2 ,random_state=42)

df = CreateDataFrame(X,Y,['X1','X2'])

having two class and the data in non-linear. Now I want to convert this 2-d data into 3-D data space to draw the decision boundary between the classes. any one can help me

E. Zeytinci
  • 2,642
  • 1
  • 20
  • 37
ZM Khattak
  • 21
  • 2

1 Answers1

0

For converting this 2-D data into 3-D one you have to add another feature. This feature addition can be done in any of the following ways

1) Add extra features while creating random data by setting n_features = 3. This will add extra dimension at the time of creation. But it will be the addition of a new feature.

2) Another way is to create the third feature by applying arithmetic(like avg of 2 features etc) operation .