Cartesian features into 1D features for machine learning

Viewed 12

I have two 1:1 arrays of data, that can be plotted on a Cartesian x and y graph. These two arrays represent one sample to then predict later.

# data structure with two dimensions, x and y

sample[0] = [1, 2, 3]
sample[1] = [5, 5, 5]

How can I shape this feature input (x and y) with Python for a machine learning features table: (features.csv)

Not sure about this part:

feature1, feature2, feature3
'(1, 5)', '(2, 5)', '(3, 5)'

Can I do x * y simply for each?

For more info the target format (targets.csv):

class a
class b

I have a working example with 1D features. This is the 1D example: https://github.com/amstuta/random-forest

I'm trying to use a Cartesian 2D input of x and y, instead of 1D for each feature.

0 Answers
Related