Skip to content

Error while implementing the Naive Bayes approach to generate sentiment scores for movie reviews in NLPIA #33

@SallyAfua

Description

@SallyAfua

Hello NLPIA readers. Please I tried to implement the code snippet on generating sentiment scores for movie reviews in the NLPIA.

This line of code

'' movies['predicted_sentiment'] = nb.predict_proba(df_bows) * 8 - 4 ''

gave me this error

''Wrong number of items passed 2, placement implies 1''

Maybe the error is trying to say that I can't fix a two dimensional array into a dataframe's column, but I don't know how to fix it. Please can someone be of help. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions