Placeholder Image

Subtitles section Play video

  • COLTON OGDEN: All right.

  • Hello world.

  • This is CS50 on Twitch, and today we're joined

  • by CS50's Nick Wong, who's been a teaching fellow here

  • for a couple of years.

  • And today he's going to teach-- oh, what are you going to teach us today?

  • What are we going to talk about?

  • NICK WONG: So we're going to be talking about binary classifiers

  • using TensorFlow and Keras.

  • And so TensorFlow was actually a project that was developed and built by Google.

  • And Google has their hands in everything,

  • but TensorFlow is really cool because it basically took

  • the whole linear algebra-ness of machine learning and made it very simple.

  • And then Keras is a wrapper on top of TensorFlow

  • that actually made even that simplification a little bit simpler.

  • COLTON OGDEN: Let's transition to your awesome little screensaver back here.

  • Yeah, so like an introduction to machine learning using some nice open source

  • libraries, some Google base-- is Keras a Google open source library as well?

  • NICK WONG: I believe so, yeah.

  • COLTON OGDEN: OK.

  • TensorFlow-- I know everyone's heard of TensorFlow, or at least a lot of us

  • have.

  • I know almost nothing about machine learning,

  • so this will be a learning experience for me as well,

  • but I'm super excited to talk about binary classifiers and what they are.

  • NICK WONG: Awesome.

  • So yeah, I'll talk a little bit about the theory first.

  • I won't talk too much on theory.

  • I know people aren't usually huge fans.

  • I like the theory, I think it's really cool,

  • but we're going to just talk about it a little bit

  • to motivate and contextualize what I'm actually going to start

  • saying and coding in front of you.

  • Before I do that, I just wanted to point out this screen saver

  • that I've got going on here.

  • I think it's super cool.

  • I'm a huge fan.

  • It's technically CMatrix.

  • That's the actual program that's running.

  • But I put that through another program called

  • lolcat, which is one of my favorite "messing with people"

  • or troll programs.

  • If you're ever trying to mess with someone,

  • you can display lolcat and stuff through a screen.

  • COLTON OGDEN: We'll have a separate stream on how to troll people,

  • how to hack into a--

  • NICK WONG: One of my favorite things.

  • COLTON OGDEN: And this screensaver is in a shell, right?

  • NICK WONG: Right.

  • So this is in a shell.

  • If I press any key, then I'm back in my shell,

  • and I can go back to coding and doing all sorts of cool things.

  • But I like having it there.

  • It's entertaining.

  • It just drains power, so you want to be plugged in.

  • COLTON OGDEN: We have a few comments in the chat there.

  • MKLOPPENBURG says, "Hey everybody."

  • BELLA_KIRS says, "Hello."

  • WHIPSTREAK, BELLA, and I can't read that last one.

  • NICK WONG: Yeah, it's hard to read.

  • COLTON OGDEN: It looks like ILYAS.

  • They all say, Hi, Nick.

  • NICK WONG: Oh, awesome.

  • Hello guys.

  • Appreciate it.

  • Very happy to be here.

  • COLTON OGDEN: We have a lively chat, so we'll definitely read off the messages

  • as we get them in the chat.

  • NICK WONG: Sweet.

  • All right.

  • So machine learning.

  • It's one of my favorite buzzwords that everyone throws around,

  • along with like blockchain, AI--

  • what are some other ones?

  • There are some really good ones out there.

  • Bitcoin people that are out there.

  • COLTON OGDEN: Yeah, blockchain.

  • They've been massively-- yeah, those last couple years.

  • NICK WONG: Everyone keeps throwing them out there, and they're all great.

  • And so I think one of the things that I heard this last summer where

  • I was working, someone said that machine learning is just fancy statistics

  • wrapped up in a computer.

  • And I was like, yeah, not really.

  • Like in concept, yes, but not necessarily in what

  • they actually intended.

  • What they were meaning is, like, you could just

  • use statistics to do the same thing.

  • And when I was walking through our science center today,

  • I was looking at the old punch card style computers.

  • And I was like, yeah, technically I can run statistics on that too,

  • but it's different.

  • The game has changed a little bit given our computing power, our memory,

  • and things like that.

  • COLTON OGDEN: Little bit apples and oranges type deal.

  • NICK WONG: Yeah.

  • It's just like, yeah, you're not wrong really, but you're pretty off.

  • And so machine learning is just a very broad field.

  • It really means just any way in which you

  • get a computer to figure things out.

  • And a lot of it's modeled after how humans learn.

  • So we-- well, in concept.

  • It's modeled after the way our brains are structured.

  • So a lot of things are called neurons.

  • So you hear a lot of just jargon that gets thrown out.

  • You'll hear, like, tensors, neurons, layers, models, things like that.

  • COLTON OGDEN: I've heard, like, neural nets, for example.

  • NICK WONG: Right, neural network.

  • And those sorts of things can be very intimidating,

  • but they generally have very well grounded meanings.

  • So for example, a neural net, that just means that, like our brain,

  • they took a bunch of individual nodes and they linked them all together,

  • and that's all that it really ends up meaning.

  • Now, there's some nuance to that there's some complexity,

  • but in concept, it's actually pretty straightforward.

  • So what we're going to do is we are technically

  • going to build a neural network today.

  • COLTON OGDEN: That's cool.

  • NICK WONG: It is what is required for-- or not required,

  • but it's what we're going to use for the binary classification.

  • And that brings us to what binary classifiers are,

  • which is if you have a bunch of data, can I

  • tell you if it's in one of two groups?

  • So it's either going to be group A or group B.

  • And that can mean all sorts of things for us.

  • COLTON OGDEN: So if we're looking at pictures of apples versus pictures

  • of oranges, what's an apple--

  • NICK WONG: Is it an apple or an orange?

  • COLTON OGDEN: --what's an orange?

  • By the way, DARKSLAYERX says, "How often do you stream?"

  • So we typically stream, as of the last couple of weeks,

  • this is a fairly new thing, but usually four days a week,

  • so Monday, Tuesday, Wednesday, Friday.

  • Thursday is a little bit of a busy day right now for CS50.

  • We're shooting CS50 seminars.

  • You're doing a seminar, right?

  • NICK WONG: Yep.

  • I will be also doing a seminar.

  • COLTON OGDEN: Do you know what it is on yet?

  • NICK WONG: It'll be on web development with Python and Django.

  • COLTON OGDEN: OK, awesome.

  • NICK WONG: It's a completely different--

  • COLTON OGDEN: Completely unrelated.

  • NICK WONG: They're not even related.

  • COLTON OGDEN: But yeah, pretty frequently.

  • Our goal is to do this roughly three to four times per week.

  • It looks like WHIPSTREAK also tossed in that's it on the CS50 Facebook page.

  • Yes, it is on the CS50 Facebook page most definitely.

  • NICK WONG: The human equivalent of check demand page.

  • COLTON OGDEN: Yeah, yeah.

  • Yeah, basically.

  • NICK WONG: One of my favorite responses.

  • That's awesome.

  • COLTON OGDEN: MKLOPPENBURG-- Django rocks.

  • NICK WONG: Yes, I agree.

  • And we use I guess Flask and-- what is it?

  • Flask, Jijnja2, and MySQL in CS50, and I'm a huge fan of Django

  • which kind of wraps that all together.

  • But today, we'll be just using Python and we're

  • going to talk about [INAUDIBLE] stuff.

  • COLTON OGDEN: Separate stream.

  • We'll do a separate Django stream for it.

  • NICK WONG: Yeah, completely different.

  • Yeah, exactly.

  • COLTON OGDEN: By the way, you will be doing another stream--

  • NICK WONG: Yes.

  • COLTON OGDEN: --coming up on Linux commands.

  • So Nick will do-- if anybody is curious on how

  • he got his awesome show operating this way,

  • we'll dive into the basics of how that works with the basic Linux commands.

  • NICK WONG: Yeah.

  • That's next Friday, right?

  • COLTON OGDEN: Yeah, next Friday.

  • NICK WONG: Sweet.