[fix] overcome numerical instabilities
due to the usage of large absolute values (timestamp) on time axis the estimation of the expectation value gets instable
This commit is contained in:
		
							parent
							
								
									4480854ee5
								
							
						
					
					
						commit
						3705eb567b
					
				| @ -256,9 +256,10 @@ class ProbabilityDensityFunction(object): | ||||
|         ''' | ||||
| 
 | ||||
|         rval = 0 | ||||
|         for n, x in enumerate(self.axis): | ||||
|         axis = self.axis - self.x0 | ||||
|         for n, x in enumerate(axis): | ||||
|             rval += x * self.data[n] | ||||
|         return rval * self.incr | ||||
|         return rval * self.incr + self.x0 | ||||
| 
 | ||||
|     def standard_deviation(self): | ||||
|         mu = self.expectation() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user