neighborhood

Neighborhood Algorithm Optimization and Ensemble Appraisal

https://github.com/keithfma/neighborhood

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary

Keywords

optimization python
Last synced: 6 months ago · JSON representation

Repository

Neighborhood Algorithm Optimization and Ensemble Appraisal

Basic Info
  • Host: GitHub
  • Owner: keithfma
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 424 KB
Statistics
  • Stars: 16
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
optimization python
Created almost 8 years ago · Last pushed almost 8 years ago
Metadata Files
Readme License

README.md

Neighborhood Algorithm Optimization and Ensemble Appraisal

Travis CI:

Current Release on PyPI

Python 3 implementation of "neighborhood algorithm" direct-search optimization and Bayesian ensemble appraisal. In short, a nearest-neighbor interpolant based on Voronoi polygons is used to interpolate the misfit (search) and posterior probability (appraisal) to allow efficient sampling and integration for high-dimensional problems. Details on theory and implementation are supplied in the references.

| Example search population for 4D Rosenbrock objective function | | :----: | | Example search population for 4D Rosenbrock objective function. Image include 10,000 samples collected in 1,000 iterations of the neighborhood algorithm direct search, with num_samp=10 and num_resamp=5. The true minimum is 0 at (1, 1, 1, 1), while best sample is 0.0113 at (0.976, 0.953, 0.908, 0.824). This result continues to converge for larger sample size (but the plot is less interesting since the density converges to a point!)|

To generate the example figure above, you can run the internal demo, like so: ```python import neighborhood as nbr

nbr.demo_search(ndim=4, nsamp=10, nresamp=5, niter=500) ```

Equivalently, you can do the following: ```python import neighborhood as nbr

numdim = 4 srch = nbr.Searcher( objective=nbr.rosenbrock, limits=[(-1.5, 1.5) for _ in range(numdim)], numsamp=10, numresamp=5, maximize=False, verbose=True ) srch.update(500) srch.plot() ```

Status

Optimization is implemented, ensemble appraisal is in progress.

Testing

This project uses pytest for unit testing. The aim is not to be exhuastive, but to provide reasonable assurances that everything works as advertised. To run, simply call pytest --verbose from somewhere in this package.

Release

Release versions are tagged in the repository, built as distributions, and uploaded to PyPI. The minimal commands to do this are:

```bash

update PyPI-readable README

pandoc --from=markdown --to=rst --output=README.rst README.md

build with setuptools

python3 setup.py sdist bdist_wheel

upload to PyPI test server (then check it out)

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

upload to PyPI

twine upload dist/*

tag release in git repo

git tag -a X.X.X -m "vX.X.X" git push origin --tags ```

For now, it is necessary to manually "clean up" README.rst. In the future, it looks like PyPI will render the markdown directly.

References

  1. Sambridge, M. (1999). Geophysical inversion with a neighbourhood algorithm - I. Searching a parameter space. Geophysical Journal International, 138(2), 479–494. http://doi.org/10.1046/j.1365-246X.1999.00876.x

  2. Sambridge, M. (1999). Geophysical inversion with a neighborhood algorithm - II. Appraising the ensemble. Geophys, J. Int., 138, 727–746. http://doi.org/10.1046/j.1365-246x.1999.00900.x

Owner

  • Name: Keith Ma
  • Login: keithfma
  • Kind: user
  • Location: Hanover, NH
  • Company: @indigo-ag

Software engineer and data scientist with expertise in machine learning and earth science.

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 51
  • Total Committers: 3
  • Avg Commits per committer: 17.0
  • Development Distribution Score (DDS): 0.196
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Keith Ma k****a@g****m 41
Keith Ma k****a@b****m 7
Keith Ma k****a 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 34 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: neighborhood

Neighborhood Algorithm Optimization and Ensemble Appraisal

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 34 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 14.8%
Forks count: 19.1%
Dependent repos count: 21.7%
Average: 23.0%
Downloads: 49.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • matplotlib *
  • numpy *
  • pandas *
  • pytest *
  • seaborn *