Skip to content

add rank-1 update of Cholesky decomposition#14

Open
AndersonYin wants to merge 2 commits intorust-ml:mainfrom
AndersonYin:main
Open

add rank-1 update of Cholesky decomposition#14
AndersonYin wants to merge 2 commits intorust-ml:mainfrom
AndersonYin:main

Conversation

@AndersonYin
Copy link
Copy Markdown

I've implemented the rank-one update of Cholesky decomposition following the paper (Krause & Igel, 2015).

references: Krause, O., & Igel, C. (2015, January). A more efficient rank-one covariance matrix update for evolution strategies. In Proceedings of the 2015 ACM Conference on Foundations of Genetic Algorithms XIII (pp. 129-136).

Comment thread src/cholesky_update.rs
Comment on lines +4 to +6
pub trait CholeskyUpdate<F> {
fn cholesky_update_inplace(&mut self, update_vector: &Array1<F>);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add documentation to this trait?

Comment thread src/cholesky_update.rs
let mut w=update_vector.to_owned();
let mut b=F::from(1.0).unwrap();
for j in 0..n{
let ljj=self[(j,j)];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For indexing, use the traits in index.rs, which are faster in release mode.

@YuhanLiin
Copy link
Copy Markdown
Collaborator

Can you merge cholesky_inplace.rs into cholesky.rs? They seem to be related algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants