Questions tagged [pykalman]

A Python statistics library featuring a Kalman Filter, Kalman Smoother, and EM algorithm.

Documentation

53 questions
0
votes
0 answers

Kalman Filter for 2D Array (Gridded Data) in Python

I've been having some difficulty understanding the Kalman Filter and how to implement it for a model I am designing. The model will predict a 2D array based off of several previous 2D arrays that are spaced out by 5-min increments. For example let's…
0
votes
1 answer

How to tune extended kalman filter on PyKalman?

I would like to correct some predicted vehicular variables: latitude, longitude, speed, heading and acceleration. Inside the following code, there are the values of those variables. There are 20 samples, the first 10 samples are the original data…
GoT GOt
  • 49
  • 1
  • 9
0
votes
0 answers

Spread generation from pykalman to kalmantv

Currently I am using pykalman KalmanFilter in a following manner to calculate spread in between 2 timeseries of closing prices: def KalmanFilterRegression(x,y): delta = 1e-3 trans_cov = delta / (1 - delta) * np.eye(2) # How much random walk…
mscbr
  • 1
  • 1
0
votes
0 answers

Use pykalman to predict gps gap values

Given this GPS dataset (sample.csv) from Beijing, I am trying to apply pyKalman so as to fill the gaps on the GPS series. The code I am using is taken from here: from pykalman import KalmanFilter import matplotlib.pyplot as plt import pandas as…
Thoth
  • 993
  • 12
  • 36
0
votes
0 answers

Multivariate Regression in Pykalman with Fixed Intercept and Compute R2 of Pykalman Regression

I am using the pykalman module to do the following regression: Y = b1 * x1 + b2 * x2 + intercept. I would like to keep the intercept constant for the entire regression. import matplotlib.pyplot as plt import numpy as np import pandas as…
bs92
  • 1
  • 1
0
votes
0 answers

Apply function from rolling window on multiple columns

I'm trying to calculate the rolling beta between two columns in a DataFrame. I explain myself, the beta (finance) classically answers the following formula: cov(asset_1, asset_2)/var(asset_2). For my case I want to calculate a rolling beta using a…
TLS
  • 25
  • 4
0
votes
1 answer

Applying kalman filtering for mobility tracking of users using GeoCordinates

I am trying to implement a simple kalman filter that will be used for tracking user movement using a set of geo-cordinates or place IDs from twitters tweet geo data. Essentially, I am working on calculating mobility patterns using Twitter data?…
0
votes
1 answer

kalman filter 2d with pykalman

I'm trying to use the kalman filter on a dataset of GPS data for noise reduction. For this I checked if there already is an online implementation and found pykalman. I'm trying to use it, but for some reason I'm not getting how i'm supposed to…
MartinS
  • 11
  • 5
0
votes
1 answer

Does Kalman Filter using pykalman on linear trends give correct answers?

I am trying to use KalmanFilter to estimate the mean value of a series but I was unable to find much information related to it for linear trends, so I was trying to use it to predict the values when the input is just a straight line with positive…
Zuj3brusu
  • 63
  • 8
0
votes
1 answer

Use pykalman to predict further steps on dynamic objects

I'm trying to use the Kalman Filter to predict the next object position. My data is composed of latitude and longitude each 1s, so, I also can get the velocity. The below code shows a trying of pykalman package to predict further positions. I just…
R2D2
  • 153
  • 2
  • 13
0
votes
1 answer

How to specify transition and observation matrices with Pykalman

Good afternoon to everyone! I am kind of new to the Kalman Filter, but I have came across this really interesting article (https://pdfs.semanticscholar.org/d348/37b8e535974c341d8c8a5c38666581e83309.pdf) about the possibility of using this filter in…
mbronzo
  • 11
  • 4
0
votes
1 answer

Implementing 1D kalman filter/smooth Python

I would like to test the Kalman filter to smoothen a set of data I have. Please note that the x-axis intervals are not equal. x = [1,10,22,35,40,51,59,72,85,90,100] y = [0.2,0.23,0.3,0.4,0.5,0.2,0.65,0.67,0.62,0.5,0.4] plt.plot(x,y, 'go-'); Where…
user88484
  • 1,249
  • 1
  • 13
  • 34
0
votes
0 answers

PyKalman's EM algorithm and the AR(I)MA state-space equations

I am using Python's PyKalman to run the Kalman filter based on the ARMA(p,q) model. The transition matrix should take a very particular form (see, for instance, page 374 of Hamilton's "Times Series Analysis" for the AR(p) example) with some ones and…
0
votes
1 answer

Use of pykalman

I want to try to use pykalman to apply a kalman filter to data from sensor variables. Now, I have a doubt with the data of the observations. In the example, the 3 observations are two variables measured in three instants of time or are 3 variables…
JuanRoa
  • 11
  • 2
  • 7
0
votes
0 answers

Filtering Magnetometer Heading with Kalman Filter

I am getting the magnetometer x and y magnitudes from my IMU sensor, and using these I am getting a heading by taking atan2(my, mx). However, I would like to implement a kalman filter in order to filter the heading. I was wondering what the…