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

Uploaded Source

Built Distributions

fastcan-0.2.3-cp312-cp312-win_amd64.whl (135.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

fastcan-0.2.3-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.3-cp312-cp312-macosx_11_0_arm64.whl (95.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

fastcan-0.2.3-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.3-cp311-cp311-win_amd64.whl (139.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

fastcan-0.2.3-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.3-cp311-cp311-macosx_11_0_arm64.whl (93.2 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fastcan-0.2.3-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.3-cp310-cp310-win_amd64.whl (139.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

fastcan-0.2.3-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.3-cp310-cp310-macosx_11_0_arm64.whl (93.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fastcan-0.2.3-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.3-cp39-cp39-win_amd64.whl (140.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastcan-0.2.3-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.3-cp39-cp39-macosx_11_0_arm64.whl (94.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fastcan-0.2.3-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.3.tar.gz.

File metadata

  • Download URL: fastcan-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 cea048f9b21a3aa1cdff3cab62438243c6d2a1610c98cf51eb10c795da732e19
MD5 9995559da255866babd0e4e31610fbe4
BLAKE2b-256 24253c5ece961cd2516f7bbbab0cb56ff9af5a7af47586c427e0fd89c5c9590a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 135.3 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 32a1bd35cde75401d6364b0d00fd894a4b0beffadda43e161c45d47a00f5a931
MD5 396123b18419978b274bcea3a1baeb88
BLAKE2b-256 12fca6b82eb75865663e198cc68da69cdab2f77f846b479d7f352b752104f8e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b77640123fec0aa2350f00d3a9fc95683cee28f458f2d7af51b4c80c0dd20c4
MD5 f18afe37445d71d9ef84af79bc3ce8f7
BLAKE2b-256 3606aee1df7f17e2abc1b49446398fe87e222a06b9988f76dc70e983e353a458

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 043b8784ff7ba850332fa3513fdaa7bcce59ed3f007cca4ad8f3151d77b1ddc2
MD5 871450984fd1e7f9f034feceba0e9fc7
BLAKE2b-256 df0cb236d98bd96146809f47cfe767fbf4b9650439c9e24f19c0eeb822bedca0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ce81d25c8513fc7b269a97286cd0737dc82f85c3582e2796af64b9c1a6fb4004
MD5 b441686dbe8edec5e8dbe96f7c3d7607
BLAKE2b-256 a075de28cc9dd0b7125a65bab21d7f2c0575c697253061a144d5b1c54caba966

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 139.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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 68cfb1fc0bb627d59d6846a8f0214143fb3ecd9c83fe9b79b8396fb3fa073156
MD5 2c174882b3ef4ba011cfb102488592c8
BLAKE2b-256 245f84f6f742deaf10191a72eed376c8878fd10950c6a1787b1f5ab78670046f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9662c7a503b7634819129cafe816e953d0df009c7974f950d128a029e55d226e
MD5 bca53dd8a3041d849b886d19aaacc5f8
BLAKE2b-256 a4ada146023f43accba06330d3b1549b748d9422ba1f0c65c6d8817dc754a5d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98b2bed5edf2782dead525f75bf264a89d25ff41865655e7e1b30f107a33a05b
MD5 ac975f85b786d1fadaa5e84201cd8c99
BLAKE2b-256 b998be9c847b44b3cc950532bc86dd4fef97c2baaef0d9610304d0c6e081d11a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bb76ab8b5b006697f4d6f026580f567c895368281e74a113719963de18b159f7
MD5 c88330f6870f0c1f4759883ef50cecd9
BLAKE2b-256 fd683dc074aa891d67799ae5b5f9af960909ad6b7ebb16f75ec370f1927f6c63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 139.5 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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 beadec288aef908570db0e93363291162795fbf1bea955af29df5d436b89edcc
MD5 963144a17c6ce70f72474e49cf927857
BLAKE2b-256 740d5c4c831fbb6bc47b82dfdeb93df93fabf39d856236beb9fe9f44965358c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f93a92ea5d0de4d3c00701b04a421628bd22f5f14dfef83164d465ded6ed83b7
MD5 9a5439167e5d7a883be912ea5c1d86c2
BLAKE2b-256 32559dfc1691a3baa0653052d6864b4cfdfdc5794242986cc1cc9a1ee650dc87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1431f6b11ff42e5935d51373a57d3ef7dbb581a1f89c5d0fe0271256b112fc50
MD5 802ae50719eb7238248789dc5a5ef06d
BLAKE2b-256 13f2d8410ccb61c689183519b6ff29bfe74d4fbb7443c98305c9d7520de16b93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4344d291a37dae8471128816458ef908a43ccd53f2b31ac3deb7788068fd096a
MD5 67188493200cca0743e698795a9d8b13
BLAKE2b-256 089900437f2c55fe38c77acc230f25b13d6efae61263e9700b4ba89f3131ae96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastcan-0.2.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 140.3 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 34954eaa0104a7cbfb72e42b17beff4d30704bd9b826feb596b03e136033178c
MD5 84c140db8c5bffa3adfff106d30f576d
BLAKE2b-256 8ffb5080cd9d0ad37d312c19106101398e0d8a6023660ed494d1b62a3c46d318

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f255e8ea65732d088ef1b7f8774f1c11f10e1598e450776fb38f3945a8900cec
MD5 4f43f50e8ce321022b43449e0cc64864
BLAKE2b-256 bf053dc90c6b56f29633d13772d02d8ed4630da0d0340516784df92d8c37123b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df133de2a8499931950a03a2ce73f79641521550c349abc056f08afd5e56e022
MD5 7e3e12563b6a7ea6ead333fba7a413b2
BLAKE2b-256 3719a4acad75bfbabcdade5d3f9c4afa523e3a02000108e5c9a5336e8edc972a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastcan-0.2.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 83366e5b492a96efc424729f6728357a32c620a8a88782d48c74cf6c67a1b6ed
MD5 143c08f75055320fe24b361be036aede
BLAKE2b-256 ed89d1480f357da5b2ae3add4af6ad58068a1c684904443a3f359a405485ea02

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