Machine learning models/Production/Ukrainian Wikipedia article quality
Model card | |
---|---|
This page is an on-wiki machine learning model card. | |
Model Information Hub | |
Model creator(s) | Aaron Halfaker (User:EpochFail) and Amir Sarabadani |
Model owner(s) | WMF Machine Learning Team (ml@wikimediafoundation.org) |
Model interface | Ores homepage |
Code | ORES Github, ORES training data, and ORES model binaries |
Uses PII | No |
In production? | Yes |
Which projects? | Ukrainian Wikipedia |
This model uses data about a revision to predict the likelihood that the article is of a certain quality level. | |
Motivation
[edit]This model card describes a model for predicting the quality of Wikipedia articles. It uses structural features extracted from the article to label Wikipedia articles with a probability score for each article quality class.
Wikipedia articles range in quality from rich, well-illustrated, fully-referenced articles that fully cover their topic and are easy to read to single sentence stubs that define the topic of the article but do not offer much more information. It is very useful to be able to reliably distinguish between these extremes and the various stages of quality along this spectrum. Wikipedia editors have developed rich rubrics for how to evaluate the quality of Wikipedia articles and are constantly assessing article quality to assist in coordinating work on the wikis. Editors use these quality scores to evaluate and prioritize their work. Researchers use these quality scores to understand content dynamics. Developers use these quality scores as filters when building recommender systems or other tools.
Wikipedia is always changing, which makes it time-consuming (and largely impossible) for editors to keep these quality assessments complete and up-to-date. An automatic quality model can help fill these gaps by evaluating the quality for articles that are unassessed or have changed substantially since they were last assessed. In doing so, it can provide researchers and tool developers with more consistent data and even potentially help editors identify articles that would benefit from a human assessment.
Users and uses
[edit]- high-level analyses of article quality trends
- filtering / ranking articles in tools – e.g. only show low-quality articles in a recommender system
- identifying potential ways to improve articles – e.g. using the lowest-value feature from the model as a recommendation
- projects outside of Ukrainian Wikipedia
- namespaces outside of 0, disambiguation pages, and redirects
- directly comparing article quality across language editions – the scores are for a given project so e.g., an article that received a 0.5 score on English Wikipedia would get a much higher score if it had been on Simple English Wikipedia instead (because high-quality articles on English Wikipedia generally have more content than high-quality articles on Simple English Wikipedia)
This model is a part of ORES, and generally accessible via API. It is used for high-level analysis of Wikipedia, platform research, and other on-wiki tasks.
Example API call:https://ores.wikimedia.org/v3/scores/ukwiki/1234/articlequality
Ethical considerations, caveats, and recommendations
[edit]- The source data for this model is several years old — data drift may skew current outputs relative to the training data.
- The model does not currently take into account the quality of the specific writing, so a long article with many fake words would register as high quality. It does take into account structure though, so a long article would be penalized if it did not have many sections or was poorly referenced.
- Different wikis have different labeling schemes — do not use this model in conjunction with other models to conduct an interwiki analysis.
Model
[edit]Performance
[edit]Test data confusion matrix:
Label | n | ~IV | ~III | ~II | ~I | ~ДС | ~ВС |
---|---|---|---|---|---|---|---|
IV | 150 | 81 | 45 | 19 | 5 | 0 | 0 |
III | 150 | 43 | 50 | 42 | 10 | 3 | 2 |
II | 149 | 21 | 20 | 63 | 34 | 6 | 5 |
I | 150 | 6 | 12 | 36 | 56 | 24 | 16 |
ДС | 150 | 0 | 3 | 11 | 40 | 56 | 40 |
ВС | 150 | 0 | 2 | 11 | 18 | 39 | 80 |
Test data sample rates:
IV | III | II | I | ДС | ВС | |
---|---|---|---|---|---|---|
sample | 0.167 | 0.167 | 0.166 | 0.167 | 0.167 | 0.167 |
population | 0.266 | 0.61 | 0.098 | 0.018 | 0.01 | 0.004 |
Test data performance:
Statistic | IV | III | II | I | ДС | ВС |
---|---|---|---|---|---|---|
match_rate | 0.212 | 0.246 | 0.185 | 0.147 | 0.099 | 0.086 |
filter_rate | 0.788 | 0.754 | 0.815 | 0.853 | 0.901 | 0.914 |
recall | 0.54 | 0.333 | 0.423 | 0.373 | 0.373 | 0.533 |
precision | 0.676 | 0.826 | 0.224 | 0.046 | 0.037 | 0.026 |
f1 | 0.601 | 0.475 | 0.293 | 0.081 | 0.068 | 0.049 |
accuracy | 0.809 | 0.551 | 0.8 | 0.848 | 0.899 | 0.914 |
fpr | 0.093 | 0.109 | 0.159 | 0.143 | 0.096 | 0.084 |
roc_auc | 0.874 | 0.791 | 0.733 | 0.747 | 0.842 | 0.893 |
pr_auc | 0.713 | 0.795 | 0.217 | 0.058 | 0.05 | 0.052 |
Implementation
[edit]{
"type": "GradientBoosting",
"params": {
"min_impurity_split": null,
"n_iter_no_change": null,
"max_features": "log2",
"scale": true,
"n_estimators": 500,
"verbose": 0,
"multilabel": false,
"label_weights": null,
"min_samples_leaf": 1,
"min_samples_split": 2,
"min_weight_fraction_leaf": 0.0,
"criterion": "friedman_mse",
"validation_fraction": 0.1,
"subsample": 1.0,
"loss": "deviance",
"max_leaf_nodes": null,
"center": true,
"population_rates": null,
"ccp_alpha": 0.0,
"random_state": null,
"learning_rate": 0.01,
"warm_start": false,
"presort": "deprecated",
"labels": [
"IV",
"III",
"II",
"I",
"\u0414\u0421",
"\u0412\u0421"
],
"min_impurity_decrease": 0.0,
"init": null,
"tol": 0.0001,
"max_depth": 7
}
}
{
"properties": {
"probability": {
"properties": {
"III": {
"type": "number"
},
"\u0412\u0421": {
"type": "number"
},
"IV": {
"type": "number"
},
"II": {
"type": "number"
},
"\u0414\u0421": {
"type": "number"
},
"I": {
"type": "number"
}
},
"description": "A mapping of probabilities onto each of the potential output labels",
"type": "object"
},
"prediction": {
"description": "The most likely label predicted by the estimator",
"type": "string"
}
},
"title": "Scikit learn-based classifier score with probability",
"type": "object"
}
https://ores.wikimedia.org/v3/scores/ukwiki/1234/articlequality
Output:
{
"ukwiki": {
"models": {
"articlequality": {
"version": "0.8.0"
}
},
"scores": {
"1234": {
"articlequality": {
"score": {
"prediction": "IV",
"probability": {
"I": 0.012147908644580664,
"II": 0.14706266295655407,
"III": 0.14477215473839136,
"IV": 0.6845444327767962,
"\u0412\u0421": 0.004104378390726652,
"\u0414\u0421": 0.007368462492950987
}
}
}
}
}
}
}
Data
[edit]Licenses
[edit]- Code: MIT license
- Model: MIT license
Citation
[edit]Cite this model card as:
@misc{
Triedman_Bazira_2023_Ukrainian_Wikipedia_article_quality,
title={ Ukrainian Wikipedia article quality model card },
author={ Triedman, Harold and Bazira, Kevin },
year={ 2023 },
url={ https://meta.wikimedia.org/wiki/Machine_learning_models/Production/Ukrainian_Wikipedia_article_quality }
}