Skip to content

Commit 6a3a302

Browse files
author
Waren Long
committed
Add bot-detection/94806d1f-1995-4c72-89c9-07681fa9d97d
Signed-off-by: Waren Long <[email protected]>
1 parent e0ee244 commit 6a3a302

File tree

3 files changed

+394
-0
lines changed

3 files changed

+394
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
source{d} MLonCode models
22
=========================
33

4+
## bot-detection
5+
Model that identifies bots from humans among developer identities.
6+
7+
Example:
8+
9+
```python
10+
from sklearn.preprocessing import LabelEncoder
11+
from sourced.ml.models import BotDetection
12+
from xgboost import XGBClassifier
13+
14+
bot_detection = BotDetection.load(bot-detection)
15+
xgb_cls = XGBClassifier()
16+
xgb_cls._Booster = bot_detection_model.booster
17+
xgb_cls._le = LabelEncoder().fit([False, True])
18+
print('model configuration: ', xgb_cls)
19+
print('BPE model vocabulary size: ', len(bot_detection.bpe_model.vocab()))
20+
```
21+
22+
1 model:
23+
24+
* <default> [94806d1f-1995-4c72-89c9-07681fa9d97d](/bot-detection/94806d1f-1995-4c72-89c9-07681fa9d97d.md)
25+
426
## bow
527
Weighted bag-of-words, that is, every bag is a feature extracted from source code and associated with a weight obtained by applying TFIDF.
628

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# bot-detection
2+
3+
Model that identifies bots from humans among developer identities.
4+
5+
Example:
6+
7+
```python
8+
from sklearn.preprocessing import LabelEncoder
9+
from sourced.ml.models import BotDetection
10+
from xgboost import XGBClassifier
11+
12+
bot_detection = BotDetection.load("94806d1f-1995-4c72-89c9-07681fa9d97d")
13+
xgb_cls = XGBClassifier()
14+
xgb_cls._Booster = bot_detection_model.booster
15+
xgb_cls._le = LabelEncoder().fit([False, True])
16+
print('model configuration: ', xgb_cls)
17+
print('BPE model vocabulary size: ', len(bot_detection.bpe_model.vocab()))
18+
```
19+
20+
### References
21+
22+
* []()
23+
24+
| | |
25+
|:---|:---|
26+
| ID | 94806d1f-1995-4c72-89c9-07681fa9d97d |
27+
| Uploaded | 2019-10-14 14:39:02 |
28+
| Version | 1.0.0 |
29+
| File | https://storage.googleapis.com/models.cdn.sourced.tech/models%2Fbot-detection%2F94806d1f-1995-4c72-89c9-07681fa9d97d.asdf |
30+
| Size | 100.0 kB |
31+
| BPE vocabulary size | 200 |
32+
| Number of distinct features | 252 |
33+
| Number of trained samples | 135941 |
34+
| Proportion of humans against bots | 3 |
35+
| weighted precision | 0.92 |
36+
| weighted recall | 0.91 |
37+
| License | [O](D) |
38+

0 commit comments

Comments
 (0)