From 1580ca3b3b222808ad310d202514bdcb80dd0016 Mon Sep 17 00:00:00 2001 From: art Date: Thu, 31 Oct 2019 11:03:52 -0500 Subject: [PATCH] analysis.py v 1.1.5.001 --- data analysis/analysis/analysis.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index de2b8a49..3044f85f 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -11,6 +11,8 @@ __version__ = "1.1.5.001" # changelog should be viewed using print(analysis.__changelog__) __changelog__ = """changelog: +1.1.5.003: + - added pca 1.1.5.002: - reduced import list - added kmeans clustering engine @@ -378,6 +380,10 @@ def kmeans(data, kernel=sklearn.cluster.KMeans()): return centers, predictions +def pca(data, kernel = sklearn.decomposition.PCA(n_components=2)): + + return kernel.fit_transform(data) + class Regression: # Titan Robotics Team 2022: CUDA-based Regressions Module