I am studying a ML course on Coursera and I am pulling out some old linear algebra concept that I am not using since the time of university.
I have some doubts. I have this MatLab\Octave function that calculates the values of a sigmoid function:
g = 1 ./ (1 + exp(-x));
Ok z could be:
A SCALAR value: for x=0 it returns 0,5 because in 2 dimension x=0 --> the sigmoid function will return y=0.5
g = 1 ./ (1 + exp(0)); g g = 0.50000A VECTOR:
>> x = [1 2 3] x = 1 2 3 >> g = 1 ./ (1 + exp(-x)); >> g g = 0.73106 0.88080 0.95257
Basically in this second example we are always in a 2 dimension example and I am calculating the values of Y in my the sigmoid function for 3 different values of X.
A MATRIX: here the situation changes because I have a matrix having multiple columns representing differnt features, to keep the example simple lets consider 2 features X1 and X2:
>> X = [1 2; 0 5] X = 1 2 0 5 >> g = 1 ./ (1 + exp(-X)); >> g g = 0.73106 0.88080 0.50000 0.99331
Here I am finding some difficultis trying to understand how exactly interpret this situation.
In this case I have a matrix having 2 columns (the features X1 and X2) so we are in a three-dimensional space, is it?
So the calculates values of g:
g =
0.73106 0.88080
0.50000 0.99331
the first column represent the values of the sigmoind function on the X1 axis and the second column represents the values of the sigmoid function on the X2 axis.
Is it or am I doing a big confusion?
If the previous reason is correct what it exaclty means? that this calculated g matrix reprents not mor a flat bidimensional sigmoid function but something like a three-dimensional function?