A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
def time_series_cross_validation_2(model, data, params, number_folds=10): | |
""" | |
Performs a k-fold cross-validation on a Time Series as described by | |
Rob Hyndman. | |
See Also: | |
http://robjhyndman.com/hyndsight/crossvalidation/ | |
Arguments: | |
model: a model somewhere... | |
database (numpy.ndarray): uses 'data' matrix to perform | |
cross-validation. |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)