[Python] Training classification with 3d Data and matrix as output

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    Assume that we have a 3 dimensional dataset with size m*n*p. That is, every cell in a matrix A, the cell A[j] has p features for 1<= i<=m and 1<=j<=n (this would be X). The target T is a matrix of size m*n (this would be y). Consider it a classification problem for this scenario, so every cell in the target matrix specifies that the particular features of A[j] corresponds to y[j]. Now, the problem is fairly easy. We can flatten the features from a 3d to 2d structure and then train. But what if we don't want to do that? What would be the best way to train a model (pick any common model like linear regression, SVM, Random Forest, etc.) on data of this particular shape without flattening it to the more common 2d to 1d prediction instead of 3d to 2d. Notice the key point: the features in cell [j] determine the value of y[j].

    Continue reading...

Compartilhe esta Página