GithubHelp home page GithubHelp logo

jubins / machinelearning-detecting-twitter-bots Goto Github PK

View Code? Open in Web Editor NEW
125.0 9.0 71.0 3.35 MB

Custom classification algorithm to sense the bots vs human on social media space like twitter

License: MIT License

Python 1.24% Jupyter Notebook 98.76%
bot-detection machine-learning twitter-bot-detection

machinelearning-detecting-twitter-bots's People

Contributors

bbr234 avatar holmes0078 avatar jubins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machinelearning-detecting-twitter-bots's Issues

Your main algorithm may not be that accurate than it is showing

I have seen your algorithm for studying purposes but found that it is not accurate.But coincidentally it showin above 95% accuracy.In the fucntion of the bot_prediction_algorithm() prediction_df is not sorted according to the indexes of the rows,while the train_df is by sequence indexing of the rows.So while finding the accuracy it is coincidentally showing above 95%.When I sorted the prdeiction_df it is showing aroung 69 % of the accuracy.Correct me if I am wrong

Pandas parsing error

when I run the code with python2 or python3 it throws this error, even though it worked before.

Training the classifier. Please wait 30 seconds.
Traceback (most recent call last):
File "BotDetection.py", line 152, in
test_df = pd.read_csv(filepath + 'test_data_4_students.csv' , sep='\t', encoding='ISO-8859-1')
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 411, in _read
data = parser.read(nrows)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 1005, in read
ret = self._engine.read(nrows)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 1748, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 890, in pandas._libs.parsers.TextReader.read (pandas/_libs/parsers.c:10862)
File "pandas/_libs/parsers.pyx", line 912, in pandas._libs.parsers.TextReader._read_low_memory (pandas/_libs/parsers.c:11138)
File "pandas/_libs/parsers.pyx", line 966, in pandas._libs.parsers.TextReader._read_rows (pandas/_libs/parsers.c:11884)
File "pandas/_libs/parsers.pyx", line 953, in pandas._libs.parsers.TextReader._tokenize_rows (pandas/_libs/parsers.c:11755)
File "pandas/_libs/parsers.pyx", line 2184, in pandas._libs.parsers.raise_parser_error (pandas/_libs/parsers.c:28765)
pandas.errors.ParserError: Error tokenizing data. C error: Expected 10 fields in line 3, saw 105

Test Data

Hey
So i have a file of tweets but its not exactly in the same order or contain the header fields like your test data, any idea how I can test on this different tweet file ?

I can rearrange the columns to match your test data file but is there an alternative you may have tried?

No Test Data

Hey
Thanks for posting this

When I run python3 on the program it throws a unicode error
Also I believe the test data set is empy

TypeError: only integer scalar arrays can be converted to a scalar index

I executed the code and I get the following error

Training the classifier. Please wait 30 seconds.
Traceback (most recent call last):
File "BotDetection.py", line 169, in <module>
print("Train Accuracy: ", twitter_bot.get_accuracy_score(train_df))
File "BotDetection.py", line 120, in get_accuracy_score
(X_train, y_train, X_test, y_test) = twitter_bot.perform_train_test_split(df)
File "BotDetection.py", line 25, in perform_train_test_split
train, test = df[msk], df[~msk]
TypeError: only integer scalar arrays can be converted to a scalar index

Kindly help me rectify this error

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.