Sparse Automatique Differentiation

버전 1.0.0.0 (36.6 KB) 작성자: martin de la gorce
Forward automatic differentiation using operator overloading and sparse jacobians
다운로드 수: 188
업데이트 날짜: 2023/1/29

This project implements a Matlab/ forward automatic differentiation method, (wikipedia definition https://en.wikipedia.org/wiki/Automatic_differentiation#Forward_accumulation) based on operator overloading. This does not provide backward mode. It enables precise and efficient computation of the Jacobian of a function. This contrasts with numerical differentiation (a.k.a finite differences) that is unprecise due to roundoff errors and that cannot exploit the sparsity of the derivatives.
In contrast with most existing automatic differentiation Matlab toolboxes:
1) Derivatives are represented as sparse matrices, which yield to large speedups when the Jacobian of the function - we aim to differentiate is sparse or when intermediate accumulated Jacobian matrices are sparse (see the image denoising example) .
2) N dimensional arrays are supported while many Matlab automatic differentiation toolboxes only support scalars, vectors and 2D matrices

It is likely that the speed could be improved by representing Jacobian matrices by their transpose, due to the way Matlab represents internally sparse matrices

a simple example using a 3D array:

>> f=@(x) sum(x.^2,3);
>> full(AutoDiffJacobianAutoDiff(f,ones(2,2,2)))
ans =

2.0000 0 0 0 2.0000 0 0 0
0 2.0000 0 0 0 2.0000 0 0
0 0 2.0000 0 0 0 2.0000 0
0 0 0 2.0000 0 0 0 2.0000

see the github page https://github.com/martinResearch/MatlabAutoDiff for more examples and a more detailed explaination

인용 양식

martin de la gorce (2024). Sparse Automatique Differentiation (https://github.com/martinResearch/MatlabAutoDiff), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Sparse Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.0.0

improve doc
adding example

updating example
changing name and improving description

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.