Skip to content

Commit

Permalink
Colab updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfolgado committed Jan 21, 2020
1 parent 1535336 commit e18f7a1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
30 changes: 18 additions & 12 deletions notebooks/TSFEL_HAR_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"#@title Import Time Series Feature Extraction Library\n",
"import warnings\n",
"warnings.filterwarnings('ignore')\n",
"!pip install https://github.com/fraunhoferportugal/tsfel/releases/tag/v0.1.1_dev >/dev/null 2>&1\n",
"!pip install https://github.com/fraunhoferportugal/tsfel/archive/v0.1.1-dev.tar.gz 2>&1\n",
"!pip install --upgrade -q gspread >/dev/null 2>&1\n",
"!pip install gspread oauth2client >/dev/null 2>&1\n",
"!pip install pandas >/dev/null 2>&1\n",
Expand Down Expand Up @@ -131,12 +131,12 @@
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 295.0
"height": 295
},
"colab_type": "code",
"collapsed": true,
"id": "EK66Oc_jNzKc",
"outputId": "b747d1b0-e61c-43dc-99de-7c496e22a6f9",
"collapsed": true
"outputId": "b747d1b0-e61c-43dc-99de-7c496e22a6f9"
},
"outputs": [
{
Expand Down Expand Up @@ -187,12 +187,11 @@
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 86.0
"height": 86
},
"colab_type": "code",
"id": "uf_qta_DJ4xD",
"outputId": "1c81ad71-e3d6-43fa-f138-99958fe0ace1",
"collapsed": false
"outputId": "1c81ad71-e3d6-43fa-f138-99958fe0ace1"
},
"outputs": [
{
Expand Down Expand Up @@ -250,7 +249,7 @@
"cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 330.0
"height": 330
},
"colab_type": "code",
"id": "vu5o5PBAXcFP",
Expand Down Expand Up @@ -289,7 +288,7 @@
"cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 2047.0
"height": 2047
},
"colab_type": "code",
"id": "Oa6gCQVwBaG_",
Expand Down Expand Up @@ -1816,7 +1815,7 @@
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 260.0
"height": 260
},
"colab_type": "code",
"id": "E3o5jF_sOwDI",
Expand Down Expand Up @@ -1847,6 +1846,13 @@
"source": [
"classifier = DecisionTreeClassifier()\n",
"\n",
"# Handling eventual missing values from the feature extraction\n",
"X_train.replace([np.inf, -np.inf], np.nan, inplace=True)\n",
"X_train.fillna(X_train.mean(), inplace=True)\n",
"\n",
"X_test.replace([np.inf, -np.inf], np.nan, inplace=True)\n",
"X_test.fillna(X_test.mean(), inplace=True)\n",
"\n",
"# Train the classifier\n",
"classifier.fit(X_train, y_train.ravel())\n",
"\n",
Expand All @@ -1865,7 +1871,7 @@
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 375.0
"height": 375
},
"colab_type": "code",
"id": "6lhdbQnCQxSV",
Expand Down Expand Up @@ -1933,7 +1939,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setuptools.setup(
name="tsfel",
version="0.1.0",
version="0.1.1-dev",
author="Fraunhofer Portugal",
description="Library for time series feature extraction",
long_description=long_description,
Expand All @@ -23,7 +23,7 @@
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
install_requires=install_reqs
Expand Down

0 comments on commit e18f7a1

Please sign in to comment.