{"id":17258406,"url":"https://github.com/thibauts/rbf","last_synced_at":"2025-04-14T05:32:08.060Z","repository":{"id":26002212,"uuid":"29444715","full_name":"thibauts/rbf","owner":"thibauts","description":"Radial Basis Function (RBF) interpolation","archived":false,"fork":false,"pushed_at":"2015-03-26T23:54:31.000Z","size":216,"stargazers_count":34,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-27T19:52:00.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/thibauts.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":"2015-01-18T23:11:20.000Z","updated_at":"2025-01-19T10:36:53.000Z","dependencies_parsed_at":"2022-07-25T15:22:02.591Z","dependency_job_id":null,"html_url":"https://github.com/thibauts/rbf","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/thibauts%2Frbf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauts%2Frbf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauts%2Frbf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibauts%2Frbf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thibauts","download_url":"https://codeload.github.com/thibauts/rbf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826769,"owners_count":21167741,"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-10-15T07:20:30.435Z","updated_at":"2025-04-14T05:32:07.799Z","avatar_url":"https://github.com/thibauts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"rbf\r\n===\r\n### Radial Basis Function (RBF) interpolation\r\n\r\nBuilds Radial Basis Functions for input and output values of arbitrary dimensionality using standard or custom distance functions.\r\n\r\nInstallation\r\n------------\r\n\r\n```bash\r\n$ npm install rbf\r\n```\r\n\r\nUsage\r\n-----\r\n\r\n```javascript\r\nvar RBF = require('rbf');\r\n\r\nvar points = [\r\n  [0, 0],\r\n  [0, 100]\r\n];\r\n\r\n// values could be vectors of any dimensionality.\r\n// The computed interpolant function will return values or vectors accordingly.\r\nvar values = [\r\n  0.0,\r\n  1.0\r\n]\r\n\r\n// RBF accepts a distance function as a third parameter :\r\n// either one of the following strings or a custom distance function (defaults to 'linear').\r\n//\r\n// - linear: r\r\n// - cubic: r**3\r\n// - quintic: r**5\r\n// - thin-plate: r**2 * log(r)\r\n// - gaussian: exp(-(r/epsilon) ** 2)\r\n// - multiquadric: sqrt((r/epsilon) ** 2 + 1)\r\n// - inverse-multiquadric: 1 / sqrt((r/epsilon) ** 2 + 1)\r\n//\r\n// epsilon can be provided as a 4th parameter. Defaults to the average \r\n// euclidean distance between points.\r\n//\r\nvar rbf = RBF(points, values /*, distanceFunction, epsilon */);\r\n\r\nconsole.log(rbf([0, 50])); // =\u003e 0.5\r\n```\r\n\r\nExamples\r\n--------\r\n\r\nPartial derivative of a gaussian, original and interpolated with 25 random samples (linear distance function).\r\n\r\n\u003cimg src=\"http://i.imgur.com/kBrRSRS.png\"/\u003e\r\n\u003cimg src=\"http://i.imgur.com/WTDIDjC.png\"/\u003e\r\n\r\nLena, original and interpolated with 4000 random samples (about 6% of the original pixels, linear distance function).\r\n\r\n\u003cimg src=\"http://i.imgur.com/I3vxACQ.png\"/\u003e\r\n\u003cimg src=\"http://i.imgur.com/zLeoJlJ.png\"/\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibauts%2Frbf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthibauts%2Frbf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibauts%2Frbf/lists"}