Turning a column to months into number equivalent

1 次查看(过去 30 天)
Hey everyone!
I came across a data set with 8631 rows and 19 cloumns to use as the training set for a prediction model using neural networking. One of the columns is filled with months in short versions (Jan, Feb, Mar, Apr,..., Dec). What would be the most efficient way of converting this into their numerical equivalent for me to put into the model? Just need to convert this one column, will using grp2idx work expiecially when I put in the test data set for the actual prediction? Thanks in advanced!

采纳的回答

KSSV
KSSV 2021-9-8
a = {'Apr', 'Jan','Feb', 'Apr', 'Jan'} ;
iwant = findgroups(a) ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by