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)
Returns a boolean representing the predicted label for the given text.
3) void print()
Prints a Java code representation of this decision tree in if/else statement format without braces and with 1 additional indentation space per level in the decision tree. Leaf nodes should print “return true;” or “return false;” depending on the label value.
4) void prune(int depth)
Prunes this tree to the given 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.

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"