Feature Selection Diffusion#
diffusion
#
| CLASS | DESCRIPTION |
|---|---|
DiffusionSFS |
Sequential feature selection for diffusion maps. |
Classes#
DiffusionSFS(out_features: int = 0, kernel_fn: Kernel | str = 'gaussian', kernel_kwargs: dict | None = None, distance_fn: PairwiseDistance | str = 'euclidean', distance_kwargs: dict | None = None, score: Literal['eigenvalue_mse', 'gap_mse', 'gap_max'] = 'eigenvalue_mse', score_kwargs: dict | None = None, reference: torch.Tensor | None = None, n_states: int | None = None, forward: bool = True, floating: bool = False, labels: list[str] | None = None, n_cv: int = 5, n_jobs: int = -1, random_state: int | None = None)
#
Bases: SequentialFeatureSelector
Sequential feature selection for diffusion maps.
Extends SequentialFeatureSelector with spectral scoring functions for diffusion
map eigenvalue and spectral gap optimization.
| PARAMETER | DESCRIPTION |
|---|---|
out_features
|
Target number of features to select.
TYPE:
|
kernel_fn
|
Kernel function or string identifier.
TYPE:
|
kernel_kwargs
|
Keyword arguments for kernel function.
TYPE:
|
distance_fn
|
Distance function or string identifier.
TYPE:
|
distance_kwargs
|
Keyword arguments for distance function.
TYPE:
|
score
|
Scoring function for feature selection.
TYPE:
|
score_kwargs
|
Keyword arguments for scoring function.
TYPE:
|
reference
|
Reference eigenvalues for eigenvalue_mse and gap_mse scores.
TYPE:
|
n_states
|
Number of states for gap-based scores.
TYPE:
|
forward
|
If True, performs forward selection. If False, performs backward elimination.
TYPE:
|
floating
|
If True, enables floating variant.
TYPE:
|
labels
|
Optional feature names.
TYPE:
|
n_cv
|
Cross-validation strategy.
TYPE:
|
n_jobs
|
Number of parallel jobs.
TYPE:
|
random_state
|
Random seed.
TYPE:
|
Source code in spectre/feature_selection/diffusion.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |