diff --git a/notebooks/TSFEL_HAR_Example.ipynb b/notebooks/TSFEL_HAR_Example.ipynb index 585783e..8b5c403 100644 --- a/notebooks/TSFEL_HAR_Example.ipynb +++ b/notebooks/TSFEL_HAR_Example.ipynb @@ -184,11 +184,7 @@ "source": [ "# Feature Extraction\n", "\n", - "Through **Feature Extraction** methodologies, the data is translated into a feature vector containing information about the signal properties of each window. These properties can be classified according to their domain as Time, Frequency and Statistical features and allow to characterise the signal compactly, enhancing its characteristics. This features will be used as input to the machine learning classifier, thus, the chosen set of features can strongly influence the classification output.\n", - "\n", - "The features to extract are defined in the [google sheet](https://docs.google.com/spreadsheets/d/13u7L_5IX3XxFuq_SnbOZF1dXQfcBB0wR3PXhvevhPYA/edit?usp=sharing). Save a copy on your local drive and share it with featext@featext.iam.gserviceaccount.com.\n", - "\n", - "**Change your google sheet file name and the googleSheet_name variable to your name so both have the same name.**" + "Through **Feature Extraction** methodologies, the data is translated into a feature vector containing information about the signal properties of each window. These properties can be classified according to their domain as Time, Frequency and Statistical features and allow to characterise the signal compactly, enhancing its characteristics. This features will be used as input to the machine learning classifier, thus, the chosen set of features can strongly influence the classification output." ] }, { @@ -279,9 +275,10 @@ ], "source": [ "#@title Feature Extraction\n", - "googleSheet_name = \"Features_dev\"\n", - "# Extract excel info\n", - "cfg_file = tsfel.extract_sheet(googleSheet_name)\n", + "cfg_file = tsfel.get_features_by_domain() # All features \n", + "# cfg_file = tsfel.get_features_by_domain('statistical') # Only statistical features\n", + "# cfg_file = tsfel.get_features_by_domain('temporal') # Only temporal features\n", + "# cfg_file = tsfel.get_features_by_domain('spectral') # Only spectral features\n", "\n", "# Get features\n", "X_train = tsfel.time_series_features_extractor(cfg_file, x_train_sig, fs=fs)\n", @@ -461,7 +458,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.6.9" } }, "nbformat": 4, diff --git a/setup.py b/setup.py index 069f898..39a7e73 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,23 @@ import setuptools +from pathlib import Path +ROOT = Path(__file__).parent with open("README.md", "r") as fh: long_description = fh.read() -with open('requirements/requirements.txt', 'r') as f: - install_reqs = [ - s for s in [ - line.strip(' \n') for line in f - ] if not s.startswith('#') and s != '' - ] + +def find_requirements(filename): + with (ROOT / "requirements" / filename).open() as f: + return [ + s + for s in [line.strip(" \n") for line in f] + if not s.startswith("#") and s != "" + ] + + +install_reqs = find_requirements("requirements.txt") +docs_require = find_requirements("requirements-docs.txt") setuptools.setup( name="tsfel", @@ -19,15 +27,17 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/fraunhoferportugal/tsfel/", - packages=setuptools.find_packages("tsfel"), - extras_require={ # Optional - 'docs': ['sphinx'], - 'tests': ['mypy', 'black'], + package_data={ + "tsfel": ["feature_extraction/features.json"] }, + packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", ], - install_requires=install_reqs + install_requires=install_reqs, + extras_require={ + "docs": docs_require, + }, )