{"id":18576581,"url":"https://github.com/scikit-learn-contrib/fastcan","last_synced_at":"2025-04-10T09:30:33.319Z","repository":{"id":246610844,"uuid":"806384772","full_name":"scikit-learn-contrib/fastcan","owner":"scikit-learn-contrib","description":"A Fast Canonical-Correlation-Based Feature Selection Algorithm","archived":false,"fork":false,"pushed_at":"2025-04-09T08:52:13.000Z","size":1226,"stargazers_count":8,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T09:35:49.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/scikit-learn-contrib.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T05:17:33.000Z","updated_at":"2025-04-09T08:52:18.000Z","dependencies_parsed_at":"2024-06-29T04:23:35.992Z","dependency_job_id":"ae910cca-6772-4948-9264-003accb2725f","html_url":"https://github.com/scikit-learn-contrib/fastcan","commit_stats":null,"previous_names":["matthewszhang/fastcan"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Ffastcan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Ffastcan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Ffastcan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Ffastcan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-learn-contrib","download_url":"https://codeload.github.com/scikit-learn-contrib/fastcan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191594,"owners_count":21062531,"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-06T23:25:30.322Z","updated_at":"2025-04-10T09:30:33.302Z","avatar_url":"https://github.com/scikit-learn-contrib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FastCan: A Fast Canonical-Correlation-Based Feature Selection Algorithm\n=======================================================================\n|conda| |Codecov| |CI| |Doc| |PythonVersion| |PyPi| |Black| |ruff| |pixi|\n\n.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/fastcan.svg\n   :target: https://anaconda.org/conda-forge/fastcan\n\n.. |Codecov| image:: https://codecov.io/gh/scikit-learn-contrib/fastcan/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/scikit-learn-contrib/fastcan\n\n.. |CI| image:: https://github.com/scikit-learn-contrib/fastcan/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/scikit-learn-contrib/fastcan/actions\n\n.. |Doc| image:: https://readthedocs.org/projects/fastcan/badge/?version=latest\n   :target: https://fastcan.readthedocs.io/en/latest/?badge=latest\n\n.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/fastcan.svg\n   :target: https://pypi.org/project/fastcan/\n\n.. |PyPi| image:: https://img.shields.io/pypi/v/fastcan\n   :target: https://pypi.org/project/fastcan\n\n.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n\n.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n   :target: https://github.com/astral-sh/ruff\n\n.. |pixi| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json\u0026style=flat-square\n   :target: https://pixi.sh\n\nFastCan is a feature selection method, which has following advantages:\n\n#. Extremely **fast**.\n\n#. Support unsupervised feature selection.\n\n#. Support multioutput feature selection.\n\n#. Skip redundant features.\n\n#. Evaluate relative usefulness of features.\n\nCheck `Home Page \u003chttps://fastcan.readthedocs.io/en/latest/?badge=latest\u003e`_ for more information.\n\nInstallation\n------------\n\nInstall **FastCan** via PyPi:\n\n* Run ``pip install fastcan``\n\nOr via conda-forge:\n\n* Run ``conda install -c conda-forge fastcan``\n\nGetting Started\n---------------\n\u003e\u003e\u003e from fastcan import FastCan\n\u003e\u003e\u003e X = [[ 0.87, -1.34,  0.31 ],\n...     [-2.79, -0.02, -0.85 ],\n...     [-1.34, -0.48, -2.55 ],\n...     [ 1.92,  1.48,  0.65 ]]\n\u003e\u003e\u003e y = [[0, 0], [1, 1], [0, 0], [1, 0]] # Multioutput feature selection\n\u003e\u003e\u003e selector = FastCan(n_features_to_select=2, verbose=0).fit(X, y)\n\u003e\u003e\u003e selector.get_support()\narray([ True,  True, False])\n\u003e\u003e\u003e selector.get_support(indices=True) # Sorted indices\narray([0, 1])\n\u003e\u003e\u003e selector.indices_ # Indices in selection order\narray([1, 0], dtype=int32)\n\u003e\u003e\u003e selector.scores_ # Scores for selected features in selection order\narray([0.91162413, 0.71089547])\n\u003e\u003e\u003e # Here Feature 2 must be included\n\u003e\u003e\u003e selector = FastCan(n_features_to_select=2, indices_include=[2], verbose=0).fit(X, y)\n\u003e\u003e\u003e # We can find the feature which is useful when working with Feature 2\n\u003e\u003e\u003e selector.indices_\narray([2, 0], dtype=int32)\n\u003e\u003e\u003e selector.scores_\narray([0.34617598, 0.95815008])\n\n\nNARX Time Series Modelling\n--------------------------\nFastCan can be used for system identification.\nIn particular, we provide a submodule `fastcan.narx` to build Nonlinear AutoRegressive eXogenous (NARX) models.\nFor more information, check our `Home Page \u003chttps://fastcan.readthedocs.io/en/latest/?badge=latest\u003e`_.\n\n\nSupport Free-Threaded Wheels\n----------------------------\nFastCan has support for free-threaded (also known as nogil) CPython 3.13.\nFor more information about free-threaded CPython, check `how to install a free-threaded CPython \u003chttps://py-free-threading.github.io/installing_cpython/\u003e`_.\n\n\nCitation\n--------\n\nFastCan is a Python implementation of the following papers.\n\nIf you use the `h-correlation` method in your work please cite the following reference:\n\n.. code:: bibtex\n\n   @article{ZHANG2022108419,\n      title = {Orthogonal least squares based fast feature selection for linear classification},\n      journal = {Pattern Recognition},\n      volume = {123},\n      pages = {108419},\n      year = {2022},\n      issn = {0031-3203},\n      doi = {https://doi.org/10.1016/j.patcog.2021.108419},\n      url = {https://www.sciencedirect.com/science/article/pii/S0031320321005951},\n      author = {Sikai Zhang and Zi-Qiang Lang},\n      keywords = {Feature selection, Orthogonal least squares, Canonical correlation analysis, Linear discriminant analysis, Multi-label, Multivariate time series, Feature interaction},\n      }\n\nIf you use the `eta-cosine` method in your work please cite the following reference:\n\n.. code:: bibtex\n\n   @article{ZHANG2025111895,\n      title = {Canonical-correlation-based fast feature selection for structural health monitoring},\n      journal = {Mechanical Systems and Signal Processing},\n      volume = {223},\n      pages = {111895},\n      year = {2025},\n      issn = {0888-3270},\n      doi = {https://doi.org/10.1016/j.ymssp.2024.111895},\n      url = {https://www.sciencedirect.com/science/article/pii/S0888327024007933},\n      author = {Sikai Zhang and Tingna Wang and Keith Worden and Limin Sun and Elizabeth J. Cross},\n      keywords = {Multivariate feature selection, Filter method, Canonical correlation analysis, Feature interaction, Feature redundancy, Structural health monitoring},\n      }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Ffastcan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-learn-contrib%2Ffastcan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Ffastcan/lists"}