Skip to content

Conversation

rcurtin
Copy link
Member

@rcurtin rcurtin commented Aug 28, 2024

I documented the RADICAL algorithm for ICA. This one actually turned out to be very easy to do. Changes:

  • Deprecated Radical::DoRadical() in favor of the new Radical::Apply(), which matches classes like PCA and other transformations better.
  • Templatized Radical::Apply() so users can use dense floating-point matrix types.
  • Adapted tests to use other template types.
  • Moved auxiliary memory class members into the Radical::Apply() function directly.
  • Allowed automatic estimation of m parameter (like radical_main.cpp does).
  • Updated SEE_ALSO() links for all the bindings I could find to point to Markdown files instead of C++ source.

Copy link
Member

@shrit shrit left a comment

Choose a reason for hiding this comment

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

Looks, good it was easier to review compared to what I would have thought, I just left a couple of comments

Comment on lines +74 to +77
template<typename MatType = arma::mat>
[[deprecated("Will be removed in mlpack 5.0.0. Use Apply() instead.")]]
void DoRadical(const MatType& matX,
MatType& matY,
Copy link
Member

Choose a reason for hiding this comment

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

This should have been really old,

Comment on lines 116 to 122
template<typename MatType>
typename MatType::elem_type DoRadical2D(
const MatType& matX,
const size_t m,
MatType& perturbed, // auxiliary memory
MatType& candidate, // auxiliary memory
util::Timers& timers = IO::GetTimers());
Copy link
Member

Choose a reason for hiding this comment

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

Can we deprecate this one in favour of Apply2D? So we have an API compatibility, especially when we are in mlpack 5 no one will understand why we have Apply and DoRadical2D

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, that is a more consistent name. I don't consider DoRadical2D() a "public API" function, so it's ok to change. (For this reason I didn't document it.) So I just changed DoRadical2D() to Apply2D() in 6a2e9cb. 👍

Copy link
Member

@shrit shrit left a comment

Choose a reason for hiding this comment

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

looks good to me, the same things goes for github actions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Second approval provided automatically after 24 hours. 👍

@rcurtin
Copy link
Member Author

rcurtin commented Sep 11, 2024

The Windows build looks to be a spurious failure unrelated to RADICAL, so I will go ahead and merge. 🚀

@rcurtin rcurtin merged commit 140a878 into mlpack:master Sep 11, 2024
18 of 20 checks passed
@rcurtin rcurtin deleted the radical-doc branch September 11, 2024 13:45
This was referenced Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants