forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
How to write docs
fabianp edited this page Sep 8, 2010
·
11 revisions
Some guidelines on writing documentation
The class should have a docstring with the fields Parameters, Attributes, Examples, See also. Example:
class Foo (BaseEstimator):
"""
C-Support Vector Classification.
Parameters
----------
C : float, optional (default=1.0)
penalty parameter C of the error term.
kernel : string, optional
Specifies the kernel type to be used in the algorithm.
one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'.
If none is given 'rbf' will be used.
cache_size: float, optional
specify the size of the cache (in MB)
Attributes
----------
`bar_` : array-like, shape = [n_features]
Brief description of this attribute.
Examples
--------
>>> clf = Foo()
>>> clf.fit()
[]
See also
--------
OtherClass
"""