Relative Content

Tag Archive for pythoncsvsentiment-analysisnaivebayesml

How to upload the result of Naive Bayes Classifier into a table?

Recently I’ve started a Python sentiment analysis training course, wherein I’ve got the first task, that is to process a dataset of IMDB reviews through 2 different models: lexical analysis with sentiment-pipeline (from transformers) and Naive Bayes Classifier. My task is to create a table which consist of three columns: review, sentiment from 1st model, sentiment from 2nd model. If it comes to first model, everything is clear, because pipeline returns a list, which could be easily converted to csv, whereas NBC really get me stuck. I have done all the steps to clear the dataset, train the model and perform it, but I have totally no idea how to show the result of its work as a table, don’t know what to do the next after the last lign of the code below. I’ve read documentation, but haven’t found anything related to the that. In the example which I was given (here), there’s only an estimation of its output, whereas I need the output itself. Excuse me, if this question is too simple to ask, but I really need help, because the course support is not quite well.