Commit ce54f918 authored by Tags's avatar Tags

Method Cross validation

parent 8d5773aa
...@@ -150,15 +150,15 @@ class Classifier: ...@@ -150,15 +150,15 @@ class Classifier:
self.X_data = X_data self.X_data = X_data
# ___________________result usage __________________________ # ___________________result usage __________________________
# X_test = self.vectorarizer.transform(["Hello In the world from android programmers. My apps are so cool.",]) # X_test = self.vectorizer.transform(["Hello In the world from android programmers. My apps are so cool.",])
# rez2 = self.classifier.predict(X_test) # rez2 = self.classifier.predict_proba(X_test)
# rez_probabl_dictionary = dict(zip(links_tags, rez[0])) # # print(rez2)
# rez_probabl_dictionary = dict(zip(self.links_tags, rez2[0]))
# sorted_probabl_probabl = sorted(rez_probabl_dictionary.items(), key = lambda x: x[1], reverse=True) # sorted_probabl_probabl = sorted(rez_probabl_dictionary.items(), key = lambda x: x[1], reverse=True)
# # print(sorted_probabl_probabl)
# print(sorted_probabl_probabl)
# for item in sorted_probabl_probabl: # for item in sorted_probabl_probabl:
# if item[1]< 0.09: continue # if item[1]< 0.09: continue
# print(item[0], self.tags[item[0]-1][1].decode("ascii", 'ignore'), item[1], end=", ") # print(item[0], self.tags[item[0]-1][1].decode("ascii", 'ignore'), item[1], end="; ")
# print() # print()
# exit(0) # exit(0)
......
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