Skip to contents

Points are drawn from a uniform distribution between -1 and 1, the pipe structure is generated by rejecting points if they are not on a circle with radius 1 and thickness t in the last two parameters.

Usage

pipe_data(n, p, t = 0.1)

Arguments

n

number of sample points to generate

p

sample dimensionality

t

thickness of circle, default=0.1

Value

sample points in tibble format

Examples

pipe_data(100, 4)
#> # A tibble: 100 × 4
#>        V1      V2     V3     V4
#>     <dbl>   <dbl>  <dbl>  <dbl>
#>  1  0.544 -0.195  -0.834  0.602
#>  2  0.520  0.127   0.333  0.981
#>  3 -1.06  -0.769   0.963 -0.140
#>  4 -0.624 -0.759   0.222  0.942
#>  5  0.276 -0.0717  0.690 -0.699
#>  6  0.844 -0.115  -0.451 -0.940
#>  7  0.372  0.894   0.494 -0.885
#>  8  0.530 -0.763  -0.944  0.234
#>  9 -0.754 -0.181  -0.640 -0.790
#> 10 -0.886  1.01   -0.758 -0.588
#> # ℹ 90 more rows
pipe_data(100, 2, 0.5)
#> # A tibble: 100 × 2
#>        V1      V2
#>     <dbl>   <dbl>
#>  1 -0.910  0.0996
#>  2  0.774  0.0777
#>  3  0.883  1.02  
#>  4  0.979  0.115 
#>  5 -0.918  0.0930
#>  6 -0.643 -0.644 
#>  7 -0.701  0.420 
#>  8 -0.514 -0.535 
#>  9 -0.731  0.710 
#> 10 -0.638 -0.784 
#> # ℹ 90 more rows