本文整理汇总了Python中dataset.DataSet.log_normalize_using_training_set_values方法的典型用法代码示例。如果您正苦于以下问题:Python DataSet.log_normalize_using_training_set_values方法的具体用法?Python DataSet.log_normalize_using_training_set_values怎么用?Python DataSet.log_normalize_using_training_set_values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset.DataSet
的用法示例。
在下文中一共展示了DataSet.log_normalize_using_training_set_values方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DataSet
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import log_normalize_using_training_set_values [as 别名]
# load the data set
if(training_file_provided):
training_data_set = DataSet(training_ds_file)
#training_data_set.normalize_to_unit_vector()
observed_min_values=training_data_set.log_normalize()
else:
# No training file provided.
# But the model file contains info about normalization min_values
observed_min_values=read_model_file_normalization_min_values(model_file)
test_data_set=DataSet(test_ds_file)
#test_data_set.normalize_to_unit_vector()
test_data_set.log_normalize_using_training_set_values(observed_min_values)
'''
test_data_set=DataSet(test_ds_file)
#data_set.filter_features([0])
#data_set.normalize_linear(0,1)
#data_set.smart_normalize()
# Faiyaz: Commenting out the next two lines for testing July 7 2012
#observed_min_values=training_data_set.log_normalize()
#test_data_set.log_normalize_using_training_set_values(observed_min_values)
# Faiyaz: These two lines are for test purpose; July 7 2012
test_data_set.normalize_to_unit_vector()
#training_data_set.rescale_feature_values(1000)
#test_data_set.rescale_feature_values(1)