Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE Code this for me in python and show the code and the results so I can fill out the outline and do the project.
PLEASE Code this for me in python and show the code and the results so I can fill out the outline and do the project. Thank you so much in advance! I really need your help.
Project-2: Bag of Words For the chosen domain of interest (movie review, product review, email spam filter, etc.) develop a Bayesian Classifier. The following are the steps to be considered for the project implementation. 1. Data Collection (i.e. documents with known category-make sure that you have enough data for training). 2. Develop the feature data set (i.e. Bag of Words) for each known category. 3. Separate 50% of the collection data (i.e. documents) for training and 50% for testing, 4. For the training data document, Create the table with the bag of words and the corresponding Class category. 5. Calculate the prior probability, and conditional independence for each event (i.e. each word in Bag of words). 6. Perform the Bayesian classification for each test data (i.e. each review for classification in the testing data). 7. Record the results. 8. Repeat Step-3 to Step-7 for 80% training and 20% testing. 9. Record the results. 10. Compare Step-7 and Step-9 for difference in prediction for the last 20% data. 11. Show an example of Bayesian Network for considering multiple conditional dependency. Develop a program to perform Steps-4 to Steps-7. You can use either C++ or python for the programming the application. The program shall perform the following: 1. Read the test data from a flat file (i.e. text file) 2. Have appropriate delimiter to separate the reviews from the classification. For example: The movie was a real treat to the fans. Totally enjoyed it: Positive Here,' is the delimiter. 3. Count the frequency of each bag of words in the training document, perform the calculation (i.e. conditional independence and prior probability) and display the results. 4. Read the test data and perform the classification and display the results. 5. Perform the above steps for 80% training and 20% testing. Total Points: 100 DUE DATE: 3/16/2021 9:00 AM Overall grade points: 10 points Report: The project report (elaborate report - around 6-10 pages excluding the title page and outline (optional but preferred) should contain the following: 1st page: Title, course name, student's name, instructor name and date 2nd page: Outline of the report with respective page numbers. CHOOSE APPRORIATE TITLE, HEADINGS, SUB-HEADINGS (IF ANY), TABLE NAMES, FIGURE NAMES (IF ANY) and refer these in the outline. Sample Outline: Project Title (choose an appropriate title) 1. Abstract 2. Introduction 3. Theory/Background Briefly describe the Bayesian Classifier 4. Design Your approach (have a diagram to explain the design) You can also add the important parts of the program with help of appropriate code snippets. 5. Results Table: 50% training data 50% test data Table: 80% training data - 20% test data 6. Conclusion What you understood from this project? 7. References Students should also be prepared to give a talk about their project to the other students of the class if required. Project-2: Bag of Words For the chosen domain of interest (movie review, product review, email spam filter, etc.) develop a Bayesian Classifier. The following are the steps to be considered for the project implementation. 1. Data Collection (i.e. documents with known category-make sure that you have enough data for training). 2. Develop the feature data set (i.e. Bag of Words) for each known category. 3. Separate 50% of the collection data (i.e. documents) for training and 50% for testing, 4. For the training data document, Create the table with the bag of words and the corresponding Class category. 5. Calculate the prior probability, and conditional independence for each event (i.e. each word in Bag of words). 6. Perform the Bayesian classification for each test data (i.e. each review for classification in the testing data). 7. Record the results. 8. Repeat Step-3 to Step-7 for 80% training and 20% testing. 9. Record the results. 10. Compare Step-7 and Step-9 for difference in prediction for the last 20% data. 11. Show an example of Bayesian Network for considering multiple conditional dependency. Develop a program to perform Steps-4 to Steps-7. You can use either C++ or python for the programming the application. The program shall perform the following: 1. Read the test data from a flat file (i.e. text file) 2. Have appropriate delimiter to separate the reviews from the classification. For example: The movie was a real treat to the fans. Totally enjoyed it: Positive Here,' is the delimiter. 3. Count the frequency of each bag of words in the training document, perform the calculation (i.e. conditional independence and prior probability) and display the results. 4. Read the test data and perform the classification and display the results. 5. Perform the above steps for 80% training and 20% testing. Total Points: 100 DUE DATE: 3/16/2021 9:00 AM Overall grade points: 10 points Report: The project report (elaborate report - around 6-10 pages excluding the title page and outline (optional but preferred) should contain the following: 1st page: Title, course name, student's name, instructor name and date 2nd page: Outline of the report with respective page numbers. CHOOSE APPRORIATE TITLE, HEADINGS, SUB-HEADINGS (IF ANY), TABLE NAMES, FIGURE NAMES (IF ANY) and refer these in the outline. Sample Outline: Project Title (choose an appropriate title) 1. Abstract 2. Introduction 3. Theory/Background Briefly describe the Bayesian Classifier 4. Design Your approach (have a diagram to explain the design) You can also add the important parts of the program with help of appropriate code snippets. 5. Results Table: 50% training data 50% test data Table: 80% training data - 20% test data 6. Conclusion What you understood from this project? 7. References Students should also be prepared to give a talk about their project to the other students of the class if requiredStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started