Giter Site home page Giter Site logo

rmadar / adctimeseriepca Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 2.0 13.16 MB

This code proposes to try to reduce correlation at large time, consequence of low frequency noise (known as flicker noise in electronics) using principal component analysis (PCA).

Python 45.99% Go 54.01%
pca-analysis jupyter-notebook temporal-data

adctimeseriepca's Introduction

Principal Component Analysis on ADC time serie

This code proposes to try to reduce correlation at large time, consequence of low frequency noise (known as flicker noise in electronics) using principal component analysis (PCA).

Presentation and motivation for a PCA

The final observable of interest is the averaged count over Ndim ADC count values and its precision (RMS). In case of no correlation, averaging over Ndim samples improve the RMS by a factor 1/sqrt(Ndim) with respect to RMS of single counts. However, due to correlation this gain is not observed and the goal of the PCA is remove this correlation to recover the expected precision gain in case of uncorrelated variables.

Algorithm application

The code analyzes time serie of 9 millions ADC counts and group the values in arrays of Ndim=1000. This sample of 9000 observations is split into two, one being used for the auto-correlation matrix and the other to test the decorrelation process. The PCA is then performed on 4500 Ndim vectors. Finally, the averaged is computed in the decorrelated space and its RMS is compared with the basic measurement for both training and testing samples.

Results

The figure below shows the correlation before PCA and after, as well as a scatter plot between first and fiftyth variables (ADC values before and PC after transformation).

PCA decorrelation

The figure below shows the ADC time serie, the coefficients in the original space of the 6th first principal components (PC), the explained RMS fraction for each PC and the comparison of the final observable. The two plots top-right and bottom-left show that we indeed have a low freqency noise since each PC seems to be harmonic (!) and the lowest frequency corresponds to the higher RMS.

PCA result

adctimeseriepca's People

Contributors

rmadar avatar sbinet avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.