Testing Model Accuracy in stock marketing by digital agencies Bangalore
Overview
We'd just finished going over how to train our model and that's going to be using this code here in which we create a new session. We run our global variables initialiser and then for the number of earmarks they think we set this to be we're going to run our optimized function which in turn will try to minimize loss by modifying the values of W and B. And essentially what this is doing is trying to fit a line through the data that we saw Placide using in this code here just commented out because I don't want to be pulling up the plot every time but this digital agencies Bangalore essentially going to move the line around so that if we were to test our model which would be done after this for loop after we've trained it we could actually input some volumes directly into the model itself.
And then we should get well lets with percent accuracy what the actual outcome should be or what the price difference should be. Now, where am I getting that number percent accuracy? Well, I'm about to show you in this section because we're going to go over how to actually test our model out as well as SEO company in India actually training the model because in the previous section we didn't bother running and training the model as we're going to be doing training and testing digital agencies Bangalore all in one go. So if we wanted as of now we can actually write some code to out some results if we wanted. And we do this again off this flu.
Session 1
It would really be as simple as running our session but instead of running the optimized function all we need do is run our wife's function here because after it's been trained WSP have been modified to the optimal values. And then we just need to input a volume or list of volumes and then the output which is what we'd be running would provide us the corresponding price differences or at least our model things the price differences should be in fact why don't we demonstrate that first before we start talking about digital agencies Bangalore accuracy metrics so who's going to move that down and close up the run window for now.
Session 2
So as I said we would have to do is call upon our session and we would run a certain node in our case we are going to be running the Y node and we'll need to input just the one value which is going to be X because that's the only placeholder in this equation. So will enter in our predictor we could actually just put the curly braces because that's the digital agencies Bangalore next argument anyway. And we're just going to set some values for x because our volumes I think. Let's see for the last year the volumes are all well mostly between about and about K.
Session 3
So let's just enter in the and see what our model outputs for that Soldo to and why not an as well. Now keep in mind these are in the thousands of stocks exchanged. OK. And these are all metrics. I'm just put in the decimals here. Probably not needed as the compiler should interpret these floats anyway. And then, of course, we want to be able to see digital agencies Bangalore what those results are so we're going to wrap this in print statements. And let's go ahead and run this guy by the way if you really wanted to see what the values of W and B. All you can actually print those out as well so you could just run your session or do something like print session top run and then you could just run wand you could also run B as well.
Session 4
And because these actually don't take in any values themselves you don't need to pass in a free dictionary or anything like that. You could just print these out and see what unfolds on model comes up with. So what do we go ahead and run this and see what gets outputted here? And the problem is always seen because this function is going to think that these are arguments here so I'm just going to encompass these in the square brackets. OK. And that's because the dictionary is the second document and just thought B was Arwa Earthbeat dictionary that. That's why it was going wrong. OK so as you can see it's an array is provided some values.
Our first one is going to be U which is going to be the slope of next of point. Let's just call this. All right. And for our work be values going to be the basis we get about. So those are the final values our model has run or rived on. As for our change in price is that correspond digital agencies Bangalore with these values of. These other values we get about next of point three indexes of . and the negative one points. Let's call this. So essentially what this means is our model is about percent sure of this code is not percent sure it's not a guarantee but it's saying that if we see about a volume of stocks exchange out the day we can expect our price to go down by point by about point.