I have this question to answer for a quiz and im at an impass. At first i couldnt figure out the E but now I cant figure out how to use a condition... This was the question:
4. Use cond and exp to define (activation type sum) which returns the activation value of a connectionist unit given a sum of products of input activations x corresponding connection weights. Include both ‘sigmoid and ‘asigmoid types of activation functions, and return ‘unknown-type if some other type is used as input.
I defined two functions for the asigmoid and sigmoid functions but have no idea how to put them together in an activation sum function
- Code: Select all
(defun sigmoid (x)
(- 0.5 (/ 1 (- 1 (exp x)))))
(defun asigmoid (x)
(/ 1 (- 1 (exp x))))