dropout_prediction
dropout_prediction copied to clipboard
Code for generating the clusters
Hello @wzfhaha , I am trying to reproduce the result you got. But I could not find the code for generating the clusters. Can you kindly provide the code for preparing label_5_10time.npy and user_dict?
I second shatadru99. Also, the code for preprocessing using user_dict doesn't work. It fails to load the user_dict file. Any help?
Hello @wzfhaha , I am trying to reproduce the result you got. But I could not find the code for generating the clusters. Can you kindly provide the code for preparing label_5_10time.npy and user_dict?
It's python3's problem.you can use that:
class StrToBytes: def init(self, fileobj): self.fileobj = fileobj def read(self, size): return self.fileobj.read(size).encode() def readline(self, size=-1): return self.fileobj.readline(size).encode()
with open('final_project_dataset.pkl', 'r') as data_file: data_dict = pickle.load(StrToBytes(data_file))
But there is still no code to generate final_project_dataset.pkl file.
@wzfhaha python version 3.10.0 python file preprocess.py at line 60 user_cluster_id = pkl.load(open('cluster/user_dict','r')) ERROR: TypeError- a bytes-like object is required, not 'str'
I have saved the raw data giving pkl extension Kindly provide the code to solve the error