Applying the logistic function

Report a typo

Let's say that you have weights for a logistic regression model w=(0.8,4,3)\vec{w}=(0.8, 4, -3) and one observation x=(10,2,0.2)\vec{x}=(10, -2, 0.2 ). The set of class labels is 00, which means cat, and 11, which means dog.

The logistic function has the following parameters: L=1,k=2,x0=0L = 1, k=2, x_0=0. The cut-off point equals 0.50.5.

Your task is to predict the class label of the given observation. As an answer provide the probability of belonging to that class (either Pr(y=0x)Pr(y=0|\vec{x}), or Pr(y=1x)Pr(y=1|\vec{x}). Round the answer to the second decimal place. For example, if your answer is 0.34790.3479, you write 0.350.35.

Tip: Recall the logistic function f(x)=L1+ek(xx0)f(x) = \frac{L}{1+e^{-k(x-x_0)}} and the fact that substituting x\vec{x} into f(x)f(x) returns the probability of belonging to class 11. The probability of belonging to class 0 is 1 - the probability of belonging to class 11.

Enter a number
___

Create a free account to access the full topic