|
1 |
| -from typing import Dict, Callable, Any, Optional, Union, List |
| 1 | +from typing import Any, Callable, Dict, List, Optional, Union |
2 | 2 |
|
3 | 3 | import numpy as np
|
4 | 4 | from skimage.color import rgb2gray
|
5 | 5 | from skimage.filters import sobel
|
6 |
| -from skimage.segmentation import felzenszwalb, slic, quickshift, watershed |
7 |
| -from sklearn.linear_model import Ridge, BayesianRidge, Lasso, LinearRegression |
| 6 | +from skimage.segmentation import felzenszwalb, quickshift, slic, watershed |
| 7 | +from sklearn.linear_model import BayesianRidge, Lasso, LinearRegression, Ridge |
8 | 8 |
|
9 | 9 | SAMPLES_PREDICTIONS_LABEL_IDX_DOC = """
|
10 | 10 | samples : np.ndarray
|
|
30 | 30 | The type of linear model to fit.
|
31 | 31 | Available options are `"bayesian_ridge"`, `"lasso"`, and `"linear_regression"`.
|
32 | 32 |
|
33 |
| - See [the `scikit-learn` documentation](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model) |
| 33 | + See the |
| 34 | + [`scikit-learn` documentation](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model) |
34 | 35 | for details on each of the methods.
|
35 | 36 | """
|
36 | 37 |
|
@@ -83,7 +84,8 @@ def create_segments(
|
83 | 84 | Which method and settings are appropriate is highly use-case specific.
|
84 | 85 |
|
85 | 86 | For an introduction into image segmentation and a comparison of the different methods, see
|
86 |
| - [this tutorial in the `scikit-learn` documentation](https://scikit-image.org/docs/stable/auto_examples/segmentation/plot_segmentations.html). |
| 87 | + [this tutorial](https://scikit-image.org/docs/stable/auto_examples/segmentation/plot_segmentations.html) |
| 88 | + in the `scikit-learn` documentation. |
87 | 89 |
|
88 | 90 | Parameters
|
89 | 91 | ----------
|
@@ -349,5 +351,5 @@ def weigh_segments(
|
349 | 351 | segment_weights : np.ndarray
|
350 | 352 | Array of length `num_of_segments` where each entry corresponds to the segment's coefficient
|
351 | 353 | in the fitted linear model.
|
352 |
| - |
| 354 | +
|
353 | 355 | """
|
0 commit comments