You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ Dataset | Title
30
30
make_blobs | Generate isotropic Gaussian blobs for clustering. | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_moons.html)
31
31
make_moons | Make two interleaving half circles | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_blobs.html)
32
32
make_s_curve | Generate an S curve dataset. | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_s_curve.html)
33
+
make_circles | Make a large circle containing a smaller circle in 2d | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_circles.html])
33
34
make_regression | Generate a random regression problem. | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_regression.html])
34
35
make_classification | Generate a random n-class classification problem. | [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_classification.html])
Copy file name to clipboardExpand all lines: src/sklearn.jl
+31-4Lines changed: 31 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,37 @@ function generate_s_curve(; n_samples::Int = 100,
85
85
returnconvert(features, labels)
86
86
end
87
87
88
+
"""
89
+
function generate_circles(; n_samples::Int = 100,
90
+
shuffle::Bool = true,
91
+
noise::Float64 = 0.0,
92
+
random_state::Union{Int, Nothing} = nothing,
93
+
factor::Float64 = 0.8)::DataFrame
94
+
Make a large circle containing a smaller circle in 2d. Sklearn interface to make_circles.
95
+
# Arguments
96
+
- `n_samples::Union{Int, Tuple{Int, Int}} = 100`: If int, it is the total number of points generated. For odd numbers, the inner circle will have one point more than the outer circle. If two-element tuple, number of points in outer circle and inner circle.
97
+
- `shuffle::Bool = true`: Whether to shuffle the samples.
98
+
- `noise::Union{Nothing, Float64} = nothing`: Standard deviation of Gaussian noise added to the data.
99
+
- `random_state::Union{Int, Nothing} = nothing`: Determines random number generation for dataset shuffling and noise. Pass an int for reproducible output across multiple function calls.
100
+
- `factor::Float64 = 0.8`: Scale factor between inner and outer circle.
0 commit comments