change default to "Normalize=False" and remove "normalize_type: 'linear"
Closed this issue · 0 comments
jkoschinsky commented
Two updates:
- change default from normalize=True (bold below) Normalize=False
- for normalize_type: 'linear' or 'z-score', remove 'linear' since it doesn't work well with all the zero values (not enough walkable values)
These are the specification of the parameters for AccessModel:
def calculate(self,upper_threshold,category_weight_dict=None, normalize=True, normalize_type='linear')
normalize: boolean. If true, results will be normalized from 0 to 100.
normalize_type: 'linear' or 'z_score'.
def _normalize(self, column, normalize_type):
"""
Normalize results.
Args:
column: which column to normalize.
normalize_type: 'linear' or 'z-score'
Raises:
UnexpectedEmptyColumnException
UnexpectedNormalizeTypeException
"""
if normalize_type == 'linear':
max_score = self.model_results[column].max()
self.model_results[column] = (self.model_results[column] / max_score) * 100.0
elif normalize_type == 'z_score':
try:
self.model_results[column] = (self.model_results[column]
- self.model_results[column].mean()) / self.model_results[column].std()