Posts

Showing posts from January, 2019

Neural Network explained

Week 4 & 5 of the Machine Learning course delve into Neural Network Model. A Neuron Model contains a logistic unit that produces output based on the given inputs. Typically, a bias unit is included and it is set to 1. Note that the hypothesis used is based on the Logistic Regression Model. The  Neural Network Model consists of "Input" layer, "Hidden" layer and "Output" layer. "Input" layer Number of nodes = Number of features "Hidden" layer It is made up of 1 or more "Activation" units. "Output" layer Number of nodes = Number of classes More "Hidden" layers can be added to achieve better results. However, this results in higher computational costs. Random initialization is necessary for the initial value of theta (i.e. the "weights" of a specific "Activation" unit for each input). This breaks the symmetry of the matrix so that all the values of the "Activa...

Logistic Regression Model for classification problem

Week 3 of the Machine Learning course, we learnt about Logistic Regression Model . Classification problems can be binary or multi-class. A decision boundary that can be either linear or non-linear is used to classify the inputs of such problem. For the multi-class classification, we can use "1 versus all" method that choose one class and then lump others into a second class then apply binary logistic regression to each case until a minimum value is achieved.  Tip: Don't use linear regression for the classification problem as it may give hypothesis that exceed the range. Instead, use Logistic Regression Model that uses sigmoid / logistic function that always produce hypothesis between 0 and 1.  The hypothesis produced by  Logistic Regression Model is always in terms of probability of the inputs being in a specific class while the hypothesis produced by linear regression is based on an output value (e.g. price of housing property). Hence, Cost function in...