{"id":21336240,"url":"https://github.com/sukhbinder/uqtoolkit","last_synced_at":"2025-07-23T16:35:37.663Z","repository":{"id":75091681,"uuid":"87700137","full_name":"sukhbinder/uqtoolkit","owner":"sukhbinder","description":"Simple Uncertainty Quantification Toolkit. Implements polynomial chaos.","archived":false,"fork":false,"pushed_at":"2017-10-31T18:07:26.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T14:41:47.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sukhbinder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-09T10:21:00.000Z","updated_at":"2020-01-17T14:24:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"ede6b3b4-8492-4357-8615-8a2a3e71c907","html_url":"https://github.com/sukhbinder/uqtoolkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fuqtoolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fuqtoolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fuqtoolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fuqtoolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukhbinder","download_url":"https://codeload.github.com/sukhbinder/uqtoolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814856,"owners_count":20352037,"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","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-21T23:51:51.407Z","updated_at":"2025-03-16T01:44:27.258Z","avatar_url":"https://github.com/sukhbinder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UQToolKit\nSimple Uncertainty Quantification Toolkit implemented in pure python from a single file.\n\nImplements polynomial chaos.\n\n\n## Sample usage\n\n```python\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom uqtoolkit import *\n\n# We will implement a simple model, which squares normally distrubuted random numbers\nnsamples=5000\nf=np.random.standard_normal(nsamples)\nY=f**2\n\n# Defining Polynomial Chaos (PC) exapansion\n\npolyOrder=2 # Polynomial order\nparam = polyOrder+1\nndim=1  # No of random variables or dimensions\npc_type='HERMITE'\n\n# Create a PC object\npc=uq_pcset(polyOrder,ndim,pc_type)\n\n# Compute the quadtures\nquadrature=uq_quadrature(ndim,param,pc_type)\n \n# Evaluate quadrature at the PC\nK=uq_getNISP(pc,quadrature)\n\n# Evaluate the model at the quadrature nodes\nYgrid=quadrature['nodes']**2\n\n# Project the response on the PC to compute PC coefs\nc=np.dot(K,Ygrid)\n\n# Sample 5000 samples from the pc\nU=uq_sample(pc,c,nsamples)\n\n# Mean and Std Dev of response\nprint 'Mean: ',Y.mean(),U.mean()\nprint 'St dev: ',Y.std(),U.std()\n\nprint 'Mean ',c[0]\nprint 'stddev ',np.sqrt(c.sum()) \n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhbinder%2Fuqtoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukhbinder%2Fuqtoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhbinder%2Fuqtoolkit/lists"}