How to make classes form numerical data for deep learning training

I want to make classes from my target data, the input and target data are numerical, I know that I can make 3 intervals but what should the format of the classes be ? In the matlab’s examples the classes are categorical format, should I make them also categorical in my case ? Thanks

6 件のコメント

Wabi Demeke
Wabi Demeke 2021 年 8 月 3 日
編集済み: Wabi Demeke 2021 年 8 月 3 日
Interval_1= 0, Interval_2=1, and Interval_3=2
Output=[1 0 2 1...2]' somthing like this then
Outputs=categorical(Output); % use to convert to categorical
I think it should be ready to train using classificationLayer
Omailnoth
Omailnoth 2021 年 8 月 3 日
Is that how it really works ? because my output are in range (30-90), if I use 3 classes (0,1,2),after I train the model the predicted data using "classify function" will be in range(0-2) , how to get the values in range(30-90) , I'm new to this field, I already used regression neural network but I want to see the difference, Thank you @Wabi Demeke
Wabi Demeke
Wabi Demeke 2021 年 8 月 3 日
編集済み: Wabi Demeke 2021 年 8 月 3 日
I thought you wanted to label each outputs data to 3 classes based on their intervals for example ouputs range between 30-50 to class_1(=0), 51-70 to class_2(=1), and 71-90 class_3(=2). And then to train NN that predict which class a certain input belongs.
if you want to train NN that predict the actual ouputs(could be any value between 30-90) instead of which ranges it belongs you can just use regression NN.
Omailnoth
Omailnoth 2021 年 8 月 3 日
So If I want to do classifications then I will only get which class the input belongs to, And to get a numerical score I have to do regression,,
Wabi Demeke
Wabi Demeke 2021 年 8 月 3 日
Excatly! Follow common NN training procedures such as spliting your dataset into training and validation set to check your NN generlization capacity. You probably need to spend sometime in hyperparametric tuning to find NN model with good prediction performance. Goodluck.
Peter Perkins
Peter Perkins 2021 年 8 月 3 日
Not sure what the question is here, but to make a categorical from numeric, discretize is the best way to do it.

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

回答 (1 件)

Shivang Srivastava
Shivang Srivastava 2021 年 8 月 11 日

0 投票

As per my understanding you want to convert discreet / numerical data to intervals for Training Deep Learning Models.
I would recommend you check discretize function. It helps to group data into bins or categories.

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2021 年 8 月 3 日

回答済み:

2021 年 8 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by