The value of a weight vector is given as (w1=3, w2=-2, w0=1) for a linear model with soft threshold (sigmoid) function f(x).
Define a decision boundary, where the values of the feature vector x result in f(x)=0.5. Plot the decision boundary in two dimensions.

Respuesta :

Answer:

Please see explanation for the answer. The code is written in python and is as given below:

Step-by-step explanation:

The solution is obtained on the Python with the following code

import matplotlib.pyplot as plotter

import numpy as npy

x_s = npy.linspace(-5,5,100)  #Defining a linear sample space with boundaries as -5 to 5 and 100 as number of samples.

def sigmo(z):return 1/(1 + npy.exp(-z)) #Defining sigmoid function for the f(x).

plotter.plot(x_s, sigmo(x_s))

plotter.plot([-5,5],[.5,.5])

plotter.xlabel("z")

plotter.ylabel("sigmoid(z)")

plotter.show()

Ver imagen danialamin