Reputation: 31
As you know, the feature in Iris dataset is 1 dimensional array for example :
[5.1, 3.5, 1.4, 0.2] Iris-Setosa
[7.0, 3.2, 4.7, 1.4] Iris-versicolor
I'm wondering if feature in machine-learning can be 2d-arrays or not ?
For example:
Feature Result
[[1.0 2.3 3.1],[2.4 6.3 9.6]] A
[[1.5 3.3 5.1],[5.4 9.3 7.0]] B
Thanks you!
Upvotes: 2
Views: 974
Reputation: 9081
Yes, they can be. In this case, the input become Tensors.
0 dimensional input - scalars
1 dimensional input - vectors
2 dimensional input - matrices
3 (and above) dimensional input - tensors
An image for example is a (m x n x p) tensor with RGB components. So each input is a multi-dimensional array of numbers. It is a matrix of matrices - This is an excellent explanation
Word embeddings are also somewhat similar. Words make up a document. A corpus is a collection of documents. In this case each word is typically 1 300-number vector. So a document will be a matrix - so each input is a matrix - Start here
Upvotes: 1