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.2.tar.gz (217.5 kB view details)

Uploaded Source

Built Distributions

fastcan-0.2.2-cp312-cp312-win_amd64.whl (135.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

fastcan-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

fastcan-0.2.2-cp312-cp312-macosx_11_0_arm64.whl (95.6 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

fastcan-0.2.2-cp312-cp312-macosx_10_9_x86_64.whl (102.8 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

fastcan-0.2.2-cp311-cp311-win_amd64.whl (139.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

fastcan-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

fastcan-0.2.2-cp311-cp311-macosx_11_0_arm64.whl (93.8 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fastcan-0.2.2-cp311-cp311-macosx_10_9_x86_64.whl (101.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

fastcan-0.2.2-cp310-cp310-win_amd64.whl (139.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

fastcan-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (196.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fastcan-0.2.2-cp310-cp310-macosx_11_0_arm64.whl (94.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fastcan-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl (101.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

fastcan-0.2.2-cp39-cp39-win_amd64.whl (140.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastcan-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (197.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fastcan-0.2.2-cp39-cp39-macosx_11_0_arm64.whl (94.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fastcan-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl (101.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: fastcan-0.2.2.tar.gz
  • Upload date:
  • Size: 217.5 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.2.tar.gz
Algorithm Hash digest
SHA256 7e2191b9da52b6cd3ca9e60df7da6ac3033854466d12db8787c0131260f0f458
MD5 4b7bdf40f0c1706fec711346cc778d9f
BLAKE2b-256 165b294c9fd4b46a99b12c326782ed3cf02e8d17187a4acf8550969f7d8c1d07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 135.4 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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 331a5ebb0cf8ed014bb23f6eaa681ea7b0b50b5210b4acda2122cabc171edabf
MD5 3248d49c0e8e99a8114143128ec73e5d
BLAKE2b-256 626ee760f8a564379c82894e45817ed12010558ed29090657a972d3cd46e83e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 028504d85526e31625e2da89b29fba501a63c077e7fdc52f6ae24d4c78eb7463
MD5 525ee6d66752c61a67834067dedfc99a
BLAKE2b-256 53378a977871091388fc9ed8513685c3c199c8f4decbe21bda08c96636c4f748

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 32420df0128e473d332fa9a8eab4faf2414a0b39aa8e0da9c6d134a3d262aa10
MD5 41e0ba5fbbadf0237145cbf254342436
BLAKE2b-256 e61a8d6c978f27c80ad0b3bcda9d7ab7ebdc85c75ccf2c8aa64027f19a229429

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6ba7ae382a6a27bb5c7d3ab36d7a293c62b998e7a8894c1a048fb4c73becee87
MD5 71f8a73b2332d2f3c4ff8336e4593cbc
BLAKE2b-256 edffbbbdbfcbb5c6082bf8328c9507657e25fe2ba46dfcfcd62613bc7466af08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 139.4 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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9aaab548e8ac677a06a80eb1f50c02ca01608ceeb3bd40bd08cd7f2230ded6f5
MD5 26daf237266b096e1fd4d9e7535a0cc8
BLAKE2b-256 847044d2e735c993028e9d79e8759f2a51bd9bb98376d9e3de7d404f57be88e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a4d5748cc31f84ca712b946c504be10f0ca85ad420e6e1f9f89b99986bff03e
MD5 db9153ac61074f9991dad5062323f3d7
BLAKE2b-256 762913d34e3205aa013145b6845b63477f7f5d97b353e9d9106cd1320c67652c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14aaed4b7085c6665efc84af5c7f727dd00a2ba8870e9069860316366150c23b
MD5 d3bd58e957609673c42a6a96a14290b5
BLAKE2b-256 5a3d858414546137523ad45546aec6021a46e12e486049038ec3b8c7ac4a001c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a74bbfaac6b12e79ece6612e800ce9820d02f8a83768f8d592015613b73d4153
MD5 b01dda00ce4bd77c23c557e01a8560c9
BLAKE2b-256 ed3524528dabaaa21d84b95ff58cfb11975c0120d93ae5a9a43d60a46fcec963

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 139.8 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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c824c383363ab9274822136848698d92b282af710daac5e7a1a272933145411
MD5 32f5222a3b1f04f71a97f0509bc3fae9
BLAKE2b-256 6dd79adcf6665ddfd55471391ff2e63ef10f3c6bcbc49b033e3ba44704138f20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 966d84e7cdfd89f3917e6bcc44c4748ea2c942a8624ad28b1a565f3170fd8ac3
MD5 aabf860e328fc0c694b7846ed03d956b
BLAKE2b-256 11da2b34ce55b31cace7f53565f975f2107461b6c6128b2b5173df3c908d6281

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95d0315750d523df4e400880a5a2f211f355f42d8d4832153640d455ab1e43bf
MD5 566e4bc576c7452765fad25df6639236
BLAKE2b-256 eab2ed589e9bdc9a671aa4539a357c57f71587ffab955fac61d2a7a2aa46379b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 989ac0abc55fc37864e23e7de0a2cc73495170332279a0f513f573feba178b4a
MD5 5051138d002cee0897ea68b8e5125c41
BLAKE2b-256 0e1c110b140fcd5b6c9638d7e0a56177f8fcbbce2a27db73babba2d66ab3ff29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 140.4 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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8bb2bca1d57c42521acfaf92da5233ff7cb5cff62e6c3ba5e92c58c5b94b9c85
MD5 e1bef740389301cf7bbcad91bc44d483
BLAKE2b-256 a26d7a3f15570479a953fa839489e146f5102bd2cfba1cd2b30543a046a925a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e90c0b05171136a2ad28625b1ae398faa7328677a01a33e8d86557e6163c66a
MD5 43989c7e4df71b86b7cc7f5b1df4515e
BLAKE2b-256 045bb950c87d4847ec612ce9cd5ed2593e73b479d24a4d78873533254d1ae811

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c79182f894497a4936cdac142f585e38e58317b30f0157f1a32fddc65bd08ff3
MD5 59c985a00c47548387a6066bc9ad1e3a
BLAKE2b-256 f3786406641512bc11b0617639b42d31b97e72cbdf0ea4fb5163cf70b360abf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 23f7aa50ccd6c290bfa4275bdd3db8c06cc69aee4a05a59215932d53ffe03ab6
MD5 221245f492a5bf860b2f1f8270bd9141
BLAKE2b-256 7e0bbc8b83f340ba21b1ab557b72f0a14b4221be26b960719f6fbfbbe4d44451

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