Trying to build a model (y = 2x) with using Adaline algorithm

Yesterday, I tried to make a simple model that is supposed to return y=2x. But it didn't work like I expected. As I mentioned, It was not based on fundamentals. So I started to disassemble a code to find what makes what I didn't expect. And I found it.

input = np.array(np.linspace(0,5,100))
output = input*2

It was my kind of data set. It is just linear as the equation itself. The thing was the size of the input value. The greater input value you put into a model, The greater SSE is updated to weight as the amount of change. I don't know for sure that I can say it is over feedback? Anyway It was the factor that interrupts to make a right result. So I changed it smaller than before like

input = np.array(np.linspace(0,2,100))

y = 2x
As it shows, SSE is getting closer to zero and lines are getting closer to the target. This is the shape I looked forward to. So what is next? Next is linear with intercept. and I tried it as soon as I saw the graph above and I got,

y = 2x+2
Whatever I did, I couldn't raise it above. I felt I need to study the next level. It would be Linear regression.



Comments

Popular Posts