Turning a column to months into number equivalent

1 view (last 30 days)
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!

Accepted Answer

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

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!