# Minimal example - part 1

/ / درس 1

### توضیح مختصر

• زمان مطالعه 0 دقیقه
• سطح خیلی سخت

### دانلود اپلیکیشن «زوم»

این درس را می‌توانید به بهترین شکل و با امکانات عالی در اپلیکیشن «زوم» بخوانید

### متن انگلیسی درس

Okay great it is time to create our first machine learning algorithm we will build the model and we

will feed it with inputs what we expect from the algorithm is to learn the underlying relationship of

the data.

Here’s how we are going to approach the problem.

First we will import the relevant Python libraries for the problem at hand.

Second we will generate random data to train with.

We have decided to make this example with random data as rerunning the code will always yield different

inputs.

However the model will remain the same in this way.

You can see the same methodology applied for a potentially infinite number of data sets as this simple

example is the basis for more sophisticated machine learning algorithms.

It is more important to see how it works and prove that it works than aquire deep insights.

We will leave the wow effect for a bit later when we deal with deep learning.

Third we will create the targets.

These are the correct values in our apartment example.

They would be the actual prices properties have.

Essentially we will use big targets to be sure there is a linear relationship.

In this way when we train the algorithm we will be certain about the dependence it has to learn.

That’s a good way to prove the optimization is actually working.

We know where we want to get by creating fake targets which we would like the algorithm to figure on

its own.

If it does that then we can be certain it works.

Fourth we will plot the training data so you can visually see it.

This is the preparation phase of the lesson in the second part.

We will define the variables we need.

We must create wait’s biases and set a learning rate at the end.

We will conclude with an actual regression along the way each line of code will be explained to make

sure everything is understood.

Let’s begin the relevant Python libraries are no PI and map plot lib pipeline oper generally no pie

contains all the mathematical operations you will need.

Moreover it is extremely fast for these two reasons.

It is heavily used in data science.

Let’s import pi as p which is the conventional approach.

Map plot lib is a library used for plotting data.

It’s module pipeline provides a nice interface and requires very few arguments.

It is helpful when plotting data let’s import map plot lived up PI plot as BLT again.

That’s the convention.

Finally I will also import the axis 3D module from NPL toolkits and plot three-D as it provides us with

the ability to create 3D graphs.

This is the tool we’ll use to visualize the operations we’re carrying out Pipeline and access three-D

are not essential for the machine learning algorithm.

They will just provide us with good looking plots of our data.

This will provide us with an intuition of what’s going on there.

Anyhow numpad is sufficient creating a nice algorithm on its own.

OK this will do for now.

See you in our next lesson.

### مشارکت کنندگان در این صفحه

تا کنون فردی در بازسازی این صفحه مشارکت نداشته است.

🖊 شما نیز می‌توانید برای مشارکت در ترجمه‌ی این صفحه یا اصلاح متن انگلیسی، به این لینک مراجعه بفرمایید.