Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39CCF1013B for ; Mon, 15 Dec 2014 15:52:14 +0000 (UTC) Received: (qmail 59353 invoked by uid 500); 15 Dec 2014 15:52:14 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59273 invoked by uid 500); 15 Dec 2014 15:52:14 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 59262 invoked by uid 99); 15 Dec 2014 15:52:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2014 15:52:13 +0000 Date: Mon, 15 Dec 2014 15:52:13 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (MATH-1142) Kalman filter gain calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart resolved MATH-1142. ----------------------------------- Resolution: Fixed Fixed in commit d5f586bd4e1a20fc09a33aaa5c2b9320f4a2aa72. Thanks for the report! > Kalman filter gain calculation > ------------------------------ > > Key: MATH-1142 > URL: https://issues.apache.org/jira/browse/MATH-1142 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 3.3 > Reporter: Arne Schwarz > Priority: Minor > Labels: performance > Fix For: 3.4 > > Original Estimate: 1h > Remaining Estimate: 1h > > In the class KalmanFilter in the function correct(RealMatrix) the gain matrix currently is calculated via first calculating the inverse of the residual covariance matrix s. I think it would be more effective to calculate the gain by directly solving the linear system with an QR or Cholesky decomposition. > For example like this (maybe replace "Cholesky" by "QR"): > // calculate gain matrix > // K(k) = P(k)- * H' * (H * P(k)- * H' + R)^-1 > // K(k) = P(k)- * H' * S^-1 > // K(k) * S = P(k)- * H' > // S' * K(k)' = H * P(k)-' > RealMatrix kalmanGain = new CholeskyDecomposition(s).getSolver().solve(measurementMatrix.multiply(errorCovariance.transpose())).transpose(); -- This message was sent by Atlassian JIRA (v6.3.4#6332)