Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • adaptive adaptive
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 36
    • Issues 36
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Quantum TinkererQuantum Tinkerer
  • adaptiveadaptive
  • Merge requests
  • !127

Resolve "(LearnerND) allow any convex hull as domain"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jorn Hoofwijk requested to merge 114--learnerND-convex-hull into master Oct 15, 2018
  • Overview 12
  • Commits 3
  • Pipelines 14
  • Changes 3

Closes #114 (closed)

Works especially well when combined with !124 (merged)

usage:

import scipy
import adaptive
adaptive.notebook_extension()

def f(xyz):
    x, y, z = xyz
    return x**4 + y**4 + z**4 - (x**2+y**2+z**2)**2

b = [(-1, -1, -1),
     (-1,  1, -1),
     (-1, -1,  1),
     (-1,  1,  1),
     ( 1,  1, -1),
     ( 1, -1, -1)]

bounds = scipy.spatial.ConvexHull(b)
learner = adaptive.LearnerND(f, bounds)
runner = adaptive.Runner(learner, goal=lambda l:l.npoints>1000)
runner.live_info()

Now, if you indeed also have !124 (merged) at your disposal, you are able to run something like this:

learner.plot_isosurface(-0.5)

in order to get this:

image

otherwise you could run:

learner.plot_slice({1:0})

to get this:

image

Edited Oct 15, 2018 by Jorn Hoofwijk
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 114--learnerND-convex-hull