Programming Homework Help
Programming Homework Help. TextClassifier
Below I have attached the workspace as well as the full spec
Only the following 4 methods need to be implemented in TextClassifier.java:
1) TextClassifier(Vectorizer vectorizer, Splitter splitter)
Constructs a new TextClassifier
given a fitted vectorizer
for transforming data points and a splitter
for determining the splits in the treeTextClassifier(Vectorizer vectorizer, Splitter splitter
2) boolean classify(String text)
text
.3) void print()
4) void prune(int depth)
depth
. Each pruned subtree is replaced with a new node representing the subtree’s majority label. For example, pruning the above decision tree to depth 1 would result in the following structure.