Skip to content

Commit 52faa4f

Browse files
committed
added jupyter notebbok + some bug fixing and code cleaning
1 parent 24b8b6f commit 52faa4f

File tree

6 files changed

+11416
-12
lines changed

6 files changed

+11416
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*.idea
55
data/*
66
BERT/results/*
7+
gender/src/.ipynb_checkpoints/

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ Please cite these papers [[bib](https://github.com/matejMartinc/PAN2019/blob/mas
66

77
Published results were produced in Python 3 programming environment on Linux Mint 18 Cinnamon operating system. Instructions for installation assume the usage of PyPI package manager.<br/>
88

9-
To only get the source code, clone the repository from github with 'git clone https://github.com/EMBEDDIA/PAN2019'<br/>
9+
To get the source code, clone the repository from github with 'git clone https://github.com/EMBEDDIA/PAN2019'<br/><br/>
10+
11+
Data for the bot vs male vs female classification can be downloaded from here: <br/>
12+
https://zenodo.org/record/3692340#.YAARLNYo-Uk <br/>
13+
Data for the celebrity classification can be downloaded from here: <br/>
14+
https://zenodo.org/record/3885373#.YAASeNYo-Uk <br/>
1015

1116
Install dependencies if needed: pip install -r requirements.txt
1217

18+
### We have added a Jupyter notebook (see gender/src/example_usage.ipynb) in order to explain specific steps in the code.
19+
1320
### To reproduce the results of celebrity classification published in the paper run the code in the command line using following commands: ###
1421

1522
Read data and generate features:<br/>

gender/src/evaluate.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
import pickle
55
from sklearn import preprocessing
66
import numpy as np
7-
from sklearn.metrics import f1_score, accuracy_score
8-
from sklearn import linear_model
9-
from sklearn.svm import LinearSVC
10-
from sklearn.ensemble import RandomForestClassifier
11-
from sklearn.ensemble import GradientBoostingRegressor
7+
from sklearn.metrics import accuracy_score
128
import logging
139
from sklearn.externals import joblib
1410
logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S')

0 commit comments

Comments
 (0)