# Can a neuron have both a bias and a threshold?

I have not seen a neuron that uses both a bias and a threshold. Why is this?

• I'm unsure about what this question is asking. Could you clarify and provide some context? – Philip Raeisghasem Apr 6 '19 at 4:41
• i have seen that if we set bias in activation function then we don't have to set threshold value, one of them will be use in activation function. is this necessary in every case or there is any specific reason for that? – hina munir Apr 6 '19 at 6:26
• I did my best interpreting and answering your question. Please let me know if I understood you correctly. – Philip Raeisghasem Apr 6 '19 at 7:23

I assume you're talking about a perceptron threshold function. One definition of it with an explicit threshold is $$f(\textbf{x})= \begin{cases} 1& \text{if } \textbf{w}\cdot\textbf{x} > t\\ 0& \text{otherwise} \end{cases}.$$
Another form with a bias is $$f(\textbf{x})= \begin{cases} 1& \text{if } \textbf{w}\cdot\textbf{x} + b > 0\\ 0& \text{otherwise} \end{cases}.$$
But these forms are of course equivalent if you set $$b=-t$$.
There's nothing stopping you from using a perceptron definition with both a bias and a threshold: $$f(\textbf{x})= \begin{cases} 1& \text{if } \textbf{w}\cdot\textbf{x} +b > t\\ 0& \text{otherwise} \end{cases}.$$
But this is also equivalent to the other two forms. We can rewrite this as $$f(\textbf{x})= \begin{cases} 1& \text{if } \textbf{w}\cdot\textbf{x} > t'\\ 0& \text{otherwise} \end{cases}$$ where $$t'=t-b$$ is the new threshold. Or, we could rewrite it as $$f(\textbf{x})= \begin{cases} 1& \text{if } \textbf{w}\cdot\textbf{x} + a> 0\\ 0& \text{otherwise} \end{cases}$$ where $$a=b-t$$ is the new bias.