Skip to content

Commit

Permalink
Merge pull request #212 from jecisc/deprecate-normalizer
Browse files Browse the repository at this point in the history
Deprecate normalizer
  • Loading branch information
jecisc authored Apr 11, 2023
2 parents 4be99a0 + 8116241 commit 6439495
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/DataFrame/DataFrame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ Class {
#category : #'DataFrame-Core'
}

{ #category : #defaults }
DataFrame class >> defaultNormalizer [

^ AIMinMaxNormalizer
]

{ #category : #'instance creation' }
DataFrame class >> new: aPoint [

Expand Down Expand Up @@ -1366,11 +1360,11 @@ DataFrame >> normalized [
"This methods returns a new DataFrame, without altering this one, that has all the columns normalized."

| normalizers normalizedColumns |
normalizers := (1 to: self anyOne size) collect: [ :e | self class defaultNormalizer new ].
self deprecated:
'DataFrame will remove the dependency over normalization in the next version. You can use pharo-ai/data-preprocessing project to normalize your DataFrame and even more!'.
normalizers := (1 to: self anyOne size) collect: [ :e | self class defaultNormalizerClass new ].

normalizedColumns := self columns
with: normalizers
collect: [ :col :normalizer | col normalizedUsing: normalizer ].
normalizedColumns := self columns with: normalizers collect: [ :col :normalizer | col normalizedUsing: normalizer ].

^ self class withColumns: normalizedColumns columnNames: self columnNames
]
Expand Down

0 comments on commit 6439495

Please sign in to comment.