|
40 | 40 | generate_blobs(; n_samples::Union{Int, Array{Int, 1}} = 100,
|
41 | 41 | n_features::Int = 2,
|
42 | 42 | centers::Union{Int, Union{Nothing, Array{Float64, 2}}} = nothing,
|
43 |
| - cluster_std = 1.0, |
44 |
| - center_box::Tuple{Float64, Float64} = (-10.0, 10.0), |
| 43 | + cluster_std::Union{Float64, Array{Float64, 1}} = 1.0, |
| 44 | + center_box = (-10.0, 10.0), |
45 | 45 | shuffle::Bool = true,
|
46 | 46 | random_state::Union{Int, Nothing} = nothing)::DataFrame
|
47 | 47 | Make two interleaving half circles. Sklearn interface to make_moons.
|
48 | 48 | # Arguments
|
49 | 49 | - `n_samples = 100`: If int, it is the total number of points equally divided among clusters. If array-like, each element of the sequence indicates the number of samples per cluster.
|
50 | 50 | - `n_features = 2`: The number of features for each sample.
|
51 | 51 | - `centers::Union{Int, Union{Nothing, Array{Float64, 2}}} = nothing`: The number of centers to generate, or the fixed center locations. If n_samples is an int and centers is None, 3 centers are generated. If n_samples is array-like, centers must be either None or an array of length equal to the length of n_samples.
|
52 |
| -- `cluster_std = 1.0`: |
53 |
| -- `center_box::Tuple{Float64, Float64} = (-10.0, 10.0)`: |
| 52 | +- `cluster_std::Union{Float64, Array{Float64, 1}} = 1.0`: The standard deviation of the clusters. |
| 53 | +- `center_box::Tuple{Float64, Float64} = (-10.0, 10.0)`: The bounding box for each cluster center when centers are generated at random. |
54 | 54 | - `shuffle::Bool = true`: Shuffle the samples.
|
55 | 55 | - `random_state::Union{Int, Nothing} = nothing`: Determines random number generation for dataset shuffling and noise.
|
56 | 56 | Reference: [link](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_blobs.html)
|
57 | 57 | """
|
58 | 58 | function generate_blobs(;n_samples::Union{Int, Array{Int, 1}} = 100,
|
59 | 59 | n_features::Int = 2,
|
60 | 60 | centers::Union{Int, Union{Nothing, Array{Float64, 2}}} = nothing,
|
61 |
| - cluster_std = 1.0, |
| 61 | + cluster_std::Union{Float64, Array{Float64, 1}} = 1.0, |
62 | 62 | center_box::Tuple{Float64, Float64} = (-10.0, 10.0),
|
63 | 63 | shuffle::Bool = true,
|
64 | 64 | random_state::Union{Int, Nothing} = nothing)::DataFrame
|
|
0 commit comments