Self-hosted service
apachecn/sklearn-doc-zh avatar
apachecn/sklearn-doc-zh

apachecn/sklearn-doc-zh: a Chinese translation of the scikit-learn docs, pinned to 0.21.3

:book: [译] scikit-learn(sklearn) 中文文档

5,227 stars1,457 forksCSSNOASSERTION

At a glance

What is it?
The repository ships a Chinese rendering of the scikit-learn user guide, tutorials and examples, plus Docker, PyPI and npm packages that serve the pages locally. Its content tracks sklearn 0.21.3, so its value depends entirely on whether your codebase is older than the library you are reading about.
Who is it for?
Adopt this if your team reads Chinese faster than English and your scikit-learn version is 0.21.3 or close to it. Skip it if you are on a current release, because the translated API pages will describe estimators and parameters that no longer match what you import.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 20 days ago.
What is it written in?
Mainly CSS, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap this fills: scikit-learn's manual is English-only

scikit-learn's documentation is long, cross-referenced and written in English. For a Chinese-speaking engineer learning the library, the cost is not reading one page, it is reading the user guide end to end: supervised learning, unsupervised learning, model selection, dataset loading, plus the tutorial track. This repository is the ApacheCN translation of that manual, and it is aimed at exactly that reader. The README describes the project as the Chinese version of the official scikit-learn documentation and links a hosted site at sklearn.apachecn.org alongside the English original. It is not a tutorial written from scratch and it is not a set of blog posts. It is a translated mirror with a table of contents that maps onto the upstream structure, from installation through the user guide, the tutorials, the FAQ and a timeline page. If you already read English documentation comfortably, this project adds nothing. If you are onboarding someone who does not, it removes a real barrier, with one large caveat about versioning that the rest of this article deals with.

The version pin is 0.21.3, and that is the whole story

The hosted site is labelled sklearn 0.21.3 Chinese documentation, and the same label appears on the examples index. The only listed release is v0.19.x, dated 2019-08-04, and the repository also keeps a 0.19.x.zip archive and a link to an older 0.18 translation hosted on a cwiki page. So the translation is not a rolling mirror of upstream. It is a snapshot. What that means in practice: the chapter on generalized linear models, the section on cross-validation, the page on model persistence all describe the 0.21.3 API. If your project imports scikit-learn 1.x, some of what you read will be stale, and the failure mode is quiet. You read a parameter name, type it, and get a TypeError or a deprecation warning rather than a wrong answer. The README does not state an update cadence, and the last push timestamp alone does not tell you whether the translated prose or only the surrounding tooling changed. Treat the version label as the contract, not the commit date.

How the translated pages are organised and served

The repository is a documentation site, and the primary language reported for it is CSS, which is a reasonable hint about where the bulk of the tracked files sit. The README's table of contents is a list of relative paths under docs/master, one numbered file per chapter, for example docs/master/1.md for supervised learning, docs/master/2.md for generalized linear models, and docs/master/38.md for pipelines and feature unions. The numbering follows the upstream manual's ordering rather than the translation's own logic, which makes it easy to jump between a translated page and its English counterpart. Images live under img, and the README notes that when compiling an older version you copy master/img into the extracted 0.19.x folder before building. The build path mentioned for historical versions is a shell script, sh run_website.sh, described as the normal gitbook compilation process. The current site is published through GitHub Pages at the sklearn.apachecn.org domain, and there is an EPUB build published on a separate epub branch, named with the version and a date. So the data flow is: Markdown sources under docs/master, image assets under img, a gitbook build, and a static site. That is a conventional docs pipeline, and nothing in the material suggests a translation memory, a glossary enforcement step, or a diff against upstream.

Getting it running locally: Docker, pip or npm

You do not have to build the site to read it, since the hosted version exists, but the README gives three ways to serve it yourself. Docker: docker pull apachecn0/sklearn-doc-zh, then docker run -tid -p <port>:80 apachecn0/sklearn-doc-zh, and open http://localhost:{port}. PyPI: pip install sklearn-doc-zh followed by sklearn-doc-zh <port>. npm: npm install -g sklearn-doc-zh followed by the same sklearn-doc-zh <port> command. All three end at the same local HTTP endpoint, so the choice is about which package manager your environment already trusts. Two things to note. First, the port argument is positional in the pip and npm cases, not a flag. Second, the Docker route maps container port 80, so the host port is whatever you pass to -p. For the historical 0.19.x documentation the README describes a different path: unzip 0.19.x.zip, copy the image assets from master/img into the extracted folder, then run sh run_website.sh. That sequence exists because the archive does not carry its own images, which is a small but real friction point if you need the older text.

