Placeholder Image

字幕表 動画を再生する

  • what is going on?

  • Everybody And welcome to another deep learning with python tensorflow and Carol's tutorial video In this video, we're gonna continue building on our future Cryptocurrency Price Movement Predictor the current neural network.

  • OK, so, uh, where we left off?

  • We've got this pre processing happening.

  • We've built the sequential data and we've separated out our validation data.

  • We have, uh we normalized the data here.

  • We scaled the data here.

  • The next thing we need to do is balance the data.

  • We need to have a CZ.

  • Many binds as we have cells.

  • If you have any more.

  • Like, if you're like 52% buys and 51 52% buys analysts a 48% cells, let's make sure it adds up to 100.

  • Um, if you're if you have data like that, it's probably okay.

  • You probably need to worry about balancing it.

  • But if you've got anything more than, like a 60 40 split or even more egregious, it's really important you balance your data set.

  • And arguably it's just always gonna be better if you just balance it because the model is gonna learn probably pretty quickly.

  • If there's like a 5 10% delta there that oh, just always predict this one class and immediately we make huge improvement, and that's easiest change that the model can make.

  • So it's important that you have a perfect split, an imbalance of your data so that the model doesn't waste time doing that and then also kind of get stuck in a rut like it's going to start doing that.

  • And then from there it might stay stuck in lost.

  • And so you don't want that toe happen Now there is a way you can pass class, waits to care, Ross, and tell it like, Hey, one example of this is worth 1.5 examples of this or something like that and you can tell it Hey, wait, these a little different when you go to calculate the loss for mistakes made and stuff.

  • But to be honest, I've not found that to solve balance issues, so I think that's a great idea.

  • In theory, it just doesn't seem to work.

  • So anyway, balance your data.

  • So that's what we're gonna do now.

  • We've shuffled the data, and now what we want to do is actually, um, balance it So what we're gonna dio is and again, there's a better way to do this, but I'm just gonna have to lists here.

  • Were you say buys is a list and cells is a list.

  • Clear that our men a little bit.

  • Okay, then overseas, four sequence targets in sequential data.

  • Uh, if Tory it is a zero, that's cell.

  • So then what we're gonna say is cells not upend sequence target.

  • LF target equals a one buys upend.

  • Uh, sequence and target.

  • Okay, um, so now we have buys and sells.

  • The next thing we want to do is before we started slicing things and dicing things, uh, we're gonna go ahead and do a random nut shuffle lies, shuffle cells.

  • We probably don't really need to do that because we already shoveled here, but shuffle for good measure.

  • So So, uh, then what we're gonna find out is which one is lesser?

  • We don't actually need to know if it's by theirselves.

  • We just need to know what's the minimum value of these two lists.

  • So the way we can do that is lower equals the minimum of the len of buys or the len of cells and that will tell us, you know, like maybe buys is 30,000 and sells a 60,000.

  • Well, lower would be 30,000.

  • Then what we can say is buys equals buys up to her.

  • I'm sorry.

  • Let's see.

  • Uh how did we do this up?

  • Yeah, up to lower.

  • So if the len is 30 k, it would say up to 30,000 buys and then sells equals cells up to lower.

  • I'm gonna remove 30 k, because that's not true.

  • I don't think it's just a value.

  • Uh, Okay.

  • Okay.

  • So now we've got that.

  • So then we're gonna say sequential data now actually is just equal to buys.

  • Plus the cells and then random dust ruffle sequential data.

  • Why are we doing that?

  • Ah, shuffle again.

  • At least this one is so like the data isn't all buys in all cells.

  • That'll really confuse the model.

  • You definitely want to shuffle it up.

  • Okay, so now we've got that, Uh, what we need to do is now it's in sequential data.

  • We need to convert it from its buys and sells is containing the, you know, the features and the labels.

  • What we want to do now is split those out to be, You know, the X's and y's as different as different lists, I guess, because the way that we're gonna feed it, you know, it's going to be a model dot fit ex wife.

  • So we have to split these out into exes and wise zero X equals a list.

  • Why equals a list?

  • And then we're gonna reiterate over the sequential later.

  • So four sequin its target in sequential data.

  • We're gonna say Capital X, can we type dot upend the sequence and then why dot upend the targets.

  • Okay, at this point, I think we're closing in on being complete.

  • We're going to return the num pie array of X and y.

  • So I were pre processing data frame function should be complete.

  • And now we're ready to do is come on down here and comment out that uncommon tw those get rid of this and I think what I want to do is let's print out some statistics.

  • I'm not sure I really want to type all this out.

  • I'm not going to I'm gonna copy and paste this from the text based version of this trial.

  • Um, this just waste.

  • Sorry, about my dogs.

  • Hold up.

  • I think our trash people are here and they're making a bunch of noise.

  • Oh, no, we got a huge.

  • I have no idea what's going on.

  • Someone's putting a ladder up to my roof.

  • I probably should be somewhat concerned.

  • Okay, so?

  • So the so we can see is the training data.

  • Uh, is 69,000?

  • Validation is 3000.

  • There's a good balance between the bis.

  • Andi don't buys, and then we have a balance between the validation buys and don't buy.

  • So everything is nicely balanced.

  • We've got it split apart the way that we're expecting to.

  • And in the next tutorial, I think we are ready to build the model and train the model.

  • So that's what we're gonna do in the next video.

  • If you've got questions, comments, concerns, whatever you know the deal.

  • Feel free to leave in below.

what is going on?

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

RNN配列データのバランスをとる - Deep Learning w/ Python, TensorFlow and Keras p.10 (Balancing RNN sequence data - Deep Learning w/ Python, TensorFlow and Keras p.10)

  • 1 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語