A Python way to filter out a single value from a list.

And now using X2,

my slightly smaller list,

I'm going to build the same full models we've already build.

I'm going to build them back to back and come and talk about them afterwards.

Over in R, you can see the number of units with

this kind of command every model has an @model object.

You can then get the dollar sign model summary,

and specifically dollar units to see those four numbers.

And a couple of R functions there that will tell you the size of our four models.

And we can see have 400 by 400 is twice as large as the others,

has twice as many weights which is why it took twice as long to build a model.

And you can run H2O describe on your dataset to find out the cardinality.

This function in Python,

the described function in Python doesn't tell you the cardinality,

which is why we needed to use N levels.

And to get rid of TailNum did setdiff and then off we go.

Building four models again.

Those four models have finished rebuilding and something really interesting has happened.

The first model, the default settings,

took 70 seconds before and that's reduced in a 13 seconds.

Increasing it to 200 epochs without stopping which was using about 50 epochs, wasn't it?

Has gone from five to six minutes then to one minute 20,

and the same for all three layer 200 by 200 by 200 model.

And the 400 by 400,

the two layers of 400 neurons has dropped from 12 minutes to two minutes.

Which is great, wonderful.

We've saved a sixth of the time,

no we've saved five sixth of the time.

But have we lost any performance?

So what I've done is I've put all the models into a Python list.

And then using a lambda to run logloss on each of those models and

then we'll do MSE as well. What have we got?

This is also a useful way of seeing which is the best model so far.

So for logloss, low is better.

It's gone up slightly,

gone up a fraction, dropped a lot.

This could be random variation,

I think this number for the three layered model was too high.

And the 400 by 400 was our best model,

has actually got better by excluding that tail number.

MSE is a very similar pattern on all four models.

And just to understand what was going on there.

This was an original 400 by 400 model with 1.6 million weights.

A new version has gone from 1.6 million to 280,000,

roughly a sixth and roughly a sixth of the training time.

So you can see we're down to just 299 input neurons now.

If you're confused why tail number,

created so many input neurons this is called One Hot Encoding.

I think we might have covered it in week one,

but basically when you have a categorical input to either Deep Learning or GLM,

it creates one input for each possible value and all of them will be

set to zero except the category of that particular record.

So we've looked at quite a few things in this set of videos.

We've looked to how to fiddle with a number of neurons and the number of layers.

And H2O make that really easy,

you just set hidden as a list.

And we've seen that we should be paying attention to how many input neurons we have.

I'm perhaps excluding some data if we don't think it's going to be that useful.