'List index out of range for a machine learning method
---> 30 cvtrain = train.subset([ a for a in cvtrains[i]])
31 cvtest = train.subset([ a for a in cvtests[i]])
32 cvX_train = scale_orig.fit_transform(cvtrain.features)
IndexError: list index out of range
train.subset([index]) takes a subset of train at every list in the index. It is saying that the list index is out of range, however, cvtrains[0] -> cvtrains[4] all exist.
and they are lists, in each of the lists, the max possible value is within the train indexes...
I'm unsure how to debug this issue and would appreciate the assistance.
Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
