Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paucablop committed Feb 4, 2024
1 parent 4dc5116 commit 29b866c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/feature_selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parent: Docs
# __Feature selection__
Feature selection is a preprocessing technique in spectroscopy that selects the most relevant features. The following algorithms are available:
- [Range cut](#range-cut)
- [SelectFeatures](#range-cut-by-wavenumber)
- [IndexSelector](#range-cut-by-wavenumber)

{: .note }
> The variable selection algorithms implemented in ```chemotools``` allow you to select a subset of variables/features from the spectra. They are not designed to find the most relevant variables/features for a given task.
Expand Down Expand Up @@ -49,16 +49,16 @@ spectra_rcbw = rcbw.fit_transform(spectra)

After fitting the method with the wavenumbers, the selected wavenumbers can be accessed using the ```wavenumbers_``` attribute.

```python

### __Plotting example__:

<iframe src="figures/range_cut_by_index.html" width="800px" height="400px" style="border: none;"></iframe>

<iframe src="figures/range_cut_by_wavenumber.html" width="800px" height="400px" style="border: none;"></iframe>

## __SelectFeatures__
SelectFeatures is a preprocessing technique in spectroscopy that selects the most relevant variables. The selected features do not need to be continuous in the spectra, but they can be located at different locations. The algorithm allows selecting the features by imputing a list of indices or wavenumbers.

## __IndexSelector__
IndexSelector is a preprocessing technique in spectroscopy that selects the most relevant variables. The selected features do not need to be continuous in the spectra, but they can be located at different locations. The algorithm allows selecting the features by imputing a list of indices or wavenumbers.

### __Arguments__:

Expand All @@ -76,9 +76,9 @@ In the example below, the selected wavenumbers ```wn_select``` are used to selec


```python
from chemotools.feature_selection import SelectFeatures
from chemotools.feature_selection import IndexSelector

sfbw = SelectFeatures(features=wn_select,wavenumbers=wn)
sfbw = IndexSelector(features=wn_select,wavenumbers=wn)
spectra_sfbw = sfbw.fit_transform(spectra)
```

Expand Down

0 comments on commit 29b866c

Please sign in to comment.