[scikit-learn] Is there regression algo with 3-d input?

lampahome pahome.chen at mirlab.org
Wed Dec 5 22:13:03 EST 2018


I want to regress time series prediction per week, so the unit of train
data X is the day ex: Mon, Tue, Wed...etc.

Ex: train data X is like below
X:
[ [1,2,3,4,3,2,1]
 ,[2,2,3,4,3,2,2]  ]
Each data of each row is about the day of one week. So each row has 7 data.

Now if I have another feature W in each day like weather, or traffic or
else.

I thought expand the X to 3d is reasonable because the W should be
contained in each day in X.

So what I thought X is:
[ [ [1, W-Mon], [2, W-Tue]  , [3, W-Wed]  , [4, W-Thu]  , [3, W-Fri]  , [2,
W-Sat]  , [1, W-Sun]  ]
, [ [2, W-Mon], [2, W-Tue]  , [3, W-Wed]  , [4, W-Thu]  , [3, W-Fri]  , [2,
W-Sat]  , [2, W-Sun]  ]   ]
It become a 3d input and contain every feature of each day.

Does scikit have regression algo can accept the 3d input X ?
I almost found algo can only accept 2d input X ex: *X* : array-like or
sparse matrix, shape = [n_samples, n_features]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20181206/b9e81e09/attachment-0001.html>


More information about the scikit-learn mailing list