Code Monkey home page Code Monkey logo

decompositionanalysis's Introduction

Decomposition Analysis

Introduction

Matrix decomposition methods, such as LU, QR, and Cholesky, play a pivotal role in various computational tasks, offering distinct approaches to break down matrices into simpler components. In this study, we investigate the computational efficiency of these methods by analyzing the average time required to decompose a matrix of size n. The aim is to discern the relative performance of LU, QR, and Cholesky decompositions

Methods

LU, QR, and Cholesky decomposition methods were implemented in C++ using the Eigen library. The average time needed to decompose a matrix of size n was determined by averaging the time required to decompose m randomly generated matrices of size n. The decomposition time for each matrix was measured using the chrono library.

Libraries

  • Numpy
  • timeit
  • matplotlib
  • csv

Results

The average time required to decompose a matrix of size 1000 was calculated for n = 10. The results are shown in the table below.

Method Average Time (ns)
LU 873,782.4 ms
QR 1,777,414.2 ms
Cholesky 447,938.2 ms

Ratio LU:QR:CL = 2 : 4 : 1

Terminal

Conclusion

In the obtained results, it's evident that the Cholesky decomposition method exhibits the highest speed, followed by the LU decomposition method, and finally, the QR decomposition method. Interestingly, the results highlight that the QR decomposition method is twice as slow as the LU decomposition and four times slower than the Cholesky decomposition methods.

decompositionanalysis's People

Contributors

itstatsuya avatar

Watchers

 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.