{"id":19769713,"url":"https://github.com/mlysy/projplot","last_synced_at":"2025-08-08T08:54:29.264Z","repository":{"id":38619894,"uuid":"452119958","full_name":"mlysy/projplot","owner":"mlysy","description":"Utilities for creating projection plots","archived":false,"fork":false,"pushed_at":"2022-11-15T04:18:10.000Z","size":662,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-31T11:30:36.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://projplot.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlysy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-26T02:51:57.000Z","updated_at":"2025-01-25T17:02:01.000Z","dependencies_parsed_at":"2023-01-21T02:03:46.674Z","dependency_job_id":null,"html_url":"https://github.com/mlysy/projplot","commit_stats":null,"previous_names":["kanikadchopra/projplot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlysy/projplot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlysy%2Fprojplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlysy%2Fprojplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlysy%2Fprojplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlysy%2Fprojplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlysy","download_url":"https://codeload.github.com/mlysy/projplot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlysy%2Fprojplot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269393676,"owners_count":24409756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T04:44:36.659Z","updated_at":"2025-08-08T08:54:29.212Z","avatar_url":"https://github.com/mlysy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **projplot**: Utilities for Creating Projection Plots\n\n**projplot** provides a set of tools to assess whether or not an optimization algorithm has converged to a local optimum.  Its main function does this by visualizing the \"projection plots\" of the objective function `f(x)` -- that is, by plotting `f` against each coordinate of `x` with the other coordinates fixed at the corresponding elements of the candidate optimal solution `x_opt`.  \n\nThis package has a similar goal to the R package [**optimCheck**](https://github.com/mlysy/optimCheck).\n\n## Installation\n\nThis package is available on [PyPi](https://pypi.org/project/projplot/) and can be installed as follows:\n\n```bash\npip install projplot\n```\n\n## Documentation\n\nAvailable on [Read the Docs](http://projplot.readthedocs.io/).\n\n## Example\n\nAn overview of the package functionality is illustrated with the following example. Let `f(x) = x^TAx - 2b^Tx` denote a quadratic objective function in `x`, which is in the d-dimensional real space. If `A` is a positive-definite `d x d` matrix, then the unique minimum of `f(x)` is `x_opt =A^{-1}b`. \n\nFor example, suppose we have\n\n```python\nimport numpy as np\n\nA = np.array([[3., 2.],\n              [2., 7.]])\nb = np.array([1., 10.])\n```\n\nThen we have that the optimal solution is `x_opt = (-0.765, 1.647)`. Now, **projplot** allows us to complete a visual check. The following information will need to be provided:\n\n* The objective function (`obj_fun`): This can be either a vectorized or non-vectorized function. \n*  Optimal values (`x_opt`): This will be the optimal solution for your function. \n*  Upper and lower bounds for each parameter (`x_lims`): This will provide an initial range of values to observe.\n*  Parameter names (`x_names`): These are the names of your parameters, i.e. theta, mu, sigma\n*  The number of points to plot for each parameter (`n_pts`): This is the number of points that each parameter will be evaluated at for their respective plot. \n\n```python\n# Optimal values\nx_opt = np.array([-0.765,  1.647])\n\n# Upper and lower bounds for each component of x\nx_lims = np.array([[-3., 1], [0, 4]])\n\n# Parameter names\nx_names = [\"x1\", \"x2\"]\n\n# Number of evaluation points per coordinate\nn_pts = 10\n\nimport projplot as pjp\n\ndef obj_fun(x):\n    '''Compute x'Ax - 2b'x.'''\n    y = np.dot(np.dot(x.T, A), x) - 2 * np.dot(b, x)\n    return y\n\n# Obtain plots with vertical x lines\npjp.proj_plot(obj_fun, x_opt=x_opt, x_lims=x_lims,\n              x_names=x_names, n_pts=n_pts,\n              opt_vlines=True)\n```\n\n![alt](docs/images/plot_vlines.png)\n\n### Further Reading\n\nSee documentation for [advanced use cases](https://projplot.readthedocs.io/en/latest/example.html#advanced-use-cases) and an [FAQ](https://projplot.readthedocs.io/en/latest/faq.html).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlysy%2Fprojplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlysy%2Fprojplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlysy%2Fprojplot/lists"}