A Python statistics library featuring a Kalman Filter, Kalman Smoother, and EM algorithm.
Questions tagged [pykalman]
53 questions
42
votes
2 answers
How to use Kalman filter in Python for location data?
[EDIT]
The answer by @Claudio gives me a really good tip on how to filter out outliers. I do want to start using a Kalman filter on my data though. So I changed the example data below so that it has subtle variation noise which are not so extreme…

kramer65
- 50,427
- 120
- 308
- 488
17
votes
1 answer
Using PyKalman on Raw Acceleration Data to Calculate Position
This is my first question on Stackoverflow, so I apologize if I word it poorly. I am writing code to take raw acceleration data from an IMU and then integrate it to update the position of an object. Currently this code takes a new accelerometer…

Alex
- 195
- 1
- 1
- 7
10
votes
1 answer
Kalman filter with varying timesteps
I have some data that represents the location of an object measured from two different sensors. So, I need to do sensor fusion. The more difficult issue is that the data from each sensor, arrives at essentially a random time. I would like to use…

Adam
- 742
- 1
- 6
- 23
5
votes
1 answer
Getting 3D Position Coordinates from an IMU Sensor on Python
I am planning to acquire position in 3D cartesian coordinates from an IMU (Inertial Sensor) containing Accelerometer and Gyroscope. I'm using this to track the objects position and trajectory in 3D.
1- From my limited knowledge I was under the…

Osama_Robotics
- 53
- 1
- 4
4
votes
2 answers
OpenCV Kalman Filter python
Can anyone provide me a sample code or some sort of example of Kalman filter implementation in python 2.7 and openCV 2.4.13
I want to implement it in a video to track a person but, I don't have any reference to learn and I couldn't find any python…

Shubham Kumar
- 49
- 1
- 1
- 9
4
votes
2 answers
How to run pykalman Kalman Filter on a single observation? (python)
I can run the simple pykalman Kalman Filter example given in the pykalman documentation:
import pykalman
import numpy as np
kf = pykalman.KalmanFilter(transition_matrices = [[1, 1], [0, 1]], observation_matrices = [[0.1, 0.5], [-0.3,…

chutney
- 157
- 3
- 9
3
votes
0 answers
Kalman Filter for non-linear systems
I wanted to use Kalman Filter for my experiment. I have created a very small time series data ready with three columns formatted as follows. The full dataset is attached here for reproduciability since I can't attach a file on stackoverflow:…
user10553396
3
votes
2 answers
Plot a derivative of a time series with a smoothed look in Python
I have a long pandas time series like this:
2017-11-27 16:19:00 120.0
2017-11-30 02:40:35 373.4
2017-11-30 02:40:42 624.5
2017-12-01 14:15:31 871.8
2017-12-01 14:15:33 1120.0
2017-12-07 21:07:04 1372.2
2017-12-08 06:11:50 …

SPS
- 465
- 9
- 23
3
votes
1 answer
pykalman: (default) handling of missing values
I am using the KalmanFilter from the pykalman module and was wondering how it deals with missing observations. According to the documentation:
In real world systems, it is common to have sensors occasionally fail.
The Kalman Filter, Kalman…

eternity1
- 651
- 2
- 15
- 31
3
votes
0 answers
How to fit Kalman filter with control variables in python
I would like to use Kalman filter to fit my data and make predictions. My data contains control variables, so for example it may look like:
U = [[1,2,3], [4,5,6], [7,8,9]]
X = [1,4,7]
Where U are the control variables and X are the observations for…

Miriam Farber
- 18,986
- 14
- 61
- 76
3
votes
1 answer
How to get standard deviation using PyKalman?
Having one dimensional measurement data I would like to know state standard deviations at each point using Kalman filter. My procedure is as follows:
from pykalman import KalmanFilter
import numpy as np
measurements = np.asarray([2, 1, 3, 6, 3, 2,…

Joe
- 283
- 2
- 3
- 11
2
votes
1 answer
Scipy "masked arrays are not supported" error
I am trying to calibrate a model using pykalman and the scipy optimiser. For some reasons scipy seem to think that my input is a masked array, but it is not. I have added the code below:
k = 0.00000000000001 #small sarting value
T =…

gte
- 131
- 8
2
votes
1 answer
Multiple regression with pykalman?
I'm looking for a way to generalize regression using pykalman from 1 to N regressors. We will not bother about online regression initially - I just want a toy example to set up the Kalman filter for 2 regressors instead of 1, i.e. Y = c1 * x1 + c2 *…

Pman70
- 143
- 3
- 11
2
votes
0 answers
How to use Kalman filter model in detecting peaks
For my evaluation, I wanted to use PyKalman filter library. I have created a very small time series data ready with three columns formatted as follows. The full dataset is attached here for reproduciability since I can't attach a file on…
user10553396
2
votes
0 answers
Pykalman AdditiveUnscentedKalmanFilter Initialization
I am attempting to use the AdditiveUnscentedKalman filter from pykalman. I am given noisy x,y values, and I am trying to get the x,y,xdot,ydot out of the filter.
I am getting values out of the filter, but it is not what I expect.
State: [[…

user2370508
- 21
- 2