Skip to content

Commit 563e168

Browse files
removed import from function to top of the file
1 parent e64322d commit 563e168

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

feature_selection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import numpy as np
55
from PIL import Image
66
import matplotlib.pyplot as plt
7+
from sklearn.preprocessing import StandardScaler # for standardizing the Data
8+
from sklearn.decomposition import PCA # for PCA calculation
79

810
# from statsmodels.tsa.stattools import grangercausalitytests
911

@@ -16,7 +18,6 @@ def return_feature_selection():
1618
Variables that have a linear relationship tell us less about our dataset, since measuring one tells you something about the other.
1719
In other words, if two variables have a high correlation, we can drop one of the two!
1820
""")
19-
import pandas as pd
2021
iris_correlation = pd.read_csv('data/iris.csv')
2122
iris_correlation.insert(0,'Time', pd.date_range(start='1/1/2018', periods=iris_correlation.shape[0], freq='T'))
2223
iris_correlation.columns = ['Time','temperature1','temperature2','temperature3','temperature4']
@@ -56,10 +57,7 @@ def return_feature_selection():
5657
PCA dates back to the 1990's and is one of the most widely used analysis techniques in Data Science and still counts as one of the leading algorithms for variable reduction.
5758
''')
5859

59-
from sklearn.preprocessing import StandardScaler # for standardizing the Data
60-
from sklearn.decomposition import PCA # for PCA calculation
6160

62-
import pandas as pd
6361
df = pd.read_csv('data/Turbine_Data.csv', parse_dates=["Unnamed: 0"])
6462
df['DateTime'] = df['Unnamed: 0']
6563
df.drop('Unnamed: 0', axis=1, inplace=True)

0 commit comments

Comments
 (0)