codebasics / deep-learning-keras-tf-tutorial

Learn deep learning with tensorflow2.0, keras and python through this comprehensive deep learning tutorial series. Learn deep learning from scratch. Deep learning series for beginners. Tensorflow tutorials, tensorflow 2.0 tutorial. deep learning tutorial python.
https://www.youtube.com/playlist?list=PLeo1K3hjS3uu7CxAacxVndI4bE_o3BDtO
824 stars 1.84k forks source link

how can i get the text tag #6

Open herbiel opened 2 years ago

herbiel commented 2 years ago

reviews = [ 'Reply to win £100 weekly! Where will the 2006 FIFA World Cup be held? Send STOP to 87239 to end service', 'You are awarded a SiPix Digital Camera! call 09061221061 from landline. Delivery within 28days. T Cs Box177. M221BP. 2yr warranty. 150ppm. 16 . p p£3.99', 'it to 80488. Your 500 free text messages are valid until 31 December 2005.', 'Hey Sam, Are you coming for a cricket game tomorrow', "Why don't you wait 'til at least wednesday to see if you get your ." ] model.predict(reviews) array([[0.6472808 ], [0.7122627 ], [0.5710311 ], [0.06721176], [0.02479185]], dtype=float32)

can i know what's tag on reviews ?

bilal-24 commented 2 years ago

if model prediction > 0.5 -> 1:

other situation -> 0:

1 or 0 should equal to spam or ham.

Let's some coding...

herbiel commented 2 years ago

can we make multi-label ,such as 0,1,2,3....

bilal-24 commented 2 years ago

Ham -> 0 Spam -> 1

That is the binary classification problem. Can you show multi label in this problem?

But in another project, we can use sparse_categorical_crossentropy or categorical_crossentropy and then get multi label predictions.

I think you should watch CodeBasic's CNN videos. He was telling there, you should learn loss functions and label processing.