Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
exa_news_classificator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vasyl Bodnaruk
exa_news_classificator
Commits
ce54f918
Commit
ce54f918
authored
Aug 29, 2017
by
Tags
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method Cross validation
parent
8d5773aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
news_classify_tag.py
news_classify_tag.py
+6
-6
No files found.
news_classify_tag.py
View file @
ce54f918
...
...
@@ -150,15 +150,15 @@ class Classifier:
self
.
X_data
=
X_data
# ___________________result usage __________________________
# X_test = self.vectorarizer.transform(["Hello In the world from android programmers. My apps are so cool.",])
# rez2 = self.classifier.predict(X_test)
# rez_probabl_dictionary = dict(zip(links_tags, rez[0]))
# X_test = self.vectorizer.transform(["Hello In the world from android programmers. My apps are so cool.",])
# rez2 = self.classifier.predict_proba(X_test)
# # 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)
# print(sorted_probabl_probabl)
# # print(sorted_probabl_probabl)
# for item in sorted_probabl_probabl:
# 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()
# exit(0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment