From b025c27ddcc2cb03bf6fac7ac6b3599d3208d6bb Mon Sep 17 00:00:00 2001 From: Aidan-Z Date: Thu, 16 May 2024 15:24:13 -0300 Subject: [PATCH] parser --- csvData/parser.go | 11 +++++++++++ data/{minmax.go => equations.go} | 6 +++--- data/normalize.go | 2 -- 3 files changed, 14 insertions(+), 5 deletions(-) rename data/{minmax.go => equations.go} (92%) delete mode 100644 data/normalize.go diff --git a/csvData/parser.go b/csvData/parser.go index 5a6e945..d5bf84d 100644 --- a/csvData/parser.go +++ b/csvData/parser.go @@ -29,3 +29,14 @@ func GetCSVData(path string) int{ //temp return int (cause returning columns) } return columns } + +//normalize: +//for i in row[x]: +// normD = (i-min(row[x]) / (max(row[x]) - min(row[x])) +// LIST.append(normD) +// the func will return float32 + +//z-score norm: +// normD = (i - mean) / standard deviation + +// diff --git a/data/minmax.go b/data/equations.go similarity index 92% rename from data/minmax.go rename to data/equations.go index eee1a2e..9a3ea39 100644 --- a/data/minmax.go +++ b/data/equations.go @@ -1,6 +1,8 @@ package data +func Normalize() { +} func Minimum(arr []int) int { min := arr[0] @@ -20,6 +22,4 @@ func Maximum(arr []int) int{ } } return max -} - - +} \ No newline at end of file diff --git a/data/normalize.go b/data/normalize.go deleted file mode 100644 index ba213e4..0000000 --- a/data/normalize.go +++ /dev/null @@ -1,2 +0,0 @@ -package data -