Skip to content

M_maker#1

Open
goldrups wants to merge 725 commits into
erikhparkinson:masterfrom
goldrups:master
Open

M_maker#1
goldrups wants to merge 725 commits into
erikhparkinson:masterfrom
goldrups:master

Conversation

@goldrups

Copy link
Copy Markdown

Basic Documentation:


inputs: function, a (ndarray of lower bounds for interval), b (ndarray of upper bounds for interval), guess_deg (what a guess of the best degree is (the code will double it if needed)

List of attributes for any M_maker object you make:
M (the approximation), f, a, b, dim, deg, err (error), rel_approx_tol, abs_approx_tol, inf_norm, M2 (approximation of double degree), M_rescaled (approximation rescaled by inf_norm), values_block(evaluation of approximating polynomial at the Chebyshev critical points), memo_dict (used to calculate values_block via memorization)

Example:
g = lambda x,y: (x-.9999)2 + y2-1
g_deg = 2
a,b = np.array([-1,-1]),np.array([1,1])
g_approx = M_maker(g,a,b,g_deg)

LukasErekson and others added 30 commits May 11, 2020 12:39
Functional Changes:
------------------
- Changed the default target_tol parameter to 1.e-15.
- Added use of get_abs_approx_tol to also update target_tol as needed.
- Updated get_abs_approx_tol method to avoid updating passed in
  parameters a,b when finding a new interval of length 2*linearization.
- Re-organized the if, elif, else statements in subdivsion_solve_nd
  to avoid running the linear solver without having a sufficiently
  accurate (according to target_tol) approximation.

Cosmetic Changes:
----------------
- Added target_tol description to the docstring of suddivision.solve,
- Added spaces to comments without spaces after '#'.
- Updated documentation in several areas, removing typos and adding more
  accurate descriptors of what the code is doing.
- Made more explicit that in 1D the target_deg is the same as deg.
* draft of inteval check edits

* Fixing up quadratic checks

* updated unit tests, fixed small bug
- Fixed a bug when determining a good_deg. The line np.isclose now uses our
  default absolute and relative tolerances.
- Implemented sign_change in 1D. If there is a sign change, skip the checks.
  If there isn't a sign change, run the checks.
… arrays have overhead to set up, so regular lists and math library functions are cheaper than very small arrays. Also eval_func was expensive, so speeding it up and reducing the number of calls to it helped a lot.
- Implemented sign change check for 1D case
- Implemented sign change check for 2D case
- Implemented the nd sign change check, but it appears that it slows the code
  down more than it gives any benefit in timing/accuracy. It appears to take
  (normal time spent in interval_approximage_nd) * dimension for dim >= 2, so
  as the dimension increases, the slowdown becomes more and more a problem.
- Added jit handle to transform to speed it up
- Removed the loop from get_abs_approx_tol so that it only samples once.
  So far, tests have shown that it performs comparably to looping in terms
  of accuracy, but speeds it up by a factor ~5.
goldrups and others added 30 commits October 4, 2022 17:43
…olverUpdates

Erik subdivision solver updates
…, current vision of test code (not yet automated), tested version of Combined Solver
Merges my Combined Solver changes, test code, and approximator to be up to date with Erik's new subdivision solver.
Add new Combined_Solver to codebase
Creating Pull Request to pull in Erik's edits to the Numba portion of the code
Merging Exact_option into erik_subdivision
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.