Hi.
Afaik VC dimension is mostly of theoretical interest and not of much
practical value as the bounds tend to be very lose.
If you have any practical application, I would be interested.
VC dimension is a property of a class of hypotheses, so it is nothing
that refers to the parameter that you estimated but rather to the
class that you consider for fitting.
So it doesn't really make sense to write any code.
Basically for all linear classifiers you can return n_features + 1 for
example.
For the rbf SVM you can give a formular in terms of gamma and the
diameter of the data.
I'm sure for naive bayes there is an easy formular, too, while decision
trees have a VC dimension
that is basically the number of leaves you allow. Not sure the VC
dimension for random forests is known
in any meaningful way.
The VC dimension of KNN is inverse proportional to n_neighbors, though
the precise formula eludes me.
Btw, there are stronger bounds for some classifiers. For example there
are margin-based bounds for SVMs
(I think they might even be implemented in the svm module?), that are
independent of the feature dimension.
Hth,
procrastinating Andy
On 03/13/2013 03:32 PM, ShNaYkHs ShNaYkHs wrote:
Hello all,
Is it possible to get the VC dimension (Vapnik--Chervonenkis
dimension) of the supervised classifiers of sklearn ? Do someone know
how or if it is actually possible to add this utility to sklearn ?
The VC dimension is a pretty important utility, since it can predict
an upper bound on the test error of a classification model (without
doing the test ...).
http://en.wikipedia.org/wiki/VC_dimension
Best,
ShNaYkHs.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general