Skip to main content

A fast canonical-correlation-based feature selection method

Project description

conda Codecov CI Doc PythonVersion PyPi Black ruff pixi

Installation

Install FastCan via PyPi:

  • Run pip install fastcan

Or via conda-forge:

  • Run conda install -c conda-forge fastcan

Examples

>>> from fastcan import FastCan
>>> X = [[ 0.87, -1.34,  0.31 ],
...     [-2.79, -0.02, -0.85 ],
...     [-1.34, -0.48, -2.55 ],
...     [ 1.92,  1.48,  0.65 ]]
>>> y = [0, 1, 0, 1]
>>> selector = FastCan(n_features_to_select=2, verbose=0).fit(X, y)
>>> selector.get_support()
array([ True,  True, False])

Citation

FastCan is a Python implementation of the following papers.

If you use the h-correlation algorithm in your work please cite the following reference:

@article{ZHANG2022108419,
   title = {Orthogonal least squares based fast feature selection for linear classification},
   journal = {Pattern Recognition},
   volume = {123},
   pages = {108419},
   year = {2022},
   issn = {0031-3203},
   doi = {https://doi.org/10.1016/j.patcog.2021.108419},
   url = {https://www.sciencedirect.com/science/article/pii/S0031320321005951},
   author = {Sikai Zhang and Zi-Qiang Lang},
   keywords = {Feature selection, Orthogonal least squares, Canonical correlation analysis, Linear discriminant analysis, Multi-label, Multivariate time series, Feature interaction},
   }

If you use the eta-cosine algorithm in your work please cite the following reference:

@article{ZHANG2025111895,
   title = {Canonical-correlation-based fast feature selection for structural health monitoring},
   journal = {Mechanical Systems and Signal Processing},
   volume = {223},
   pages = {111895},
   year = {2025},
   issn = {0888-3270},
   doi = {https://doi.org/10.1016/j.ymssp.2024.111895},
   url = {https://www.sciencedirect.com/science/article/pii/S0888327024007933},
   author = {Sikai Zhang and Tingna Wang and Keith Worden and Limin Sun and Elizabeth J. Cross},
   keywords = {Multivariate feature selection, Filter method, Canonical correlation analysis, Feature interaction, Feature redundancy, Structural health monitoring},
   }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastcan-0.2.4.tar.gz (217.6 kB view details)

Uploaded Source

Built Distributions

fastcan-0.2.4-cp312-cp312-win_amd64.whl (99.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

fastcan-0.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.7 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

fastcan-0.2.4-cp312-cp312-macosx_11_0_arm64.whl (95.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

fastcan-0.2.4-cp312-cp312-macosx_10_9_x86_64.whl (102.7 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

fastcan-0.2.4-cp311-cp311-win_amd64.whl (97.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

fastcan-0.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (196.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

fastcan-0.2.4-cp311-cp311-macosx_11_0_arm64.whl (93.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fastcan-0.2.4-cp311-cp311-macosx_10_9_x86_64.whl (100.3 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

fastcan-0.2.4-cp310-cp310-win_amd64.whl (97.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

fastcan-0.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (197.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fastcan-0.2.4-cp310-cp310-macosx_11_0_arm64.whl (93.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fastcan-0.2.4-cp310-cp310-macosx_10_9_x86_64.whl (100.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

fastcan-0.2.4-cp39-cp39-win_amd64.whl (97.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastcan-0.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (197.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fastcan-0.2.4-cp39-cp39-macosx_11_0_arm64.whl (94.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fastcan-0.2.4-cp39-cp39-macosx_10_9_x86_64.whl (101.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file fastcan-0.2.4.tar.gz.

File metadata

  • Download URL: fastcan-0.2.4.tar.gz
  • Upload date:
  • Size: 217.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for fastcan-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d3c36b86ce79b739e0e58c582a8cab2ce63187d72b0c1a5aacfa5c72671575a3
MD5 f8f335f1c9acade6d22b1ede7dafa3be
BLAKE2b-256 9745a8cde401bbc288555d805b7638b3b4cd802382a44a41f9f9d340f2cc1b92

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fastcan-0.2.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for fastcan-0.2.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1cf2e0a2c32d803aaeb350bfc3de222b13c6b010fc2198d4509b23d1d17430cb
MD5 c2512955d0229c7c675e7871de51c205
BLAKE2b-256 44855e85cff5025676d52c71be4c1dee9124dc18f69858d9263f0a767e3b2076

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 119dac4d8dc78199792d60636e744afd77fa5c612ed5e72cae94272bd9e5a3fd
MD5 0d1c74fa99914bd963e67cba81443e62
BLAKE2b-256 a97786a243eb5ace929b3af224b731961a4dc6466515436ea206c9ab30ea8029

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb64803bd0dd83c77e7fd3bf72ee83fb45134962cba3fd8550589a943710b228
MD5 314a3dd0837013ed96589e1fd86a4c60
BLAKE2b-256 4ad5179adad72ecc2b5d59a228450f8ed89785d5e80c26a33b5590320590bdf4

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 10d50c0c415415da8a21091a95ca39e1c0b14f5636b2828e68e685b20880ec97
MD5 e8768aa69badcf608ee938885b696473
BLAKE2b-256 2eb0fb05df5806332d9a780d2c68f665ac04388d6f2bd3433e39317526f22656

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fastcan-0.2.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 97.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for fastcan-0.2.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7e84be7c14d4a3568baefb63ca3ed9d439af3657874e5eacf6ddcd85d8c3580d
MD5 a094d95d834f32897cafe06fab80fada
BLAKE2b-256 4bd7f9f1bd15f1ba5155c7006392c07c0a62dc9797fb11e853f6c50a902a8fc7

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60f7458effc005407eac0aea3347e7b33afb4c8931b424b6316fbdbd06ba713a
MD5 1e1580a06185bacd5a85a2b0fe05441e
BLAKE2b-256 655a60ec34f8681163b9a7ca47008e0a4873301bd5462beb0c43e092509c6d7d

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f7b91212c94a4184860c52dd273d8649bf0b9406821b9cedce04e897ed1d9502
MD5 72952cd856e6a27d1ffe4ebdef744fdf
BLAKE2b-256 47e0758ff4bd47d85153b60a422e55af662ebe6a706e67e2168210a7644f7f7a

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 16cc53f9a79f01e42cea1ced16377b8183a710796bbe24405f39c18e5c9785eb
MD5 d2c4282d2c42e82f004b7026f281ad1f
BLAKE2b-256 4d71ecbf71c1c3c3abe4c85b30447d1b71e9ecff9a80354f4f02a1a09b121f9f

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: fastcan-0.2.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 97.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for fastcan-0.2.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5289ecdd3ed49740cab8306415e38272bb276bc55706d4a2e302cf4acd3f0a4f
MD5 f23e0e038ea73a23613560a26a72bbec
BLAKE2b-256 8746cb6c87b8b9284dd468bcef18c72e4000d86cb25244da16fab344879faaf6

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 254e1b745e3844869500e3a1351db4f1ae049c809103bd05b315970b3e5d08f8
MD5 85968dbca4b12a6f71620ca52cd3a849
BLAKE2b-256 1d465328430e782d3ec4e656968a851d6d3a4f1ecf59a0a5ad12ec05014e28f3

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4282a3f025b6e536ee0974e5acb82a7cbee2d1b6575d192d2d666c65332a4065
MD5 694169ade05720573f19dd26416f1fc2
BLAKE2b-256 20398bfae976e2f2e19fbdaf44a22f8b8df911f20246943c2c852610cfaac200

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e5dbdd48243053ed9c389ccc163ef7f6f036b4a20efc22df3ff08d3856f39072
MD5 62cc9457ff057bf2c96d7c0bb29b7b74
BLAKE2b-256 df0ad474c726e915587f95a35cd27392d8026cce05964ea575c2a34490be0910

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: fastcan-0.2.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 97.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for fastcan-0.2.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4843eee5d91eb74f23802e6eeabce7122aaa22819854e0366faf815949a51ae4
MD5 673102a7f8538ab01747429b6648b3ea
BLAKE2b-256 8a36c3c527988739ca66bfe4e57386e17213640b65f50b0a33db1303ffd82198

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7cd0e63357055f4b7da16c0e4194fa361cd408b94589d18eca5227a318e49b4
MD5 f8a60aed103ecee9176afcd5c06c7dea
BLAKE2b-256 e5674f3639c8c0e796c2b0addd8ea1d3c1df2f25f20c9504782afaeda59fa503

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a579e580557198c4f2574e4dd5cb4c011d4e07bbdebc4505d4884e7e3c6f64ec
MD5 4da9ef282952a75b3c060878c246e366
BLAKE2b-256 1e3b4cdb41fe43a154f1bcd7a98375ad4e8112c29d7464121accdeb0e8e8fe44

See more details on using hashes here.

File details

Details for the file fastcan-0.2.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fastcan-0.2.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4a1ffa0a64a7f79c4af1ec8b72275a4ae2c31e894ab210b7360a60c6ed5af2bf
MD5 f258a64a456b4c67dea376ad278ed644
BLAKE2b-256 bc9e3831ba6882d8d1196eba5d8149c48b9300a2232fbab52eada2d0c6ffe08f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page