Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marginal diagnostics and optimizations #108

Merged
merged 22 commits into from
Sep 18, 2020

Conversation

AlexManochis
Copy link
Contributor

This PR contains:

  1. two new psrf for 1-dim distribution sampling
  2. Optimizations in rounding methods and inner ball computation
  3. Birkhoff polytope generator


return(P)

}
Copy link
Member

Choose a reason for hiding this comment

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

please add an empty line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

InnerBall = HP.ComputeInnerBall();
if (InnerBall.second < 0.0) throw Rcpp::exception("Unable to compute a feasible point.");
if (method_rcpp.compare(std::string("max_ellipsoid")) == 0) {
round_res = max_inscribed_ellipsoid_rounding<MT, VT>(HP, InnerBall);
Copy link
Member

Choose a reason for hiding this comment

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

Why InnerBall as input? The mentod needs an interior point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I have changed it. Thanks.

@@ -109,7 +109,7 @@ std::tuple<MT, VT, NT> min_sampling_covering_ellipsoid_rounding(Polytope &P,
T = T * L_1.transpose();

P.linear_transformIt(L_1.transpose());
P.normalize();
//P.normalize();
Copy link
Member

Choose a reason for hiding this comment

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

remove if it is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

P.linear_transformIt(round_mat);
P.normalize();
P.ComputeInnerBall();
//P.normalize();
Copy link
Member

Choose a reason for hiding this comment

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

remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

kind_gen = 7
m_gen = 0

Mat = poly_gen(kind_gen, FALSE, FALSE, n, m_gen)
Copy link
Member

Choose a reason for hiding this comment

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

is this working for any value of n? If not comment on it.

//' @export
// [[Rcpp::export]]
Rcpp::NumericVector psrf_univariate(Rcpp::NumericMatrix samples,
Rcpp::Nullable<std::string> method = R_NilValue)
Copy link
Member

Choose a reason for hiding this comment

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

indentation is wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@TolisChal TolisChal merged commit 375fa1f into GeomScale:develop Sep 18, 2020
@vissarion vissarion added this to the 1.1.2 milestone Sep 18, 2020
vissarion pushed a commit that referenced this pull request Oct 26, 2020
* improve implementations

* improve computation of inner ball for H-polytopes

* improve inner ball computation and improve tests

* update termination criterions in rounding methods

* update Rd file of Birkhoff R generator

* improve univariate psrf implemetations

* fix c++ tests

* update parameters in rounding and minor improvements

* fix gcc tests and improve birkhoff generator Rd file

* fix c++ tests

* improve R tests, remove ine and ext files

* fix c++ tests

* fix c++ tests for clang

* fix c++ tests

* merge and improve R examples

* change r tests and examples for inner_ball function

* improve R examples

* change priority in inner ball computation

* use only lpsolve for inner ball computation
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.

3 participants