7 lines
		
	
	
	
		
			137 B
		
	
	
	
		
			Mathematica
		
	
	
	
	
	
		
		
			
		
	
	
			7 lines
		
	
	
	
		
			137 B
		
	
	
	
		
			Mathematica
		
	
	
	
	
	
| 
								 | 
							
								function g = sigmoid(z)
							 | 
						||
| 
								 | 
							
								%SIGMOID Compute sigmoid functoon
							 | 
						||
| 
								 | 
							
								%   J = SIGMOID(z) computes the sigmoid of z.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								g = 1.0 ./ (1.0 + exp(-z));
							 | 
						||
| 
								 | 
							
								end
							 |