I have a large table of sensor data that I would like to run through a binary classification tree. Some of my column variables in the table are dates, which I would like to specify as possible predictors. I tried importing into the Classification Learner as datetime values. It didn't work, and it was marked as "unsuitable".
How do I use datetime values as predictors in Classification Learner App?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 9 月 13 日
編集済み: MathWorks Support Team 2024 年 9 月 13 日

1 投票

The Classification Learner App does not currently support datetime values. Our developers have been made aware of this issue and will consider it for future releases.
As a workaround, it is recommended to convert the datetime values using the "datenum" function. This simply converts the datetime value into a double that represents a serial date number. Please refer to the example code below:
>> table.date_1 = datenum(table.date_1)
Documentation for "datenum" function:

その他の回答 (0 件)

カテゴリ

製品

リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by