Predicting with a Neural Network explained

  Рет қаралды 74,563

deeplizard

deeplizard

Күн бұрын

Пікірлер: 55
@deeplizard
@deeplizard 6 жыл бұрын
Machine Learning / Deep Learning Tutorials for Programmers playlist: kzbin.info/aero/PLZbbT5o_s2xq7LwI2y8_QtvuXZedL6tQU Keras Machine Learning / Deep Learning Tutorial playlist: kzbin.info/aero/PLZbbT5o_s2xrwRnXk_yCPtnqqo4_u2YGL
@chefdeprestigellc8855
@chefdeprestigellc8855 4 жыл бұрын
Her Voice is HOT
@krishnavamsiyerrapatruni5385
@krishnavamsiyerrapatruni5385 4 ай бұрын
I have been trying to understand some of these concepts by referring to various YT vids and articles, but could never actually grasp them totally. Your succinct, clear and simple explanations have been very helpful in making these topics clear to me.
@swarajray6997
@swarajray6997 4 жыл бұрын
Your courses are well organized, and I really appreciate your efforts, Keep up the great work!! Thank You!!!
@mburkhart41
@mburkhart41 3 жыл бұрын
So well produced and organized. Really enjoying this introduction. Thanks!
@tymothylim6550
@tymothylim6550 3 жыл бұрын
Thank you very much for this video! I especially enjoyed seeing the structure of the prediction output in Python's Keras library! It helps me understand how to implement Neural Networks myself more easily!
@loialbringer
@loialbringer 3 жыл бұрын
Really like your videos. Informative and easy to understand. Thanks!
@sagar11222
@sagar11222 4 жыл бұрын
Google had picture search option several years back. Now i can see that type of search worked by ANN type concept.
@rachidelfermi6759
@rachidelfermi6759 4 жыл бұрын
I knew to deep learning This serie is treasure
@montassarbendhifallah5253
@montassarbendhifallah5253 4 жыл бұрын
what about the test accuracy? I would be cool if you talk about it in the video + thanks for the amazing playlist
@deeplizard
@deeplizard 4 жыл бұрын
Hey Montassar - You're welcome! You can visualize prediction results using a confusion matrix, and from that easily calculate the test accuracy. Confusion matrix explained here: deeplizard.com/learn/video/km7pxKy4UHU
@PunmasterSTP
@PunmasterSTP 2 жыл бұрын
Predicting with a neural network? More like "Perfect, your videos just work!" Thanks again for making and sharing everything.
@qusayhamad7243
@qusayhamad7243 3 жыл бұрын
thank you very much for this clear and helpful explanation.
@souadzaoui7148
@souadzaoui7148 Жыл бұрын
Very good explained
@pycad
@pycad 3 жыл бұрын
Thank you for the valuable information
@nadeemmazahreh94
@nadeemmazahreh94 5 жыл бұрын
Very helpful. Thank you
@thespam8385
@thespam8385 4 жыл бұрын
{ "question": "To make predictions, the model relies on:", "choices": [ "What is learned during training", "Data available in experience replay", "Comparisons made to previous data", "Labels provided in the test set" ], "answer": "What is learned during training", "creator": "Chris", "creationDate": "2019-12-11T04:37:31.851Z" }
@deeplizard
@deeplizard 4 жыл бұрын
Thanks, Chris! Just added your question to deeplizard.com
@aysesalihasunar9563
@aysesalihasunar9563 4 жыл бұрын
Hello, In your website, there is a quiz question number 4 says: "It is possible to get a prediction from a neural network model before the network has been trained." This made me confused. Isn't the whole idea predicting after training? Could you please enlight me on this? Many thanks.
@deeplizard
@deeplizard 4 жыл бұрын
Hey ayşe - Glad to see you're making use of the quizzes :) The point of this question is that it is indeed *possible* to get a prediction from a model before it has been trained, however, the prediction will likely not be accurate until after training. For example, we can build a model, *not* train it, pass it data, and get a prediction. The prediction will probably be very wrong, but that doesn't mean the model is incapable of providing a prediction. After training, however, is when the model will (hopefully) provide accurate predictions. Hope this helps.
@aysesalihasunar9563
@aysesalihasunar9563 4 жыл бұрын
@@deeplizard oh got it now. not practical but possible :) thanks.
@deeplizard
@deeplizard 4 жыл бұрын
Exactly :D
@abdelhamidelwahabi3578
@abdelhamidelwahabi3578 3 жыл бұрын
I have nothing to say other than thanks a lot
@torchedwithfire
@torchedwithfire 3 жыл бұрын
Hi.. @deeplizard is there a way to get a table of accuracies and loss for the test set as we did in the training and validation? I would be grateful if you could clarify for me asap :)
@Charlie-pn8yb
@Charlie-pn8yb 2 жыл бұрын
{ "question": "Which of this statements are true in relation with the test sets? : 1- The test set is passed to the model once an epoch is complete 2- The test set is passed to the model once the training is complete 3- The model doesn't read the labels of the test set 4 - The test set should have a 2 times bigger sample than the training set", "choices": [ "2 and 3", "1 and 4", "4 and 2", "1 and 3" ], "answer": "2 and 3", "creator": "Charlie", "creationDate": "2022-04-06T08:27:18.858Z" }
@barryfruitman6372
@barryfruitman6372 2 жыл бұрын
This video series is amazing but please SLOW DOWN.
@Wenyfile
@Wenyfile 6 жыл бұрын
Can you explain exactly how it predicts? Let's say we give it a dog picture and it's trained to predict cats and dogs. Does the model learn that specific neurons/outputs corresponds to different features and chooses the ones with most alike features. or is it something else?
@deeplizard
@deeplizard 6 жыл бұрын
Hey Christoffer - Yes, at a high level, that is what happening. On a more technical level, you can understand how exactly the model learns to predict correctly from the 5 backpropagation videos that come later in this series.
@borin2882
@borin2882 4 жыл бұрын
Thank for the video. I have some doubt in training process. What is the output of trained model?
@deeplizard
@deeplizard 4 жыл бұрын
A probability distribution across all possible classes.
@borin2882
@borin2882 4 жыл бұрын
@@deeplizard thank you! I can understand that process but I can't understand how it get probability on each class. For example I have 20 images and 5 classes for training, so this means that 20 images used as input images at the same time?
@borin2882
@borin2882 4 жыл бұрын
@@deeplizard and one more question about pre-trained model that i can't get it. For example, I have a pre-trained model of dog and cat then I use image of dog to predict, could you explain me how pre-train model says it's is a dog?
@yepnah3514
@yepnah3514 3 жыл бұрын
how would i create a test for an image classifier model? the typical horse-human one? i have created my train and validation but no test. I'm trying to find the sequence of your videos to go step by step but it is a bit hard since you have different play lists.
@srijalshrestha7380
@srijalshrestha7380 6 жыл бұрын
what do you mean by true data out in the field?
@deeplizard
@deeplizard 6 жыл бұрын
Hey Srijal - What I was referring to was data that our model would get exposed to once it was deployed out in the "real world." Meaning, data that wasn't originally included in the train, validation, or test sets. In the example from the video, we trained, validated, and tested a model on images of dogs. Once our model is deployed to a public website, it would then be classifying images from the world (which is what was meant by "out in the field") that weren't included in the original data sets we used for training and testing. Does this help clarify?
@srijalshrestha7380
@srijalshrestha7380 6 жыл бұрын
so how would it know the name of that breed?
@deeplizard
@deeplizard 6 жыл бұрын
Let's assume that we've trained on all possible breeds. Even though we've trained on all breeds, that doesn't mean that the model has seen images of all possible dogs that fall into any specific breed. For example, say our model has seen hundreds of images of German Shepherds during training and that it's pretty good at classifying that breed. Later on, a random person on the other side of the world uploads an image of their own German Shepherd that our model has never seen before. Although the model has not seen that particular individual dog or that particular image, it should still be able to classify it given what it has learned about German Shepherds during training.
@srijalshrestha7380
@srijalshrestha7380 6 жыл бұрын
got it, thanks a lot!!! you are the best
@gerelbatbatgerel1187
@gerelbatbatgerel1187 5 жыл бұрын
ty
@scion171777
@scion171777 6 жыл бұрын
HI, how do we scale the test data? For instance, if I normalized my training data and try to predict a different dataset (test data), do I normalize my test data based on training data statistics? Thanks a lot!
@deeplizard
@deeplizard 6 жыл бұрын
Yes, that's right Geometricφ!
@hiroshiperera7107
@hiroshiperera7107 6 жыл бұрын
Hi .. I'm having a small question regarding the threshold value. When the predicted probabilities are provided, we need to select a suitable threshold value to calculate accuracy, specifity, sensitivity.. etc. In my example, (lung cancer detection) thereshold 0.33 works better than 0.5 when delecting cancer. So how is it possible to decide the threshold value that I'm going to select? Is there a specific way or does it changes from scenario to scenario?
@deeplizard
@deeplizard 6 жыл бұрын
Hey Hiroshi - Can you tell me where in your code that you're specifying the threshold value?
@hiroshiperera7107
@hiroshiperera7107 6 жыл бұрын
(loss,accuracy)=model.evaluate(Y_train,Y_valid,batch_size=batch_size,verbose=1) print ("[INFO] loss={:.4f},accuracy: {:.4f}%".format(loss,accuracy*100)) df = pd.read_csv('C:/CT_SCAN_IMAGE_SET/resnet_50/dbs2017/data/stage1_sample_submission.csv') df2 = pd.read_csv('C:/CT_SCAN_IMAGE_SET/resnet_50/dbs2017/data/stage1_solution.csv') x = np.array([np.mean(np.load('E:/224x224/%s.npy' % str(id)), axis=0) for id in df['id'].tolist()]) x = x.transpose(0,2,3,1) # Make predictions pred = model.predict(x, batch_size=batch_size, verbose=1) classes=pred[:,1] ### Converting predicted values into classes using threshold threshold=0.5 predicted_class1=np.zeros(len(classes)) predicted_class1[classes>threshold]=1 predicted_class1 cm1 = confusion_matrix(df2[['cancer_true']],predicted_class1) print('Confusion Matrix : ', cm1) total1=sum(sum(cm1)) #####from confusion matrix calculate accuracy accuracy1=(cm1[0,0]+cm1[1,1])/total1 print ('Accuracy : ', accuracy1) sensitivity1 = cm1[0,0]/(cm1[0,0]+cm1[0,1]) print('Sensitivity : ', sensitivity1 ) specificity1 = cm1[1,1]/(cm1[1,0]+cm1[1,1]) print('Specificity : ', specificity1)
@hiroshiperera7107
@hiroshiperera7107 6 жыл бұрын
HIiii... Hope it is clear... In this example I used the threshold as 0.5... And based on that the specificity, sensitivity was calculated. If the threshold is considered as o.33 then these measurements becomes better. So is there a specific way, how we can decide the threshold. Just sorry for the trouble. I would actually like to have your opinion about this. Million thanks for helping me :)
@deeplizard
@deeplizard 6 жыл бұрын
Hey Hiroshi - I think I see what you're saying. So, when you change your threshold to 0.33, it appears you're saying that, for any given sample, if the model predicts class1 at 33% or higher, then this means cancer is present. Is this correct? When I think about what this means conceptually, I'm not sure if it's a great idea. Essentially, it appears you're kind of "lowering the bar" for how accurate your network has to be with it's predictions before you say that it's actually correct. To put this in another context, say _in real life_ someone goes to the doctor, they have a tumor, and the doctor inspects this tumor. The doctor suspects there is really only a 34% probability to this tumor being cancerous and that it's more likely benign. But since the "threshold" has been set at 33%, she has to operate/treat it in the same way that she would if she were 100% confident that it's cancer. That's just kind of the way I thought about it, but I've not personally had experience changing this value myself. Given this, It may be a good idea to post your question to the LearnMachineLearning or DeepLearning or MLQuestions subreddits (links below) to see if anyone there may be able to shed some additional insight on this. www.reddit.com/r/learnmachinelearning/ www.reddit.com/r/deeplearning/ www.reddit.com/r/MLQuestions/
@hiroshiperera7107
@hiroshiperera7107 6 жыл бұрын
Thanks alot for you valuable suggestions. yes you have understoodit correctly. I will post my question there as well. :) arxiv.org/pdf/1705.09435.pdf This is a pdf where I felt that they have set the threshold value to 0.25. In Table 5 they have mentioned that in page 8. I'm not sure this is the exact thing we are talking about. You can have a look at it too if you can find a small free time. :)
@iebalazs
@iebalazs 2 жыл бұрын
Why are the videos toooo fast??
@RezwanRafid179
@RezwanRafid179 Жыл бұрын
Love your videos, but can you explain the dimensions of the scaled_test_data? I went through your previous video - kzbin.info/www/bejne/i5zdmaKretBpq7s however, you haven't written anything regarding testing data.
@matharbarghi
@matharbarghi 4 жыл бұрын
Hi, two comments: 1- when I listen to your sound, it seems to me that you are reading from some text that I feel just reading a book instead of talking in actual words. 2- You referee people to watch your other videos in order to get idea what the data that you are using in this video looks like. Instead of referring your audience to browse and disconnect from your lesson and browse another site, you could just give an idea how the data is.
Overfitting in a Neural Network explained
4:16
deeplizard
Рет қаралды 84 М.
How a Neural Network Learns explained
7:00
deeplizard
Рет қаралды 111 М.
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,4 МЛН
ЭТО НАСТОЯЩАЯ МАГИЯ😬😬😬
00:19
Chapitosiki
Рет қаралды 3,6 МЛН
Artificial neural networks (ANN) - explained super simple
26:14
I Built a Neural Network from Scratch
9:15
Green Code
Рет қаралды 327 М.
Batch Normalization (“batch norm”) explained
7:32
deeplizard
Рет қаралды 226 М.
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
Convolutional Neural Networks (CNNs) explained
8:37
deeplizard
Рет қаралды 1,3 МЛН
AI, Machine Learning, Deep Learning and Generative AI Explained
10:01
IBM Technology
Рет қаралды 299 М.
Convolutional Neural Networks from Scratch | In Depth
12:56
The future of AI looks like THIS (& it can learn infinitely)
32:32