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

apachecn/sklearn-doc-zh: the Chinese scikit-learn documentation mirror, and when to use it

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

5,230 stars1,457 forksCSSNOASSERTION

At a glance

What is it?
This repository packages a Chinese translation of the scikit-learn user guide and serves it as a static site through Docker, PyPI or NPM. It is a reading aid pinned to version 0.21.3, not a substitute for the current English docs.
Who is it for?
Adopt it if you read Chinese and need the scikit-learn user guide offline or on an internal network, and you are working with APIs that existed around version 0.21.3. Do not adopt it if you need documentation for the version you actually have installed, or if you need the API reference, which this project links out to the English site rather than translating.
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 35 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 October 1, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What apachecn/sklearn-doc-zh actually is

The repository is a translated copy of the scikit-learn user guide, tutorials and FAQ, rendered as a static website. The README describes it as the official Chinese documentation for scikit-learn and links to a hosted build at sklearn.apachecn.org. The project also ships an EPUB download and a GitBook-style source tree under docs/master, with one file per chapter: 1.md for supervised learning, 22.md for clustering, 38.md for Pipeline and FeatureUnion, and so on.

The intended reader is a Chinese-speaking engineer or student who finds the English documentation slow to read. That is the whole scope. This is not a library, not a wrapper around scikit-learn, and not an API. Nothing in the repository changes how scikit-learn behaves. If you install it, you get a web server with HTML pages.

The README is explicit that the translation targets version 0.21.3, and the only release entry in the repository is v0.19.x, dated 2019-08-04. An older 0.18 translation is mentioned as living on a wiki. The version gap is the single most important fact about this project.

How the documentation is built and served

The layout is a static site. The root holds index.html, 404.html, SUMMARY.md, NAV.md, asset/ and img/, with the chapter markdown under docs/. A Dockerfile sits at the top level and does one thing:

dockerfile
FROM httpd:2.4
COPY ./ /usr/local/apache2/htdocs/

That is the entire build. The repository contents are copied into the document root of an Apache httpd image. There is no compilation step, no Node build, no search index generation. Whatever is committed is what gets served.

The update.sh script at the top level is the only other automation visible in the file listing, and the README does not document what it does. For historical versions the README gives a manual procedure instead: unzip 0.19.x.zip, copy the image assets from master/img into the extracted 0.19.x directory, then run sh run_website.sh for a normal GitBook build. That instruction set implies the images are shared across versions and are not bundled inside each version archive, which is a small but real trap if you try to build an old version in isolation.

Installing and opening the Chinese sklearn docs locally

The README offers three install paths. All three end with a local HTTP server on a port you choose. Pick one.

Docker is the least invasive. The image is published as apachecn0/sklearn-doc-zh and the container listens on port 80 internally, so you map it to a host port:

bash
# replace <port> with a free host port, for example 8080
docker pull apachecn0/sklearn-doc-zh
docker run -tid -p <port>:80 apachecn0/sklearn-doc-zh

After the container starts, open http://localhost:{port} in a browser. You should see the Chinese documentation index with the chapter navigation described in the README table of contents.

If you prefer Python, the package is on PyPI under the same name. The CLI takes the port as its argument:

bash
pip install sklearn-doc-zh
sklearn-doc-zh <port>

The NPM route is identical in shape:

bash
npm install -g sklearn-doc-zh
sklearn-doc-zh <port>

In both CLI cases the README says to visit http://localhost:{port} to read the documentation. Note that sklearn-doc-zh is the documentation server, not scikit-learn itself. Installing it does not install scikit-learn, and installing scikit-learn does not give you this site.

The version gap is the real limitation

The site advertises 0.21.3. scikit-learn has moved a long way since then, and the parts of the library that changed most are exactly the parts people look up. Estimator parameters were renamed and removed across releases, defaults shifted, and modules were reorganised. A reader who copies a constructor signature out of a 0.21.3 page into a current environment may get a TypeError or, worse, silently different behaviour from a changed default.

The API reference is not translated. The README's table of contents points the API entry at scikit-learn.org/stable/modules/classes.html, the English site. So the Chinese project covers the narrative guide and tutorials, and defers the reference material. If your question is "what arguments does this class take in the version I have installed", this project is the wrong tool, and it says so by linking away.

There is also no documented rollback or version-pinning story for the served site beyond the historical archives. The README describes how to compile 0.19.x and 0.18 from zips, but does not describe how to serve two versions side by side or how to switch the master build to a different upstream version.

Alternatives and how they differ in approach

The obvious alternative is the upstream English documentation at scikit-learn.org. It is versioned, it is regenerated for each release, and it includes the API reference in the same tree. The difference is not quality, it is language and freshness: upstream is always current and always English, while this project is Chinese and pinned.

A second option is machine translation in the browser. That keeps you on the current English page, so version drift disappears, but terminology becomes inconsistent between pages and code samples can be mangled. The apachecn translation has the opposite trade-off: consistent human terminology, stale version.

A third option is to read the source. scikit-learn docstrings are the reference of record, and they ship with the installed package, so `help(SomeEstimator)` always matches your environment. That is the most accurate path and the least readable one, especially if English is the barrier you were trying to remove in the first place. Choosing between these three is really choosing which of accuracy, language and reading comfort you are willing to give up.

Maintenance, licensing and what upgrading costs you

The last push to the repository was on 2026-08-27, so commits are still landing. The only release listed, however, is v0.19.x from 2019-08-04, and the site's own banner says 0.21.3. Treat commit activity and content currency as separate signals here: a recent push does not mean the translated text tracks a recent scikit-learn.

Upgrading has no dependency cost, because there is nothing to keep in sync with your Python environment. The cost is editorial. Moving the translation to a newer upstream version means re-translating or re-reviewing the affected chapters, and the README's contributor requirements ask for at least six months of scikit-learn use and three merged pull requests before someone takes a lead role. That is a high bar for a volunteer translation, and it explains the drift.

On licensing, the README states that projects under the ApacheCN account without an explicit licence are treated as CC BY-NC-SA 4.0. The repository's own LICENSE file is present but the metadata reports the licence as NOASSERTION, so the two do not agree on their face. The README also says commercial use is prohibited, attribution and a source link are required, and no email application is needed. scikit-learn itself is BSD-licensed according to the README, but that covers the upstream project, not this translation. If you plan to redistribute the translated text, read both files yourself; this is a description of what the repository says, not legal advice.

Editorial conclusion

Adopt it if you read Chinese and need the scikit-learn user guide offline or on an internal network, and you are working with APIs that existed around version 0.21.3. Do not adopt it if you need documentation for the version you actually have installed, or if you need the API reference, which this project links out to the English site rather than translating. Before relying on it, check the version banner on the site against your installed scikit-learn, and confirm whether the specific page you need is a translation or a stub. The last push to the repository was on 2026-08-27, but the newest release listed is v0.19.x from 2019-08-04, and the site itself advertises 0.21.3, so the commit activity and the content version are not the same thing.

Frequently asked questions

What is the purpose of sklearn?

scikit-learn is a Python machine learning library built on NumPy, SciPy and matplotlib, offering data mining and analysis tools that the README says can be reused across environments. This repository does not implement any of that; it provides a Chinese translation of the library's documentation.

Is sklearn obsolete?

This repository only translates documentation for version 0.21.3, and nothing in it addresses the library's current standing. What can be said is that the translation is pinned to that older version while the upstream project continues, so the Chinese pages lag the library rather than the library being abandoned.

Is scikit-learn still relevant in 2026?

The repository gives no statement on this. Its README still links to the English scikit-learn site and describes the library as an open source tool usable commercially under the BSD licence, but nothing in the repository measures current relevance.

Is sklearn a Python package?

Yes. The README describes scikit-learn as a Python machine learning tool built on NumPy, SciPy and matplotlib. Separately, this documentation project is itself distributed as a Python package named sklearn-doc-zh, which serves the translated site rather than the library.

Official sources

  1. apachecn/sklearn-doc-zh on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/apachecn-sklearn-doc-zh.svg)](https://hysenlabs.com/projects/apachecn-sklearn-doc-zh)