Clear Filters
Clear Filters

MATLAB code to cluster categorical data

4 views (last 30 days)
N Z
N Z on 19 Feb 2021
Answered: Mahesh Taparia on 1 Mar 2021
Hello everyone,
I am new to MATLAB programming. I want to cluster my categorical data. I have six columns which five of which are non-numeric data, and one column is numeric data as follows:
  • Market (non-numeric data)
  • Vet Drug (non-numeric data)
  • Published Commodity (non-numeric data)
  • Index Commodity Group (non-numeric data)
  • Index Commodity (non-numeric data)
  • MRL Amount (ppb) (numeric data)
There are 1545 data (number of rows). I am attaching part of the data here. Is there any suggestion or recommendation for the best and appropriate method to cluster my categorical data so that we get useful information by looking at the results and plots? Any help would be appreciated.
Thanks,
  2 Comments
Mahesh Taparia
Mahesh Taparia on 25 Feb 2021
Hi
Do you have the associated labels of your data? If not, do you know the number of categories the dataset have?
N Z
N Z on 27 Feb 2021
Hello Mahesh,
Thank you for your message and reply. My data does not have any labels, and I want to use an unsupervised learning method to classify my data into optimal classes. I do not know the number of categories the dataset have in advance; however, we can categorize our dataset into 3.
I really appreciate any help you can provide,

Sign in to comment.

Answers (1)

Mahesh Taparia
Mahesh Taparia on 1 Mar 2021
Hi
You can refer this documentation of clustering. Hope it will help!

Categories

Find more on Categorical Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!