Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardomourarpm authored Mar 8, 2019
1 parent a66426e commit f6a2945
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sompy/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,22 @@ class HistDNormalizer(Normalizer):
class HistCNormalizer(Normalizer):

name = 'histc'

''' Added for people who would like to perform clustering without normalization. It allows someone to normalize
before applying SOM and to increase some weights to some variables. When applying No normalization, when performing
som.cluster() it would present an error like: No denormalize defined in som'''
class NoNormalizer(Normalizer):

name = 'None'

def normalize(self, data):
data=data
return data

def normalize_by(self, raw_data, data):
data=data
return data

def denormalize_by(self, data_by, n_vect):
n_vect = n_vect
return n_vect

0 comments on commit f6a2945

Please sign in to comment.