Share via


Artificial Neural Networks with Azure ML Studio

Introduction

When asked a few times about artificial neural networks with Azure ML studio, I said let me leave the order and create an introduction. In this article, I will not talk about what artificial neural networks and deep learning are, and I will prepare an article about coding it from scratch with C #, and it is possible to find the basic concepts almost everywhere.

I will continue with the data that I have been working on frequently these days. California house prices. You can be obtained from the address. But how do we import it into Azure ML Studio after getting it? The first might be copy and paste logic as we did in the previous examples. But since we will work more with this dataset, it is useful to have it at hand. To load this data into AMLS (I will shorten Azure ML Studio like this), we come to the "Datasets" section and press the huge "new" button.

Description

You can upload directly in ZIP format, as uploading large files takes a long time. In this case, it will be sufficient to perform UNZIP operation on the experiment board to use the file. Then, as usual, we start a new experiment and drop the dataset on the canvas. After that, we make the appearance of the whole canvas as follows. Of course you will be more organized than me. Convert to Indicator Values module separates our categorical variables into columns and sets the value of the relevant column to 1 in rows that have this value, and 0 for those that do not. This is also called "One Hot Encoding". For example, a single column such as "gender" will be divided into two columns as "female" and "male" and will take the values ​​0 and 1 for a female one in the same order. This is because there is no mathematical or distance relationship between being a man and a woman. We don't want the algorithm to be affected by this.

Apply Math Operation as the name suggests, the module is used to apply a mathematical operation to a column. So why are we using this? Since NN Regression in Azure ML Studio does not normalize on the tag column, it always produces the same value at high values. To prevent this, we can normalize this column, but in this case, we have difficulty in restoring the output. For this, we take care of this process by subtracting the smallest value and dividing it by (the largest value - the smallest value). When we create a web service for the model, it will be enough to do the opposite and multiply.

Trainer Mode can be set as Multi Parameter for automatic improvement, we will proceed as Single Parameter in our example .

Hidden layer specification Asks for the type of hidden layer. For classical artificial neural networks, it is enough to say Fully-connected case . In this case, a classical structure with a single hidden layer will be created. In the second option, custom , we have the opportunity to model the entire neural network. Deep webs, image processing, etc. will be done from here. There is no visual tool for identification here. We will use the Net # language.

Number of hidden nodes In the classical structure with a single hidden layer, we determine how many parts the hidden layer consists of.

Learning rate We can say that the required step gap for the learning process. If we keep it wide, we can get away from the best value. If we keep it too small, it will take more time and we may get stuck with a value that is not actually the best value.

Number of learning iterations Indicates how many rounds of improvement will be done. It is useful to keep it low in the first results and then high.

The initial learning weights diameter We set the initial values ​​of the weights here.

The Momentum is a value that saves us from being stuck at an incorrect value while approaching the result step by step. We give a value between 0 and 1. You can cure it by trial and error.

Conclusion

The type of normalizer The method to be used for normalizing attributes. I mentioned above that the label is not normalized. We do that process ourselves. Let's take a look at my success when we do all these operations.

I hope it helps .......