From 9d0fc56170381d72501f865467041b9d6fa696c2 Mon Sep 17 00:00:00 2001
From: Fabian Pedregosa <fabian.pedregosa@inria.fr>
Date: Mon, 3 May 2010 09:25:21 +0000
Subject: [PATCH] ENH: add docstrings to module svm

git-svn-id: https://scikit-learn.svn.sourceforge.net/svnroot/scikit-learn/trunk@722 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8
---
 scikits/learn/svm.py | 61 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/scikits/learn/svm.py b/scikits/learn/svm.py
index 849a2c2b99..9d65748418 100644
--- a/scikits/learn/svm.py
+++ b/scikits/learn/svm.py
@@ -185,8 +185,14 @@ class SVC(BaseLibsvm):
     `support_` : array-like, shape = [nSV, nfeatures]
         Support vectors
 
-    `dual_coef_` : array, shape = [nclasses-1, nfeatures]
-        Coefficient of the support vector in the decision function.
+    `dual_coef_` : array, shape = [nclasses-1, nSV]
+        Coefficient of the support vector in the decision function,
+        where nclasses is the number of classes and nSV is the number
+        of support vectors.
+
+    `coef_` : array, shape = [nclasses-1, nfeatures]
+        Wiehgiths asigned to the features (coefficients in the primal
+        problem). This is only available in the case of linear kernel.
 
     `intercept_` : array, shape = [nclasses-1]
         constants in decision function
@@ -230,8 +236,14 @@ class SVR(BaseLibsvm):
     `support_` : array-like, shape = [nSV, nfeatures]
         Support vectors
 
-    `dual_coef_` : array, shape = [nclasses-1, nfeatures]
-        Coefficient of the support vector in the decision function.
+    `dual_coef_` : array, shape = [nclasses-1, nSV]
+        Coefficient of the support vector in the decision function,
+        where nclasses is the number of classes and nSV is the number
+        of support vectors.
+
+    `coef_` : array, shape = [nclasses-1, nfeatures]
+        Wiehgiths asigned to the features (coefficients in the primal
+        problem). This is only available in the case of linear kernel.
 
     `intercept_` : array, shape = [nclasses-1]
         constants in decision function
@@ -259,6 +271,23 @@ class OneClassSVM(BaseLibsvm):
     """
     Outlayer detection
 
+    Attributes
+    ----------
+    `support_` : array-like, shape = [nSV, nfeatures]
+        Support vectors
+
+    `dual_coef_` : array, shape = [nclasses-1, nSV]
+        Coefficient of the support vector in the decision function,
+        where nclasses is the number of classes and nSV is the number
+        of support vectors.
+
+    `coef_` : array, shape = [nclasses-1, nfeatures]
+        Wiehgiths asigned to the features (coefficients in the primal
+        problem). This is only available in the case of linear kernel.
+
+    `intercept_` : array, shape = [nclasses-1]
+        constants in decision function
+
     Methods
     -------
     fit(X, Y) : self
@@ -307,7 +336,29 @@ class LinearSVC(object):
         penalty is the standard used in SVC. The 'l1' leads to coef_
         vectors that are sparse.
 
-    TODO: wrap Cramer & Singer
+
+    Attributes
+    ----------
+    `support_` : array-like, shape = [nSV, nfeatures]
+        Support vectors
+
+    `dual_coef_` : array, shape = [nclasses-1, nSV]
+        Coefficient of the support vector in the decision function,
+        where nclasses is the number of classes and nSV is the number
+        of support vectors.
+
+    `coef_` : array, shape = [nclasses-1, nfeatures]
+        Wiehgiths asigned to the features (coefficients in the primal
+        problem). This is only available in the case of linear kernel.
+
+    `intercept_` : array, shape = [nclasses-1]
+        constants in decision function
+
+
+    Notes
+    -----
+    Some features of liblinear are still not wrapped, like the Cramer
+    & Singer algorithm.
 
     References
     ----------
-- 
GitLab