フィルターのクリア

Cant convert more than 80 columns of data to categorical

2 ビュー (過去 30 日間)
SkarletSam
SkarletSam 2020 年 11 月 29 日
コメント済み: SkarletSam 2020 年 11 月 29 日
I am trying to convert all coloumns of a 1000x170 table to categorical data. "bt_000" would be the 81st coloumn.
It would seem that the function does not work after the 80th coloumn, any remedies?
Thank you.
  1 件のコメント
dpb
dpb 2020 年 11 月 29 日
It's not the number or the postion but the content of the column that's the problem, methinks.
Bet it will error the same way if you try that column alone.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2020 年 11 月 29 日
When you categorical() numeric values, then internally it uses %-0.5g format to convert the values to character vectors. It then errors if the number of unique values that result is different than the number of unique numbers.
Which is to say that when you categorical() numeric values, it is a problem if two of the unique values are the same up to the 5th decimal digit.
  3 件のコメント
dpb
dpb 2020 年 11 月 29 日
That doesn't say it errors because of it, though...that's probably worth a documentation addendum note (not that anybody ever actually reads the doc first).
SkarletSam
SkarletSam 2020 年 11 月 29 日
Seems like fuzziness with the categorical was the root of the problem. There were some columns that had large numbers that were really close to each other in numeric value. Took those out and the varfun worked. I discretized the columns that didnt work inidividually and added onto the newTable. Thanks for the input!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by