EECS 280 Lecture 20: Project 5 Notes

242 views1 pages
Project 5 Notes
-write a program that can classify Piazza posts according to topic
-In BinarySearchTree, each node contains an element and pointers to left and right subtrees.
A NULL ptr indicates an empty tree.
-go left, smaller elements; go right and you’ll find bigger ones
-A “tree” is not a class, but a tree-shaped structure of Nodes S. The parameters points to the
root of these nodes.
-Every function should have a base case.
-Use less to compare data
-insert_impl - where the tree is built. It should:
-handle an originally empty tree as a special case
-insert elements into appropriate place in the tree (will need to compare elements fro this)
-calls insert_impl on the left or right subtree
-NOTE:
-make sure to replace the pointers of the current nodes with the result of the recursive
call
-The overloaded () operator in Map should take in two objects of Pair_type and return whether
the key of the LHS is less than the key of the RHS (according to key compare)
-the classifier has to make certain predictions and record the following info:
-the total number of posts in the training set
-the number of unique words in the set
-for each word w, the number of posts in the set that contain w
-for each label C, the number of posts with that label
-for each label C and word w, the number of posts with label C that contain w
-make a class to represent the classifier
-
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Write a program that can classify piazza posts according to topic. In binarysearchtree, each node contains an element and pointers to left and right subtrees. Go left, smaller elements; go right and you"ll nd bigger ones. A tree is not a class, but a tree-shaped structure of nodes s. the parameters points to the root of these nodes. Every function should have a base case. Insert_impl - where the tree is built. Handle an originally empty tree as a special case. Insert elements into appropriate place in the tree (will need to compare elements fro this) Calls insert_impl on the left or right subtree. Make sure to replace the pointers of the current nodes with the result of the recursive call. The overloaded () operator in map should take in two objects of pair_type and return whether the key of the lhs is less than the key of the rhs (according to key compare)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents