Hi Krishna,

I have no problem seeing the difference between n_labels=2 and n_labels=10.
However the number of labels per sample can never exceed n_classes, so it
is not really the mean number of labels per sample, but the expected value
of the Poisson distribution from which the number of labels is sampled with
samples > n_classes rejected.

n_labels is currently allowed to be set well above n_classes, but it stops
being an interesting problem when all samples are labelled with all classes.

Empirically we can see the average number of labels increase with n_labels,
limited by n_classes:

>>> for n_labels in range(1, 20):
...     X, Y = make_multilabel_classification(n_samples=200, n_classes=5,
n_labels=n_labels, return_indicator=True, random_state=0)
...     avg_n_labels = Y.sum(axis=1).mean()
...     print(n_labels, '%0.2f' % avg_n_labels)
...
1 0.96
2 1.95
3 2.66
4 3.12
5 3.73
6 3.87
7 4.08
8 4.09
9 4.30
10 4.32
11 4.33
12 4.43
13 4.56
14 4.53
15 4.62
16 4.67
17 4.61
18 4.62
19 4.64


On 19 August 2014 23:31, km <srikrishnamo...@gmail.com> wrote:

> Hi all,
>
> I am using the make_multilabel_classification function to generate X and Y
> The function help reads:
> ...
> n_labels : int, optional (default=2)
>         The average number of labels per instance. Number of labels follows
>         a Poisson distribution that never takes the value 0.
> ...
>
> but then I donot see any change in X and Y generated if I change n_labels
> argument value, for example from 2(default) or 10
> Is there a way I can check it ?
>
>
> Regards,
> Krishna
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to