Тёмный

MULTI-CLASS TEXT CLASSIFICATION USING 🤗 BERT AND TENSORFLOW 

The Artificial Guy
Подписаться 1,8 тыс.
Просмотров 27 тыс.
50% 1

An implementation of Multi-Class classification using BERT from the hugging-face 🤗 transformers library and Tensorflow.
code and data used: bit.ly/3K0KEXe
Multi-Label Text Classification using BERT & PyTorch: • MULTI-LABEL TEXT CLASS...
Sentiment Analysis using BERT: • SENTIMENT ANALYSIS 😡😐😄...
Handle Imbalanced Text Dataset: • HANDLING IMBALANCED TE...

Опубликовано:

 

12 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@silenttorpedo1853
@silenttorpedo1853 2 года назад
Long time no seen bro please keep it continued 🙏 you will progress a lot in teaching world Your videos are easy to understand
@theartificialguy6898
@theartificialguy6898 2 года назад
Thank you bro! Yes i will try to be consistent.
@nikhilgjog
@nikhilgjog 2 года назад
thanks! 1) is there a way to get precision and recall? as this is a multiclass problem, could we get micro and macro precision , recall and f1 after each epoch? 2) why did you use `bert-base-cased`? when should we use `bert-base-uncased`?
@theartificialguy6898
@theartificialguy6898 2 года назад
Why i used bert-base-cased? As you can see in the name 'cased', the text is same as input text therefore no changes, but in uncased, the text has been lowercased before the tokenization step. Yes i think you can create a normal function to calculate those metrics and we have an "on_end_epoch" function in which you can feed the metrics function, you will need to do some research on it. (In the future I shall create a video on this) By the way if you liked the video please do subscribe the channel and share among your friends!
@nikhilgjog
@nikhilgjog 2 года назад
@@theartificialguy6898 i have subscribed and will share. Along with calculating above metric at the end of each epoch, if you could show how to hypertune parameters such as class weights dictionary using a functionality similar to gridsearchcv then it would make a complete tutorial. Any idea when you could post the next update? thanks!
@theartificialguy6898
@theartificialguy6898 2 года назад
@@nikhilgjog maybe in the upcoming weeks & thanks for the idea!
@krishnanv4109
@krishnanv4109 2 года назад
Very simple and clear explanation
@KayYesYouTuber
@KayYesYouTuber 2 года назад
Nice illustration. thanks
@susmitagiri7317
@susmitagiri7317 Год назад
Hi, I got an error called "The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()" while traing to train the data as you explaind starting at 27:46 minutes. Could you please help me here?
@zakoyaki
@zakoyaki Год назад
Thank you so much!!!!! Very helpful.
@sameermahajan8764
@sameermahajan8764 2 года назад
THANK YOU SO MUCH FOR THIS! Thank you!!
@anthonygonzalez4148
@anthonygonzalez4148 2 года назад
Thank you so much! What a wonderful, up to date guide.
@theartificialguy6898
@theartificialguy6898 2 года назад
Thank you! Don't forget to like the video and subscribe the channel!
@carloscampos7709
@carloscampos7709 Год назад
Thanks for the video! It's really helpful
@ganeshsuresh4723
@ganeshsuresh4723 2 года назад
You are the best trainer.... Love you lottt
@theartificialguy6898
@theartificialguy6898 2 года назад
Thank you! Don't forget to subscribe the channel & like the video!
@ganeshsuresh4723
@ganeshsuresh4723 2 года назад
@@theartificialguy6898 kindly create a video and teach us how to use imbalanced dataset in pytorch (smote or any over sampling technique)
@theartificialguy6898
@theartificialguy6898 2 года назад
@@ganeshsuresh4723 i have already created a video on handling imbalanced dataset, here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ubxfWPg2dJ0.html
@murtazasamiwala
@murtazasamiwala 2 года назад
Thanks for this video. It was really helpful. I have one question. When I tested the same thing (different dataset, but similar approach), I didn't get the validation accuracy and loss at the end of the epoch, only the test accuracy and loss. Do you know how to fix this.
@speedxd3383
@speedxd3383 2 года назад
Thank you for this!
@MeCoolMitch
@MeCoolMitch Год назад
Great video! Could you explain how I could add a confusion matrix to this since there is no y_pred, y_test, etc?
@dhavalpatel7883
@dhavalpatel7883 8 месяцев назад
if you get confusion matrix then please give me the code..
@yasithudawatte8924
@yasithudawatte8924 2 года назад
Really helpful. Thank you very much.
@slatan7239
@slatan7239 2 года назад
Hey!! Thanks for this video. Can you tell me how to measure the accuracy of this model?? Thank you already
@ravikumarpawar2406
@ravikumarpawar2406 2 года назад
Can you please share why you choose this model, we have some fast models in huggingface, Is there any advantage of this model, TF and any alternative for better speed
@nesarulhoqueshisir7747
@nesarulhoqueshisir7747 Год назад
The Bert model gives different results on every run. How can this problem be solved?
@PANDURANG99
@PANDURANG99 2 месяца назад
I have 50 labels , will it work?
@runjhunsingh2348
@runjhunsingh2348 5 месяцев назад
tried just everything but getting 38% hamming score accuracy on my multilabel classificastion of 24000 dataset into 26 labels, please suggest something
@dhavalpatel7883
@dhavalpatel7883 8 месяцев назад
give me code of confusion matrix for this above code. from where i can take the actual and predicted labels.
@dwisetyoaji5007
@dwisetyoaji5007 2 года назад
I got an error,how to solve this "ValueError: Input 0 of layer "model_8" is incompatible with the layer: expected shape=(None, 256), found shape=(6, 4, 5, 16, 256)"
@antoniusanggakurniawan2630
@antoniusanggakurniawan2630 2 года назад
Thank you for this video. How code for check the evaluation of the model, like f1 score, precision, recall, accuracy, and confusion matrix? Thank you 😊
@dhavalpatel7883
@dhavalpatel7883 8 месяцев назад
if you get confusion matrix then please give me the code..
@tanupriyapathak1347
@tanupriyapathak1347 Год назад
How can I integrate this model on my django website?
@AamerAsh
@AamerAsh Год назад
Hi, I want to train this on GPU but its not working. Can u help me?
@gloriaabuka5644
@gloriaabuka5644 2 года назад
Thank you for this video. I tried following along with another dataset but when I tried to one-hot encode my labels by typing " labels[np.arange(len(df)), df['rating'].values]= 1", I get this error "arrays used as indices must be of integer (or boolean) type". Please do you have any idea what I am doing wrong? thank you.
@nesmaabdelaziz7268
@nesmaabdelaziz7268 2 года назад
i got the same error as am working with different datset than the tutorial, did you know how to solve it? thanks inadvance
@gloriaabuka5644
@gloriaabuka5644 2 года назад
@@nesmaabdelaziz7268 arr = df['rating'].values labels = np.zeros((num_samples, int(arr.max()))) arr = arr.astype(int) labels[np.arange(num_samples), arr-1] = 1 Did a little bit of typecasting as my environment was reading 'arr' as float. I hope this helps.
@gloriaabuka5644
@gloriaabuka5644 2 года назад
In my case, I used a dataset where the labels was from 1-10
@priyankpandey200
@priyankpandey200 7 дней назад
in your dataframe for that particular column change the type to integer. as i can guess your rating attribute is having float or string values.
@sairamteja6785
@sairamteja6785 4 месяца назад
why are u training the entire bert model?? not fine tunning it
@rakeshkumarrout2629
@rakeshkumarrout2629 Год назад
I am new to bert huggingface. i didnot get anything.
@basicmaths3443
@basicmaths3443 2 года назад
model fit is throwing error bro
Далее
Which version is better?🎲
00:14
Просмотров 2,6 млн
Как улучшить шоколадку Милка?
00:35
BRUTAL STREET FIGHT KNOCK OUT
00:20
Просмотров 1,4 млн
The Secret to 90%+ Accuracy in Text Classification
10:34
What is BERT and how does it work? | A Quick Review
8:56
Which version is better?🎲
00:14
Просмотров 2,6 млн