A fast canonical-correlation-based feature selection method
Project description
FastCan is a feature selection method, which has following advantages:
Extremely fast.
Support unsupervised feature selection.
Support multioutput feature selection.
Skip redundant features.
Evaluate relative usefulness of features.
Check Home Page for more information.
Installation
Install FastCan via PyPi:
Run pip install fastcan
Or via conda-forge:
Run conda install -c conda-forge fastcan
Getting Started
>>> 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]) >>> selector.get_support(indices=True) # Sorted indices array([0, 1]) >>> selector.indices_ # Indices in selection order array([1, 0], dtype=int32) >>> selector.scores_ # Scores for selected features in selection order array([0.64276838, 0.09498243]) >>> # Here Feature 2 must be included >>> selector = FastCan(n_features_to_select=2, indices_include=[2], verbose=0).fit(X, y) >>> # We can find the feature which is useful when working with Feature 2 >>> selector.indices_ array([2, 1], dtype=int32) >>> selector.scores_ array([0.16632562, 0.50544788])
Citation
FastCan is a Python implementation of the following papers.
If you use the h-correlation method 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 method 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file fastcan-0.2.6.tar.gz
.
File metadata
- Download URL: fastcan-0.2.6.tar.gz
- Upload date:
- Size: 235.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b132970a1f7527a9a0da0eff9b535b4bfe422fb0ac790abed0b7ebdc95872ac8 |
|
MD5 | f3e80dbcb7d06902cdbf016b0da792bf |
|
BLAKE2b-256 | d2149f4b057c16a4fff067b2a1bfb8ac01ff636e360f18bd054ac1228edb2864 |
File details
Details for the file fastcan-0.2.6-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 98.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a772d562fc1679efa0b9abb5f9003d30d4d2e39e9e44b4caacea986c5e353fa7 |
|
MD5 | bd372a43f2daf08ac5d1ea23317bb83f |
|
BLAKE2b-256 | 786274db63e6d356d8ee9f89980995c1c737c42915f66ce2f1dfbe217cfc49a5 |
File details
Details for the file fastcan-0.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 194.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0688526b06a56ffb7867a474bf1b40ee649122546c7d66b16de488a7f7d4d92f |
|
MD5 | 9338fdebae26656dda63039a85396527 |
|
BLAKE2b-256 | a517722b853f7333b9f6a2e52a9ea94c158825654077abab4ef184e57b80e668 |
File details
Details for the file fastcan-0.2.6-cp313-cp313-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 94.0 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9628c061283ce4aa31e6f1a11c192a6f4181fb410760e94161bccf29b8c93845 |
|
MD5 | 2c39bee3008a33ccc0f5ada003fc44a5 |
|
BLAKE2b-256 | 23102301912c47079c8b4582d10e50d8ef6a0767715e1010a58bbcae0844c405 |
File details
Details for the file fastcan-0.2.6-cp313-cp313-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 101.2 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b374e4b608d03d0a0af61c3c213fe8513175eab5f8db750859e76b3aab6eff3 |
|
MD5 | b02200f036a6218ecc22941c51b28517 |
|
BLAKE2b-256 | f9688f4d724223a5678cd6a22ac6a8f87b229bfc947d3849d6926ebf56413065 |
File details
Details for the file fastcan-0.2.6-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 98.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c030a3b5e90623334c20ee654d228349bcdd2cd42a1216aacfc25b4fe559b568 |
|
MD5 | d3a7c28b2ba361551e605cc2528c10d7 |
|
BLAKE2b-256 | 9e218c50ef40789e433f504d5b8d6697616659f78fea610dd74db3ed47a42806 |
File details
Details for the file fastcan-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 193.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f49e1ebbf925d990c34a69b9a1282d5107afc612e808924f30ed441609099a |
|
MD5 | ea8dbeb41d373fe6841c01a5980d1390 |
|
BLAKE2b-256 | 924980318548d490dc4dcf736cacbfa42f58de4abfe3c9c3566f81d0176bf8e9 |
File details
Details for the file fastcan-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 95.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b49bf21b2f6fa0bf4b7804ab534853ba6866d3ec7661c9e35d843ca754532bb5 |
|
MD5 | 8c55dc06d213ef91c63eb59aca63ccba |
|
BLAKE2b-256 | 3c2a13a2fe2e78bfe5acc84c5b49431785a4e986a13a8049dc3cb93e8772a3fd |
File details
Details for the file fastcan-0.2.6-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 102.5 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e9a25705542ac18849a44a022da16ab3da07fe68decc27f6ce64e5710127b3 |
|
MD5 | d92db9b8114d7109fda66e3c23b6a892 |
|
BLAKE2b-256 | fdc8e46bcd2f7df4cde0e40a8fad0ffeb42b61aeaade9468a7494bfa30f0f15b |
File details
Details for the file fastcan-0.2.6-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 97.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6bfcd5a74eeecec60e5664bd0ad1ef674da35b6b1ac87b8b52271fb863fc48b |
|
MD5 | 0501d0a25d25abefdb213f1bf9aab83b |
|
BLAKE2b-256 | 6db07722637a0fa5239ad603dcaaac1f97cb1eb0947570efea3cfb656b264bd4 |
File details
Details for the file fastcan-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 197.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14ddf01cdd27b798013f2397d1f1d66d17e73e9966aeba5c4e8cf7bd7741ddab |
|
MD5 | 2e4fa99b1bbbffe202f3abb1b3762bba |
|
BLAKE2b-256 | 1c20db285c9febda5abf1a83941114f6e75d8719b1c251b7200ff54a3713661f |
File details
Details for the file fastcan-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 93.1 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef64621e429844128e7ee2a678a135088d5e1aa951390161525a8e8c9c5a5c1f |
|
MD5 | 52602549ae2fe5771c316e9f1d02e054 |
|
BLAKE2b-256 | 5aeeea6a2f0ea663db63069361fc62d15574bf0fb76b6f001a11dc64230d1334 |
File details
Details for the file fastcan-0.2.6-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 100.0 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4df7830067ae01af716548cc1ac5a115ce7d4df2c3522c6fd047b333dbf1d5 |
|
MD5 | 2ceb6d8ea8177c903a66198ac60466ff |
|
BLAKE2b-256 | c9a5e7037cdd22739cccc1a077fd6078d14feaf846f414406c9d991a89f76d9f |
File details
Details for the file fastcan-0.2.6-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 96.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b60bb8865bd32f692c63364c63bd6a0d438076b913f775780c20d0b5e879d1ce |
|
MD5 | 0f5a12fa33cff118fad0e213789f4d57 |
|
BLAKE2b-256 | 9624fcac0da8359161db52835d291d728d3470d9d22cfd8818e3606a56c8c44b |
File details
Details for the file fastcan-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 198.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e86b06c1defdce1caa7e3febbf02e10b40748efb73fef091869eebb1b3104079 |
|
MD5 | fedc2d0e2c302e596a6f4a4f3e5a80f1 |
|
BLAKE2b-256 | 1b8bab0dcead0fdf1038b6585322db32fe958e3049148bbd42931985787eac5b |
File details
Details for the file fastcan-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 93.7 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83355c59aefd870bd795ceb323b5d8ae43deab9a9794152b678463e2fabf74c7 |
|
MD5 | f0ba998e83fd1a6fc3519cdb3fecaec4 |
|
BLAKE2b-256 | 4b23228f87e018a5ce4f4481c2fab1d1cc9a0490599412474c534fa4487510ce |
File details
Details for the file fastcan-0.2.6-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 100.0 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e95cf30713f351d1af2ab769ae174b2b63e094553f31058ae70bc50843e21a70 |
|
MD5 | b0dfc287810dfc220ef6db7125ecf609 |
|
BLAKE2b-256 | 707f7d4f2a138c4ffa3387d7e3e09752c0c5effb79dcb50335ad0b9ccf762820 |
File details
Details for the file fastcan-0.2.6-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 97.4 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98b76ad6f5faf99d2c54acdd903f0f89d87ab2354314a5e95244fca93ccf0d2b |
|
MD5 | 0d75b7ca3e0e136685b202588412ec5a |
|
BLAKE2b-256 | e35103a655eaf48a27787f69812badb5a33368df8a65395a6770930eecf47e8d |
File details
Details for the file fastcan-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 198.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bdb4dd926e4b979b22eb5ebbda229184fa9373b118da8dc48989896400eb278 |
|
MD5 | 8ec13419e150a643b8f48041fc166a17 |
|
BLAKE2b-256 | 51421fb554ec2bf1a31e68ddd1091cc9e1690d2e50ce170c633894a56157c648 |
File details
Details for the file fastcan-0.2.6-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 94.2 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf018c191c77ef540504f65bffea329ce63b699158b808151012f1c6444472d |
|
MD5 | 70026c0de639b9a0c6a8f5d93cd01e28 |
|
BLAKE2b-256 | 0fd82b5fa3abb89d6bc5e200fe64de832b8332732a08e30d6e51b4a0bce06c55 |
File details
Details for the file fastcan-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastcan-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 100.6 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f01a90d63a9ace2724f88a659e940a97622af0f1d7f4bcc0f892f09734b7980 |
|
MD5 | 1870e668b5e440d61c779b63f4487d44 |
|
BLAKE2b-256 | e21b06a405ec82da6bef44032322d8e259d7d788056d17b418d5e168859f76c3 |