Machine learning models/Production/Czech Wikipedia article topic
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 | drafttopic Github, ORES training data, and ORES model binaries |
Uses PII | No |
In production? | Yes |
Which projects? | Czech Wikipedia |
This model uses article text to predict the likelihood that the article belongs to a set of topics. | |
Motivation
[edit]How can we predict what general topic an article is in? Answering this question is useful for various analyses of Wikipedia dynamics. However, it is difficult to group a very diverse range of Wikipedia articles into coherent, consistent topics manually.
This model, part of the ORES suite of models, analyzes an article to predict its likelihood of belonging to a set of topics. Similar models (though not necessarily with the same performance level or topics, are deployed across about a dozen other projects. There is also a language agnostic article topic model.
This model may be useful for high-level analyses of Wikipedia dynamics (pageviews, article quality, edit trends) and filtering articles.
Users and uses
[edit]- high-level analyses of Wikipedia dynamics such as pageview, article quality, or edit trends — e.g. How are pageview dynamics different between the physics and biology categories?
- filtering to relevant articles — e.g. filter articles only to those in the music category.
- definitively establishing what topic an article pertains to
- automated editing of articles or topics without a human in the loop
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/cswiki/1234/articletopic
Ethical considerations, caveats, and recommendations
[edit]- This model was trained on data that is now several years old (from mid-2020). Underlying data drift may skew model outputs.
- This model uses word2vec as a training feature. Word2vec, like other natural language embeddings, encodes the linguistic biases of underlying datasets — along the lines of gender, race, ethnicity, religion etc. Since Wikipedia has known biases in its text, this model may encode and at times reproduce those biases.
- This model has highly variable performance across different topics — consult the test statistics below to get a sense of inter-topic performance.
Model
[edit]Performance
[edit]Test data confusion matrix:
Test data confusion matrix | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Test data sample rates:
Test data sample rates | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Test data performance:
Test data performance | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Implementation
[edit]Model architecture |
---|
{
"type": "GradientBoosting",
"params": {
"init": null,
"population_rates": null,
"max_depth": 5,
"verbose": 0,
"ccp_alpha": 0.0,
"validation_fraction": 0.1,
"warm_start": false,
"loss": "deviance",
"min_weight_fraction_leaf": 0.0,
"max_leaf_nodes": null,
"subsample": 1.0,
"tol": 0.0001,
"presort": "deprecated",
"min_samples_split": 2,
"random_state": null,
"min_samples_leaf": 1,
"center": false,
"multilabel": true,
"max_features": "log2",
"learning_rate": 0.1,
"n_estimators": 150,
"min_impurity_split": null,
"min_impurity_decrease": 0.0,
"label_weights": {},
"criterion": "friedman_mse",
"labels": [
"Culture.Biography.Biography*",
"Culture.Biography.Women",
"Culture.Food and drink",
"Culture.Internet culture",
"Culture.Linguistics",
"Culture.Literature",
"Culture.Media.Books",
"Culture.Media.Entertainment",
"Culture.Media.Films",
"Culture.Media.Media*",
"Culture.Media.Music",
"Culture.Media.Radio",
"Culture.Media.Software",
"Culture.Media.Television",
"Culture.Media.Video games",
"Culture.Performing arts",
"Culture.Philosophy and religion",
"Culture.Sports",
"Culture.Visual arts.Architecture",
"Culture.Visual arts.Comics and Anime",
"Culture.Visual arts.Fashion",
"Culture.Visual arts.Visual arts*",
"Geography.Geographical",
"Geography.Regions.Africa.Africa*",
"Geography.Regions.Africa.Central Africa",
"Geography.Regions.Africa.Eastern Africa",
"Geography.Regions.Africa.Northern Africa",
"Geography.Regions.Africa.Southern Africa",
"Geography.Regions.Africa.Western Africa",
"Geography.Regions.Americas.Central America",
"Geography.Regions.Americas.North America",
"Geography.Regions.Americas.South America",
"Geography.Regions.Asia.Asia*",
"Geography.Regions.Asia.Central Asia",
"Geography.Regions.Asia.East Asia",
"Geography.Regions.Asia.North Asia",
"Geography.Regions.Asia.South Asia",
"Geography.Regions.Asia.Southeast Asia",
"Geography.Regions.Asia.West Asia",
"Geography.Regions.Europe.Eastern Europe",
"Geography.Regions.Europe.Europe*",
"Geography.Regions.Europe.Northern Europe",
"Geography.Regions.Europe.Southern Europe",
"Geography.Regions.Europe.Western Europe",
"Geography.Regions.Oceania",
"History and Society.Business and economics",
"History and Society.Education",
"History and Society.History",
"History and Society.Military and warfare",
"History and Society.Politics and government",
"History and Society.Society",
"History and Society.Transportation",
"STEM.Biology",
"STEM.Chemistry",
"STEM.Computing",
"STEM.Earth and environment",
"STEM.Engineering",
"STEM.Libraries & Information",
"STEM.Mathematics",
"STEM.Medicine & Health",
"STEM.Physics",
"STEM.STEM*",
"STEM.Space",
"STEM.Technology"
],
"n_iter_no_change": null,
"scale": false
}
}
|
Output schema |
---|
{
"title": "Scikit learn-based classifier score with probability",
"properties": {
"prediction": {
"description": "The most likely labels predicted by the estimator",
"items": {
"type": "string"
},
"type": "array"
},
"probability": {
"description": "A mapping of probabilities onto each of the potential output labels",
"properties": {
"Geography.Regions.Asia.Southeast Asia": {
"type": "number"
},
"Culture.Media.Media*": {
"type": "number"
},
"History and Society.Transportation": {
"type": "number"
},
"Geography.Regions.Asia.West Asia": {
"type": "number"
},
"Culture.Media.Radio": {
"type": "number"
},
"Geography.Regions.Americas.South America": {
"type": "number"
},
"Geography.Regions.Africa.Western Africa": {
"type": "number"
},
"Culture.Philosophy and religion": {
"type": "number"
},
"Geography.Regions.Europe.Eastern Europe": {
"type": "number"
},
"Geography.Regions.Asia.South Asia": {
"type": "number"
},
"STEM.Earth and environment": {
"type": "number"
},
"Geography.Regions.Africa.Central Africa": {
"type": "number"
},
"Culture.Food and drink": {
"type": "number"
},
"History and Society.Society": {
"type": "number"
},
"Culture.Media.Software": {
"type": "number"
},
"STEM.Chemistry": {
"type": "number"
},
"Culture.Media.Films": {
"type": "number"
},
"STEM.Space": {
"type": "number"
},
"STEM.Medicine & Health": {
"type": "number"
},
"Geography.Regions.Europe.Northern Europe": {
"type": "number"
},
"Culture.Media.Television": {
"type": "number"
},
"STEM.Biology": {
"type": "number"
},
"Geography.Regions.Asia.East Asia": {
"type": "number"
},
"Geography.Regions.Americas.North America": {
"type": "number"
},
"Culture.Media.Video games": {
"type": "number"
},
"Geography.Regions.Asia.Asia*": {
"type": "number"
},
"Culture.Visual arts.Fashion": {
"type": "number"
},
"Culture.Sports": {
"type": "number"
},
"Culture.Media.Books": {
"type": "number"
},
"History and Society.Business and economics": {
"type": "number"
},
"STEM.Physics": {
"type": "number"
},
"History and Society.Military and warfare": {
"type": "number"
},
"Culture.Internet culture": {
"type": "number"
},
"Geography.Regions.Europe.Europe*": {
"type": "number"
},
"Culture.Biography.Biography*": {
"type": "number"
},
"Geography.Regions.Asia.North Asia": {
"type": "number"
},
"Geography.Regions.Africa.Southern Africa": {
"type": "number"
},
"Geography.Regions.Africa.Eastern Africa": {
"type": "number"
},
"Geography.Regions.Americas.Central America": {
"type": "number"
},
"Culture.Visual arts.Architecture": {
"type": "number"
},
"Culture.Media.Entertainment": {
"type": "number"
},
"STEM.Mathematics": {
"type": "number"
},
"Culture.Biography.Women": {
"type": "number"
},
"Culture.Literature": {
"type": "number"
},
"STEM.Libraries & Information": {
"type": "number"
},
"Geography.Regions.Asia.Central Asia": {
"type": "number"
},
"STEM.STEM*": {
"type": "number"
},
"History and Society.History": {
"type": "number"
},
"Culture.Linguistics": {
"type": "number"
},
"Geography.Geographical": {
"type": "number"
},
"STEM.Computing": {
"type": "number"
},
"Geography.Regions.Africa.Northern Africa": {
"type": "number"
},
"Culture.Visual arts.Comics and Anime": {
"type": "number"
},
"History and Society.Education": {
"type": "number"
},
"Culture.Performing arts": {
"type": "number"
},
"Culture.Visual arts.Visual arts*": {
"type": "number"
},
"Geography.Regions.Europe.Western Europe": {
"type": "number"
},
"STEM.Engineering": {
"type": "number"
},
"Geography.Regions.Oceania": {
"type": "number"
},
"Culture.Media.Music": {
"type": "number"
},
"STEM.Technology": {
"type": "number"
},
"History and Society.Politics and government": {
"type": "number"
},
"Geography.Regions.Africa.Africa*": {
"type": "number"
},
"Geography.Regions.Europe.Southern Europe": {
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
}
|
https://ores.wikimedia.org/v3/scores/cswiki/1234/articletopic
Output:
Example output |
---|
{
"cswiki": {
"models": {
"articletopic": {
"version": "1.3.0"
}
},
"scores": {
"1234": {
"articletopic": {
"score": {
"prediction": [
"STEM.STEM*",
"STEM.Space"
],
"probability": {
"Culture.Biography.Biography*": 0.0037581446757912217,
"Culture.Biography.Women": 0.0005751504978634069,
"Culture.Food and drink": 0.00013629102583591308,
"Culture.Internet culture": 0.00024705233108557957,
"Culture.Linguistics": 4.5023636851888105e-05,
"Culture.Literature": 0.000693481254355697,
"Culture.Media.Books": 0.0003302654788886533,
"Culture.Media.Entertainment": 0.0004557010040644442,
"Culture.Media.Films": 0.000745755840342992,
"Culture.Media.Media*": 0.0027738377186352623,
"Culture.Media.Music": 0.00017563847268040663,
"Culture.Media.Radio": 5.406588440219966e-05,
"Culture.Media.Software": 0.0008980023457288975,
"Culture.Media.Television": 0.000548303780375146,
"Culture.Media.Video games": 3.341663101629864e-05,
"Culture.Performing arts": 0.00010382012651605603,
"Culture.Philosophy and religion": 0.0018340714233612992,
"Culture.Sports": 0.0003340386603068036,
"Culture.Visual arts.Architecture": 0.0006493433462786338,
"Culture.Visual arts.Comics and Anime": 5.501988377413894e-05,
"Culture.Visual arts.Fashion": 0.00020240637526355807,
"Culture.Visual arts.Visual arts*": 0.0011734964014660275,
"Geography.Geographical": 0.003862913548780497,
"Geography.Regions.Africa.Africa*": 0.00283510137778092,
"Geography.Regions.Africa.Central Africa": 0.0007717336771633315,
"Geography.Regions.Africa.Eastern Africa": 5.4382462367102405e-05,
"Geography.Regions.Africa.Northern Africa": 0.0002468113306020045,
"Geography.Regions.Africa.Southern Africa": 0.005759778854208486,
"Geography.Regions.Africa.Western Africa": 4.758283244842901e-06,
"Geography.Regions.Americas.Central America": 0.0007230522994775956,
"Geography.Regions.Americas.North America": 0.008559027362312165,
"Geography.Regions.Americas.South America": 0.0010225938156441852,
"Geography.Regions.Asia.Asia*": 0.004625047209643945,
"Geography.Regions.Asia.Central Asia": 0.0005234422947221679,
"Geography.Regions.Asia.East Asia": 0.0036567708976141464,
"Geography.Regions.Asia.North Asia": 0.004117880625705837,
"Geography.Regions.Asia.South Asia": 0.001231314226046212,
"Geography.Regions.Asia.Southeast Asia": 0.0008340922220495317,
"Geography.Regions.Asia.West Asia": 0.0003554093910782288,
"Geography.Regions.Europe.Eastern Europe": 0.0065926663899134414,
"Geography.Regions.Europe.Europe*": 0.013979080013835353,
"Geography.Regions.Europe.Northern Europe": 0.00154029611316488,
"Geography.Regions.Europe.Southern Europe": 0.00068486964155431,
"Geography.Regions.Europe.Western Europe": 0.0027471763060663364,
"Geography.Regions.Oceania": 0.0003717339481496353,
"History and Society.Business and economics": 0.002207248293968202,
"History and Society.Education": 0.0004226747257376408,
"History and Society.History": 0.003777251589564783,
"History and Society.Military and warfare": 0.0047491280843299875,
"History and Society.Politics and government": 0.005142941696595345,
"History and Society.Society": 0.033398761452264884,
"History and Society.Transportation": 0.11443321001987419,
"STEM.Biology": 0.002447465453906354,
"STEM.Chemistry": 0.005747175118744066,
"STEM.Computing": 0.00045352819823348217,
"STEM.Earth and environment": 0.0033121889091357634,
"STEM.Engineering": 0.004281775261544969,
"STEM.Libraries & Information": 7.468451141451151e-05,
"STEM.Mathematics": 4.996334970267717e-05,
"STEM.Medicine & Health": 0.0007865993537385966,
"STEM.Physics": 0.29800230259682176,
"STEM.STEM*": 0.9983754315472244,
"STEM.Space": 0.996157360237683,
"STEM.Technology": 0.14559689671134318
}
}
}
}
}
}
}
|
Data
[edit]Licenses
[edit]- Code: MIT license
- Model: MIT license
Citation
[edit]Cite this model card as:
@misc{
Triedman_Bazira_2023_Czech_Wikipedia_article_topic,
title={ Czech Wikipedia article topic model card },
author={ Triedman, Harold and Bazira, Kevin },
year={ 2023 },
url={ https://meta.wikimedia.org/wiki/Machine_learning_models/Production/Czech_Wikipedia_article_topic }
}