|
53 | 53 |
|
54 | 54 | # Authors: Clay Woolam <[email protected]> |
55 | 55 | # Licence: BSD |
56 | | - |
57 | 56 | from abc import ABCMeta, abstractmethod |
58 | 57 | from scipy import sparse |
59 | 58 | import numpy as np |
@@ -95,6 +94,7 @@ class BaseLabelPropagation(six.with_metaclass(ABCMeta, BaseEstimator, |
95 | 94 | tol : float |
96 | 95 | Convergence tolerance: threshold to consider the system at steady |
97 | 96 | state |
| 97 | +
|
98 | 98 | """ |
99 | 99 |
|
100 | 100 | def __init__(self, kernel='rbf', gamma=20, n_neighbors=7, |
@@ -280,6 +280,20 @@ class LabelPropagation(BaseLabelPropagation): |
280 | 280 | Convergence tolerance: threshold to consider the system at steady |
281 | 281 | state |
282 | 282 |
|
| 283 | + Attributes |
| 284 | + ---------- |
| 285 | + `X_` : array, shape = [n_samples, n_features] |
| 286 | + Input array |
| 287 | +
|
| 288 | + `classes_` : array, shape = [n_classes] |
| 289 | + The distinct labels used in classifying instances. |
| 290 | +
|
| 291 | + `label_distributions_` : array, shape = [n_samples, n_classes] |
| 292 | + Categorical distribution for each item |
| 293 | +
|
| 294 | + `transduction_` : array, shape = [n_samples] |
| 295 | + Label assigned to each item via the transduction |
| 296 | +
|
283 | 297 | Examples |
284 | 298 | -------- |
285 | 299 | >>> from sklearn import datasets |
@@ -345,6 +359,20 @@ class LabelSpreading(BaseLabelPropagation): |
345 | 359 | Convergence tolerance: threshold to consider the system at steady |
346 | 360 | state |
347 | 361 |
|
| 362 | + Attributes |
| 363 | + ---------- |
| 364 | + `X_` : array, shape = [n_samples, n_features] |
| 365 | + Input array |
| 366 | +
|
| 367 | + `classes_` : array, shape = [n_classes] |
| 368 | + The distinct labels used in classifying instances. |
| 369 | +
|
| 370 | + `label_distributions_` : array, shape = [n_samples, n_classes] |
| 371 | + Categorical distribution for each item |
| 372 | +
|
| 373 | + `transduction_` : array, shape = [n_samples] |
| 374 | + Label assigned to each item via the transduction |
| 375 | +
|
348 | 376 | Examples |
349 | 377 | -------- |
350 | 378 | >>> from sklearn import datasets |
|
0 commit comments