Este vídeo pertenece al curso Künstliche Intelligenz und Maschinelles Lernen in der Praxis de openHPI. ¿Quiere ver más?
An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.
Scroll to current position
- 00:00After we have just had a good image about our data, we can
- 00:04now in this unit finally build our first AI model.
- 00:08And the first thing we do is, what do we do? is the data we just need to
- 00:14to bring into an AI format.
- 00:16So let's look at our data again then we see our different attributes,
- 00:21Longitude, Latitude and even also the Ocean Proximity.
- 00:27Now we just need to know that many AI models can only work on numerical data,
- 00:34for example, only count on numbers. What is relatively common, considering that
- 00:39many of these models simply formulas exist and one is relatively difficult
- 00:44categories.
- 00:46That is why we must now consider how we get the data in a suitable AI format.
- 00:52But that is actually relatively simple. What we can do for it is
- 00:56one-hot encodings must be calculated, also one-hot transformations.
- 01:01And that's relatively simple. by simply saying that we
- 01:05Transform categories into binary vectors.
- 01:09That means, for example, that we have a category close to the sea, then from this category
- 01:16in our data a column where we say category close to the sea is true or not true.
- 01:24So make it quasi a binary attribute.
- 01:28It's easy here too.
- 01:29because it's such a typical transformation. We don't have to reinvent this completely.
- 01:35You can also again use pandas for.
- 01:37So we notice pandas offers really a variety of features that we keep
- 01:42and the already for us.
- 01:45Why it's so easy in part is popular, just how easy it is for us
- 01:49reuse.
- 01:50And this function that we have here from Pandas , is called get dummies, meaning dummy values.
- 01:56That's exactly what we can do with our data exactly transform into the one-hot encoding.
- 02:02It's also always there It was incredibly fast.
- 02:07Right, let's just look at it Let me show you what it looks like now.
- 02:10So we had the attribute ocean before Proximity, and we had four more
- 02:17expressions, namely less than one hour Ocean, Inland, near Bay and near Ocean.
- 02:23And now we don't have any more Category, but we now have four attributes.
- 02:27And they're just represented as binary.
- 02:30So 1 stands for yes, the value comes before and 0 means no, it doesn't appear.
- 02:37Exactly, our AI model then work well later.
- 02:43What's still going to have to do is make this data Frame, that is to prepare our data structure in this way,
- 02:49or to serve us in this way that we also enter input data and target data
- 02:55So we want our model. training on something so that it can learn well.
- 03:00We can do this very simply by again a very simple help function
- 03:04, which are ultimately from our dataframe into the input matrix, that's what we know.
- 03:12So that's where we put that. Want to train the model.
- 03:14And that's all up to on the median house value because
- 03:17That is exactly what we want to predict. And as a target vector, that is, what we call the model
- 03:25, but what it will not be at runtime , but only for the training data
- 03:29are the actual median house values, So, what the model learns is our labels.
- 03:37And we define this function for ourselves.
- 03:39then on our data.
- 03:43Yes, so now have input matrix and target vectors for both training failures and test cases.
- 03:51And we are now ready to finally build our first AI model.
- 03:55And that's what we're doing now.
- 03:58And more than that It's actually not at all.
- 04:01That is, when we do the execution, we have right now our first AI model
- 04:09built for this course and already trained.
- 04:11So it went really, really easy. we can use this model now
- 04:18for forecasts. Of course, you can also I'm going to do a bunch of other stuff here.
- 04:22So there are other models or hyper parameters, but in and of itself that would be
- 04:28for example, a useful Machine learning model.
- 04:31What we simply emphasize again just want it to be in such a
- 04:36AI project often simply stops at it It's important to understand the data well.
- 04:39Even if it is somehow a highly modern is an AI algorithm, i.e.
- 04:43artificial neural network, you should Actually never just without the data
- 04:48to have looked at this model and train on it and ultimately this
- 04:55Training is often done relatively quickly.
- 04:56But just when you know what the data is for example, you have an approximate
- 05:01understanding, usually you are much better can actually work with the models.
- 05:05And we'll also have different View other models in the course.
- 05:09So don't worry, we'll still The whole bandwidth is looking at us.
- 05:14But now for this first project we have We just decided to do it.
- 05:18simple model to use and look at us then add more models later.
- 05:23Right, and now we want to move on to the next Watch video once, how good this model then
- 05:29finally performs and whether we do want to use or theoretically still further
- 05:35on our data.
- 05:36So let's look at that in the next video.
To enable the transcript, please select a language in the video player settings menu.
Sobre este vídeo
- Auf GitHub haben wir alle Materialien für die praktischen Einheiten zusammengefasst und für Sie aufbereitet.