diff --git a/docs/HowToUse/install.md b/docs/HowToUse/install.md index 96a67ef..3ab49e0 100644 --- a/docs/HowToUse/install.md +++ b/docs/HowToUse/install.md @@ -2,22 +2,69 @@ hide: -toc --- -# Install +# Installing EEG-GAN + +## Pre-Requisites The only prerequisites for installing EEG-GAN is [Python](https://www.python.org/downloads/). --- -To install using [pip](https://pip.pypa.io/en/stable/cli/pip_download/): +## Install With Pip + +To install using [pip](https://pip.pypa.io/en/stable/cli/pip_download/):
  ```pip install eeggan``` +You can then import the package functions directly: + +  Import functions: ```from eeggan import train_gan, visualize_gan, generate_samples```
+  Use function: ```train_gan(argv)``` + +Or indirectly: + +  Import package: ```import eeggan as eg```
+  Use function: ```eg.train_gan(argv)``` + +If you prefer, follow this [link](https://pypi.org/project/eeggan/){.new_tab} to our PyPI page to directly download wheels or source. + +--- + +## Installing From the Source +You can install the latest GitHub version of EEG-GAN into your environment:
+ +  ```pip install git+https://github.com/AutoResearch/EEG-GAN@3-release-as-pip-package``` + +Note that our pip release is currently on the branch 3-release-as-pip-package.
+Note that the GitHub repo may be ahead of the latest pip release.
+For most stable results, we suggest you follow the Install With Pip instructions above. + --- -You can then import the package functions: +## Obtaining the Source +If you rather download the package via GitHub you can use the following command:
-  ```from eeggan import train_gan, visualize_gan, generate_samples``` +  ```git clone https://github.com/AutoResearch/EEG-GAN.git``` + +To update your local package: + +  ```git pull``` + +Note that the GitHub repo may be ahead of the latest pip release.
+For most stable results, we suggest you follow the Install With Pip instructions above. --- -You can also find the repository on our [GitHub](https://github.com/AutoResearch/EEG-GAN). \ No newline at end of file +## Dependencies +The following are the required dependencies for EEG-GAN. If you install EEG-GAN via pip, or installed EEG-GAN from the source, these are automatically installed. If you have obtained the package from the source you can install these via the requirements.txt file ```pip install -r requirements.txt``` or via the pyproject.toml file ```pip install -e .[dev]``` + +  [Pandas](https://pandas.pydata.org/)~=1.3.4
+  [NumPy](https://numpy.org/)~=1.21.4
+  [Matplotlib](https://matplotlib.org/)~=3.5.0
+  [SciPy](https://scipy.org/)~=1.8.0
+  [Torch](https://pytorch.org/)~=1.12.1
+  [TorchVision](https://pytorch.org/)~=0.13.1
+  [TorchSummary](https://pytorch.org/)~=1.5.1
+  [TorchAudio](https://pytorch.org/)~=0.12.1
+  [Einops](https://github.com/arogozhnikov/einops)~=0.4.1
+  [Scikit-Learn](https://scikit-learn.org/)~=1.1.2
\ No newline at end of file diff --git a/docs/Research/cognitivescience2023.md b/docs/Research/cognitivescience2023.md index d0735db..a1f0e88 100644 --- a/docs/Research/cognitivescience2023.md +++ b/docs/Research/cognitivescience2023.md @@ -8,11 +8,11 @@ hide: ## Augmenting EEG with Generative Adversarial Networks Enhances Brain Decoding Across Classifiers and Sample Sizes ### Williams, Weinhardt, Wirzberger, & Musslick (in press), Cognitive Science -
[Preprint](https://osf.io){ .md-button } [Journal Print](https://cognitivesciencesociety.org/cognitive-science-journal/){ .md-button} [GitHub](https://github.com/chadcwilliams/EEG-GAN_CognitiveScience2023){ .md-button }
+
[Preprint](https://osf.io){ .md-button } [Journal Print](https://cognitivesciencesociety.org/cognitive-science-journal/){ .md-button} [Data and Scripts](https://github.com/chadcwilliams/EEG-GAN_CognitiveScience2023){ .md-button }
#### Abstract: #### -There is major potential for using electroencephalography (EEG) in brain decoding that has been untapped due to the need for large amounts of data. Advances in machine learning have mitigated this need through data augmentation techniques, such as Generative Adversarial Networks (GANs). Here, we gauged the extent to which GANs can augment EEG data to enhance classification performance. Our objectives were to determine which classifiers benefit from GANaugmented +There is major potential for using electroencephalography (EEG) in brain decoding that has been untapped due to the need for large amounts of data. Advances in machine learning have mitigated this need through data augmentation techniques, such as Generative Adversarial Networks (GANs). Here, we gauged the extent to which GANs can augment EEG data to enhance classification performance. Our objectives were to determine which classifiers benefit from GAN-augmented EEG and to estimate the impact of sample sizes on GAN-enhancements. We investigated three classifiers—neural networks, support vector machines, and logistic regressions— across seven sample sizes ranging from 5 to 100 participants. GAN-augmented EEG enhanced classification for neural networks and support vector machines, but not logistic regressions. Further, GAN-enhancements diminished as sample sizes increased—suggesting it is most effective with small samples, which may facilitate research that is unable to collect large amounts of data. diff --git a/docs/index.md b/docs/index.md index 71bea92..8104734 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,9 +11,10 @@ We here use Generative Adversarial Networks (GANs) to create trial-level synthet GANs are machine learning frameworks that consist of two adversarial neural network agents, namely the generator and the discriminator. The generator is trained to create novel samples that are indiscernible from real samples. In the current context, the generator produces realistic continuous EEG activity, conditioned on a set of experimental variables, which contain underlying neural features representative of the outcomes being classified. For example, depression manifests as increased alpha oscillatory activity in the EEG signal, and thus, an ideal generator would produce continuous EEG that includes these alpha signatures. In contrast to the generator, the discriminator determines whether a given sample is real or synthetically produced by the generator. The core insight of GANs is that the generator can effectively learn from the discriminator. Specifically, the generator will consecutively produce more realistic synthetic samples with the goal of “fooling” the discriminator into believing them as real. Once it has achieved realistic samples that the discriminator cannot discern, it can be used to generate synthetic data—or in this context, synthetic EEG data. -## Evaluation of the GAN Package +## Evaluation of the EEG-GAN Package Augmenting EEG with Generative Adversarial Networks Enhances Brain Decoding Across Classifiers and Sample Sizes
- *Williams, Weinhardt, Wirzberger, & Musslick (*submitted, 2023*)*
+ *Williams, Weinhardt, Wirzberger, & Musslick (*in press*), Cognitive Science*
+
[Williams, Weinhardt, Wirzberger, & Musslick *(in press, Cognitive Science)*](Research/cognitivescience2023.md){ .md-button }
## About diff --git a/mkdocs.yml b/mkdocs.yml index c64af37..b4fa613 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: EEG-GANs +site_name: EEG-GAN theme: name: material