A Single Layer Perceptron for Regression: Part 6

 Error Resolved

The adjusted r-squared value was not working properly because the number of predictors passed to it in the epochs function was wrong. It was being passes the number of inputs instead of the number of predictors i.e. the number of rows instead of the number of columns.


New Function Added

  • add_bias:  This function adds the bias constant value to each row of the inputs.
    Parameters:  (1) inputs(numpy array (m,n)): All the predictors.
                         (2) bias_value(float) : The constant that the bias should be equal to. By default, its                                   value is 1.
                        

Next Step:

-  Extending this code so that multiple neurons/layers can be created.

Comments

Popular posts from this blog

What Data Structure Do I use?

A single layer Perceptron for Regression: Part 1