Skip to content

Commit

Permalink
Merge pull request #101 from ricardomourarpm/master
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
sevamoo authored Sep 19, 2019
2 parents fa9e800 + f6a2945 commit 1494279
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 1494279

Please sign in to comment.