Translation drift is the failure mode you should plan for

Machine learning terminology in Chinese is not fully standardised. Estimator, transformer, fit, score, kernel, regularization: different translators pick different renderings, and a translated manual can end up using a term that does not match the one your colleague uses, or the one in a Chinese-language paper you are reading. The repository's contribution guide is effectively empty in the README, so there is no published glossary or style rule to point at. The second failure mode is structural rather than linguistic. Because the translation is pinned to 0.21.3, the API reference link in the table of contents points outward to the English classes page on scikit-learn.org, which tracks the current release. A reader can therefore move from a translated chapter describing 0.21.3 behaviour to an English reference page describing current behaviour without any visible signal that the two disagree. If you are debugging a version-specific error, read the English documentation for your installed version and use the translation only for concepts. That is the boundary worth drawing explicitly, because the site itself does not draw it.

The alternative is the English site, and the difference is not just language

The obvious alternative is scikit-learn.org, which the README links directly. The difference is not only that one is in Chinese. The English site carries a version selector, so you can read the documentation for the release you actually installed, and its API reference is generated from the current source rather than translated by hand. That matters for anything involving signatures, defaults or deprecation. A second alternative is the community of Chinese-language scikit-learn tutorials and blog posts, which tend to be shorter and example-driven. Those are worse as a reference and better as an introduction, because they reflect one author's workflow rather than the library's own structure. A third option is to run the translation locally through the pip or npm package and pair it side by side with the English page for the same chapter. That is the arrangement the repository's own numbering supports, since docs/master/2.md and the English generalized linear models page cover the same ground in the same order. Use the translation for prose, the English page for signatures.

Maintenance, licensing and what the README actually commits to

The maintenance signal here is mixed and the README does not resolve it. The project lists two负责人 cohorts, one from 2017-09-29 and one from 2019-06-29, and states requirements for new leads: at least half a year of scikit-learn use, three or more pull requests, a two-month trial period. That is a real onboarding path, but it also means continuity depends on volunteers, and the only release listed is v0.19.x from 2019. The README's contribution guide section is empty. On licensing, be careful. The repository metadata reports NOASSERTION, while the README states that ApacheCN projects without a licence are treated as CC BY-NC-SA 4.0, and adds that commercial use is prohibited, attribution and a source link are required, and no application email is needed. Those two statements do not obviously agree, and the README text around them is informal. If you plan to redistribute the translated pages, or to use them inside a company, check the actual licence file in the repository and get your own answer rather than relying on the README paragraph. Note also that scikit-learn itself is BSD-licensed, which is a separate matter from the licence on this translation.

Who this is for, and the one check to run first

This is for a Chinese-speaking engineer or student who is learning scikit-learn's concepts and wants the user guide, the tutorials and the examples in Chinese, on a project that is at or near version 0.21.3. It is also useful as a reading aid next to the English manual, because the chapter numbering lines up. It is the wrong tool if you are on a current scikit-learn release and need accurate signatures, if you need the API reference in Chinese (the table of contents links to the English classes page), or if you need to redistribute the content commercially. The check to run before trusting a chapter: open the same chapter on scikit-learn.org, confirm the version selector is set to the release you have installed, and compare the estimator names and parameters against what you import. If they match, read the translation. If they do not, the translation is describing a library you are not using.

Editorial conclusion

Adopt this if your team reads Chinese faster than English and your scikit-learn version is 0.21.3 or close to it. Skip it if you are on a current release, because the translated API pages will describe estimators and parameters that no longer match what you import. Before relying on any chapter, open the corresponding English page at scikit-learn.org and diff the version selector, then check the repository's licence file rather than the README prose, since the repository reports NOASSERTION while the README claims CC BY-NC-SA 4.0 for untagged ApacheCN projects.

Official sources

  1. apachecn/sklearn-doc-zh on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Community notes

Community notes