Commit aec99f46 authored by 段英荣's avatar 段英荣

调试

parent a5634014
...@@ -73,9 +73,9 @@ class Generate_Feature_Info(object): ...@@ -73,9 +73,9 @@ class Generate_Feature_Info(object):
return None return None
@classmethod @classmethod
def get_tagv3_label_onehot(cls,label_encoder): def get_tagv3_label_onehot(cls,label_encoder,tagv3_name_list):
try: try:
onehot_encoder = OneHotEncoder().fit(label_encoder) onehot_encoder = OneHotEncoder().fit(label_encoder.transform(tagv3_name_list))
return onehot_encoder return onehot_encoder
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
...@@ -218,7 +218,7 @@ if __name__ == "__main__": ...@@ -218,7 +218,7 @@ if __name__ == "__main__":
tagv3_name_set = Generate_Feature_Info.get_tagv3_word_list() tagv3_name_set = Generate_Feature_Info.get_tagv3_word_list()
label_encoder = Generate_Feature_Info.get_tagv3_label_encode(tagv3_name_list=list(tagv3_name_set)) label_encoder = Generate_Feature_Info.get_tagv3_label_encode(tagv3_name_list=list(tagv3_name_set))
onehot_encoder = Generate_Feature_Info.get_tagv3_label_onehot(label_encoder=label_encoder) onehot_encoder = Generate_Feature_Info.get_tagv3_label_onehot(label_encoder=label_encoder,tagv3_name_list=list(tagv3_name_set))
# device_id="868771031984211" # device_id="868771031984211"
# Generate_Feature_Info.generate_user_feature_to_redis(device_id,label_encoder) # Generate_Feature_Info.generate_user_feature_to_redis(device_id,label_encoder)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment