Giter VIP home page Giter VIP logo

parliasent's People

Contributors

gavinabercrombie avatar

Stargazers

 avatar

parliasent's Issues

Python file giving error when trying to run

While trying to run the Python file with the command : python parliasent.py 1 manual 3
The terminal throws an error:

  File "parliasent.py", line 114, in <module>
    if int(row[0]) == int(debate_id):
ValueError: invalid literal for int() with base 10: 'id'

Similarly, when trying for multilabel models, on executing the command: python parliasent.py 2a manual 3

The terminal generates an error:

Warning: The least populated class in y has only 1 members, which is too few. The minimum number of members in any class cannot be less than n_splits=10.
  % (min_groups, self.n_splits)), Warning)
Traceback (most recent call last):
  File "parlorig.py", line 182, in <module>
    MLP_motion_pres = MLP_motion_pres+precision_score(y_motions_test, MLP_motions_predict, pos_label='1')
  File "/home/adityaasinha28/anaconda3/lib/python3.6/site-packages/sklearn/metrics/classification.py", line 1261, in precision_score
    sample_weight=sample_weight)
  File "/home/adityaasinha28/anaconda3/lib/python3.6/site-packages/sklearn/metrics/classification.py", line 1040, in precision_recall_fscore_support
    "choose another average setting." % y_type)
ValueError: Target is multiclass but average='binary'. Please choose another average setting.

What could be the reason for such an error? And is it possible to fix them?
I tried to debug the code but wasnt able to find the source of the error. Help with that would be appreciated. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.