{ "info": { "author": "Avinash Kak", "author_email": "kak@purdue.edu", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": " \n\nConsult the module API page at \n\n https://engineering.purdue.edu/kak/distNonlinearLeastSquares/NonlinearLeastSquares-2.0.0.html\n\nfor all information related to this module, including\ninformation regarding the latest changes to the code. The\npage at the URL shown above lists all of the module\nfunctionality you can invoke in your own code. \n\nWith regard to the basic purpose of this module, it provides\na domain agnostic implementation of nonlinear least-squares\nalgorithms (gradient-descent and Levenberg-Marquardt) for\nfitting a model to observed data. Typically, a model\ninvolves several parameters and each observed data element\ncan be expressed as a function of those parameters plus\nnoise. The goal of nonlinear least-squares is to estimate\nthe best values for the parameters given all of the observed\ndata. In order to illustrate how to use the\nNonlinearLeastSquares class, the module also comes with two\nadditional classes: **OptimizedSurfaceFit** and\n**ProjectiveCamera.** \n\nThe job of **OptimizedSurfaceFit** is to fit the best surface to noisy\nheight data over an XY-plane. The model in this case would\nbe an analytical expression for the height surface and the\ngoal of nonlinear least-squares would be to estimate the\nbest values for the parameters in the model. \n\nAnd the job of **ProjectiveCamera** is to demonstrate how\nnonlinear least-squares can be used for estimating scene\nstructure from camera motion. The underlying ideas is that\nyou take multiple images of a scene with a camera ---\nsomething that you can simulate with **ProjectiveCamera**.\nYou feed the pixels thus recorded into the\nNonlinearLeastSquares class to estimate the coordinates of\nthe scene structure points and, when using uncalibrated\ncameras, to also estimate the extrinsic parameters of the\ncamera at each of its positions.\n\nStarting with Version 2.0.0, the module includes code for\nthe bundle-adjustment variant of the Levenberg-Marquardt\nalgorithm.\n\nTypical usage syntax for invoking the domain-agnostic\nNonlinearLeastSquares through your own domain-specific class\nsuch as OptimizedSurfaceFit or ProjectiveCamera is shown below:\n\n::\n\n optimizer = NonlinearLeastSquares( \n max_iterations = 200,\n delta_for_jacobian = 0.000001,\n delta_for_step_size = 0.0001,\n )\n \n surface_fitter = OptimizedSurfaceFit( \n gen_data_synthetically = True,\n datagen_functional = \"7.8*(x - 0.5)**4 + 2.2*(y - 0.5)**2\",\n data_dimensions = (16,16), \n how_much_noise_for_synthetic_data = 0.3, \n model_functional = \"a*(x-b)**4 + c*(y-d)**2\",\n initial_param_values = {'a':2.0, 'b':0.4, 'c':0.8, 'd':0.4},\n display_needed = True,\n debug = True,\n )\n\n surface_fitter.set_constructor_options_for_optimizer(optimizer) \n\n result = surface_fitter.calculate_best_fitting_surface('lm') \n or \n result = surface_fitter.calculate_best_fitting_surface('gd') \n\n\n OR\n\n\n optimizer = NonlinearLeastSquares.NonlinearLeastSquares(\n max_iterations = 400,\n delta_for_jacobian = 0.000001,\n delta_for_step_size = 0.0001,\n )\n \n camera = ProjectiveCamera.ProjectiveCamera(\n camera_type = 'projective',\n alpha_x = 1000.0,\n alpha_y = 1000.0,\n x0 = 300.0,\n y0 = 250.0,\n )\n camera.initialize()\n\n world_points = camera.make_world_points_for_triangle()\n world_points_xformed = camera.apply_transformation_to_generic_world_points(world_points, ..... )\n\n ## Now move the camera to different positions and orientations and then\n\n result = camera.get_scene_structure_from_camera_motion('lm')\n\n OR\n\n result = camera.get_scene_structure_from_camera_motion_with_bundle_adjustment()\n\n ", "description_content_type": "", "docs_url": null, "download_url": "https://engineering.purdue.edu/kak/distNonlinearLeastSquares/NonlinearLeastSquares-2.0.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://engineering.purdue.edu/kak/distNonlinearLeastSquares/NonlinearLeastSquares-2.0.0.html", "keywords": "gradient descent", "license": "Python Software Foundation License", "maintainer": "", "maintainer_email": "", "name": "NonlinearLeastSquares", "package_url": "https://pypi.org/project/NonlinearLeastSquares/", "platform": "All platforms", "project_url": "https://pypi.org/project/NonlinearLeastSquares/", "project_urls": { "Download": "https://engineering.purdue.edu/kak/distNonlinearLeastSquares/NonlinearLeastSquares-2.0.0.tar.gz", "Homepage": "https://engineering.purdue.edu/kak/distNonlinearLeastSquares/NonlinearLeastSquares-2.0.0.html" }, "release_url": "https://pypi.org/project/NonlinearLeastSquares/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "A Python module for solving optimization problems with nonlinear least-squares", "version": "2.0.0" }, "last_serial": 4470425, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "2c8d3deb65cbdfd645671262cd600f43", "sha256": "fda91218d7cdeb11a068d90aab2b59a0d9d9c00b1359a477e2ffc00af1bfe2d9" }, "downloads": -1, "filename": "NonlinearLeastSquares-1.0.tar.gz", "has_sig": false, "md5_digest": "2c8d3deb65cbdfd645671262cd600f43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54685, "upload_time": "2016-12-04T20:53:45", "url": "https://files.pythonhosted.org/packages/ca/2e/bf6c5dc29602b298efb49def0688f51a0f9090dbb94585dab1a3d2aa2b50/NonlinearLeastSquares-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "9ede50a98a7fbce5e2d588ea69e10258", "sha256": "833cbaace961f473c54a500d097ffba50280bf81d52501909e321866dcfab868" }, "downloads": -1, "filename": "NonlinearLeastSquares-1.1.tar.gz", "has_sig": false, "md5_digest": "9ede50a98a7fbce5e2d588ea69e10258", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54686, "upload_time": "2016-12-10T20:53:12", "url": "https://files.pythonhosted.org/packages/93/63/ff75494ca333fb5ef6c6d02a3277d210a3aef47d31683d382eaee7f01450/NonlinearLeastSquares-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "24b0eb7d1ff7030990155dcf5ed88b35", "sha256": "9a37516cb22a7ff49edb6f50c69465b2a37b7922922f36e0d185b58c713cc453" }, "downloads": -1, "filename": "NonlinearLeastSquares-1.1.1.tar.gz", "has_sig": false, "md5_digest": "24b0eb7d1ff7030990155dcf5ed88b35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56944, "upload_time": "2016-12-14T22:03:59", "url": "https://files.pythonhosted.org/packages/63/e9/07270ae189c8be7df6db626507377ee6b0d1b220883b011addfb1208efc2/NonlinearLeastSquares-1.1.1.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "a68ede540efd7b8c1e68a25944b9e7c5", "sha256": "9236eb2f083eaa88227e7423d1a4f1631fcea402afaa135703d577aaa8c237db" }, "downloads": -1, "filename": "NonlinearLeastSquares-1.5.0.tar.gz", "has_sig": false, "md5_digest": "a68ede540efd7b8c1e68a25944b9e7c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 83305, "upload_time": "2018-10-10T06:33:06", "url": "https://files.pythonhosted.org/packages/6d/df/50e4d7f351546fed1699de5dedef1a731ab05e3188efd38840dae926fc61/NonlinearLeastSquares-1.5.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "7d86898fb3ff26267d834fd6e3082f5e", "sha256": "420cfd078c7d43c5a0f8bca5e635ab2d68a06daf3e3f1251f4bead0fc446749c" }, "downloads": -1, "filename": "NonlinearLeastSquares-2.0.0.tar.gz", "has_sig": false, "md5_digest": "7d86898fb3ff26267d834fd6e3082f5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114321, "upload_time": "2018-11-09T18:38:52", "url": "https://files.pythonhosted.org/packages/89/39/48fe5c7b6f6da4e7027fba6a153947b768ab9a50ec95236637cb6f387250/NonlinearLeastSquares-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7d86898fb3ff26267d834fd6e3082f5e", "sha256": "420cfd078c7d43c5a0f8bca5e635ab2d68a06daf3e3f1251f4bead0fc446749c" }, "downloads": -1, "filename": "NonlinearLeastSquares-2.0.0.tar.gz", "has_sig": false, "md5_digest": "7d86898fb3ff26267d834fd6e3082f5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114321, "upload_time": "2018-11-09T18:38:52", "url": "https://files.pythonhosted.org/packages/89/39/48fe5c7b6f6da4e7027fba6a153947b768ab9a50ec95236637cb6f387250/NonlinearLeastSquares-2.0.0.tar.gz" } ] }