From efda0cd1156c08f7b0f39f3d0316cb780d51290e Mon Sep 17 00:00:00 2001 From: matheus_cascalho Date: Tue, 12 Jan 2021 15:06:54 -0300 Subject: [PATCH] retirada do escopo main do arquivo pca.py --- pyFTS/common/transformations/pca.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pyFTS/common/transformations/pca.py b/pyFTS/common/transformations/pca.py index d46814e..65fe5a4 100644 --- a/pyFTS/common/transformations/pca.py +++ b/pyFTS/common/transformations/pca.py @@ -20,17 +20,3 @@ class PCATransformation(Transformation): new = pd.DataFrame(transformed, columns=list(names)) new[endogen_variable] = data[endogen_variable].values return new - -if __name__ =="__main__": - pd.set_option('max_columns', 50) - - file = '/home/matheus_cascalho/Documentos/matheus_cascalho/MINDS/TimeSeries_Lab/SOM/gas_concentration/ethylene_CO.csv' - - df = pd.read_csv(file) - df = df[df['Time (seconds)'].apply(lambda x: x % 1 == 0)] - ignore = list(df.columns)[:3] - endogen_variable = 'TGS2602' - pca = PCATransformation() - cols = [col for col in df.columns if col not in ignore] - # cols.append(endogen_variable) - print(pca.apply(df[cols], endogen_variable=endogen_variable)) \ No newline at end of file