{"id":26737083,"url":"https://github.com/mostafaelhoushi/fos","last_synced_at":"2025-04-14T13:22:10.902Z","repository":{"id":95374493,"uuid":"110076356","full_name":"mostafaelhoushi/FOS","owner":"mostafaelhoushi","description":"Implementation of Fast Orthogonal Search (FOS) Algorithm in MATLAB","archived":false,"fork":false,"pushed_at":"2019-08-04T15:09:47.000Z","size":2465,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T02:37:51.447Z","etag":null,"topics":["polynomial-regression","regression","signal-analysis","system-identification"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","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/mostafaelhoushi.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}},"created_at":"2017-11-09T06:26:58.000Z","updated_at":"2024-10-17T23:21:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa453bbf-af05-4930-9da5-48bea2059a01","html_url":"https://github.com/mostafaelhoushi/FOS","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/mostafaelhoushi%2FFOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostafaelhoushi%2FFOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostafaelhoushi%2FFOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mostafaelhoushi%2FFOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mostafaelhoushi","download_url":"https://codeload.github.com/mostafaelhoushi/FOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886446,"owners_count":21177667,"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":["polynomial-regression","regression","signal-analysis","system-identification"],"created_at":"2025-03-28T02:30:29.541Z","updated_at":"2025-04-14T13:22:10.875Z","avatar_url":"https://github.com/mostafaelhoushi.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (Image References)\n\n[fos_model]: ./docs/fos_model.png \"FOS Model\"\n\n# Fast Orthogonal Search (FOS) Algorithm\nImplementation of Fast Orthogonal Search (FOS) Algorithm as described in this paper:\n```\n@article{Korenberg:1989:ROA:2733743.2733908,\n author = {Korenberg, M. J.},\n title = {A Robust Orthogonal Algorithm for System Identification and Time-series Analysis},\n journal = {Biol. Cybern.},\n issue_date = {February  1989},\n volume = {60},\n number = {4},\n month = feb,\n year = {1989},\n issn = {0340-1200},\n pages = {267--276},\n numpages = {10},\n url = {http://dx.doi.org/10.1007/BF00204124},\n doi = {10.1007/BF00204124},\n acmid = {2733908},\n publisher = {Springer-Verlag New York, Inc.},\n address = {Secaucus, NJ, USA},\n} \n```\n\n## What is FOS?\n\n![FOS Model][fos_model]\n\nFOS tries to provide a mathematical model to map the input signal of a system to its output signal, using a time-series polynomail equation. \nFor a system that produces, at epoch \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=n\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?n\" title=\"n\" /\u003e\u003c/a\u003e, output \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=y[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?y[n]\" title=\"y[n]\" /\u003e\u003c/a\u003e for input \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=x[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?x[n]\" title=\"x[n]\" /\u003e\u003c/a\u003e, FOS tries to model the output as a summation of polynomial terms:\n\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=y_{1}[n]\u0026space;=\u0026space;\\sum_{m=0}^{M}\u0026space;a_{m}p_{m}[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?y_{1}[n]\u0026space;=\u0026space;\\sum_{m=0}^{M}\u0026space;a_{m}p_{m}[n]\" title=\"y_{1}[n] = \\sum_{m=0}^{M} a_{m}p_{m}[n]\" /\u003e\u003c/a\u003e\n\nwhere each polyomial term, \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=p_{m}[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?p_{m}[n]\" title=\"p_{m}[n]\" /\u003e\u003c/a\u003e \nis a product of inputs and/or outputs, possibly at different epochs:\n\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=p_{m}[n]=\\prod_{o=1}^{O}c_{o}[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?p_{m}[n]=\\prod_{o=1}^{O}c_{o}[n]\" title=\"p_{m}[n]=\\prod_{o=1}^{O}c_{o}[n]\" /\u003e\u003c/a\u003e\n\nsuch that:\n\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=c_{o}[n]=\\left\\{\\begin{matrix}\u0026space;1\u0026space;\u0026\u0026space;\\\\\u0026space;x[n-l]\u0026space;\u0026\u0026space;l=0,1,2,...,L\u0026space;\\\\\u0026space;y[n-k]\u0026space;\u0026\u0026space;k=1,2,...,K\u0026space;\\end{matrix}\\right.\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?c_{o}[n]=\\left\\{\\begin{matrix}\u0026space;1\u0026space;\u0026\u0026space;\\\\\u0026space;x[n-l]\u0026space;\u0026\u0026space;l=0,1,2,...,L\u0026space;\\\\\u0026space;y[n-k]\u0026space;\u0026\u0026space;k=1,2,...,K\u0026space;\\end{matrix}\\right.\" title=\"c_{o}[n]=\\left\\{\\begin{matrix} 1 \u0026 \\\\ x[n-l] \u0026 l=0,1,2,...,L \\\\ y[n-k] \u0026 k=1,2,...,K \\end{matrix}\\right.\" /\u003e\u003c/a\u003e\n\n\n\nThe FOS algorithm aims to minimize the error \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=e[n]\u0026space;=\u0026space;y_{1}[n]\u0026space;-\u0026space;y[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?e[n]\u0026space;=\u0026space;y_{1}[n]\u0026space;-\u0026space;y[n]\" title=\"e[n] = y_{1}[n] - y[n]\" /\u003e\u003c/a\u003e between the actual output, \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=y[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?y[n]\" title=\"y[n]\" /\u003e\u003c/a\u003e and the predicted output, \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=y_{1}[n]\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?y_{1}[n]\" title=\"y_{1}[n]\" /\u003e\u003c/a\u003e.\n\n\u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=O\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?O\" title=\"O\" /\u003e\u003c/a\u003e, \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=L\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?L\" title=\"L\" /\u003e\u003c/a\u003e and \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=K\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?K\" title=\"K\" /\u003e\u003c/a\u003e are paremeters to the FOS algorithm and are therefore determined by the user:\n- \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=O\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?O\" title=\"O\" /\u003e\u003c/a\u003e is the maximum order of the polynomial\n- \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=L\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?L\" title=\"L\" /\u003e\u003c/a\u003e is the maximum lag in input that the current output can depend on\n- \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=K\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?K\" title=\"K\" /\u003e\u003c/a\u003e is the maximum lag in output that the current output can depend on\n\nIf, \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=L\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?L\" title=\"L\" /\u003e\u003c/a\u003e and \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=K\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/svg.latex?K\" title=\"K\" /\u003e\u003c/a\u003e are set to zero, then FOS will aim to find the relationship between the input and output for a time-independent system.\n\n\n\n## Getting Started\nWe advise you to run tests `test1.m` and `test2.m` and go through their code to understand how to train and evaluate a model using FOS.\n\n## Citing Author\nIf you find this code useful in your work, please cite the following paper by the author of the code:\n```\n@article{ElhoushiSurvvey2017,\n  author = {Elhoushi, Mostafa and Georgy, Jacques and Noureldin, Aboelmagd and Korenberg, Michael J.},\n  title = {A Survey on Approaches of Motion Mode Recognition Using Sensors},\n  journal = {IEEE Trans. Intelligent Transportation Systems},\n  keywords = {activity_recognition},\n  number = 7,\n  pages = {1662-1686},\n  url = {https://ieeexplore.ieee.org/document/7726001},\n  volume = 18,\n  year = 2017\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostafaelhoushi%2Ffos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmostafaelhoushi%2Ffos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostafaelhoushi%2Ffos/lists"}