Skip to contents

The regression problem Friedman 1 as described in Friedman (1991) and Breiman (1996). Inputs are 10 independent variables uniformly distributed on the interval \([0,1]\), only 5 out of these 10 are actually used. Outputs are created according to the formula $$y = 10 \sin(\pi x1 x2) + 20 (x3 - 0.5)^2 + 10 x4 + 5 x5 + e$$ where e is \(N(0,sd^2)\).

Usage

sim_Friedman1(n, sd = 1)

Arguments

n

number of data points to create

sd

standard deviation of noise, with default value 1

Value

Returns a list with components

x

input values (independent variables)

y

output values (dependent variable)

References

Breiman, Leo (1996) Bagging predictors. Machine Learning 24, pages 123-140.
Friedman, Jerome H. (1991) Multivariate adaptive regression splines. The Annals of Statistics 19 (1), pages 1-67.

See also

Other bark simulation functions: sim_Friedman2(), sim_Friedman3(), sim_circle()

Other bark functions: bark(), bark-package, bark-package-deprecated, sim_Friedman2(), sim_Friedman3(), sim_circle()

Examples

sim_Friedman1(100, sd=1)
#> $x
#>               [,1]        [,2]       [,3]        [,4]        [,5]        [,6]
#>   [1,] 0.977380270 0.477520874 0.33113064 0.374447375 0.855878965 0.200994965
#>   [2,] 0.424801325 0.734171442 0.08542446 0.952966111 0.737965429 0.737973025
#>   [3,] 0.240856775 0.232918567 0.45505486 0.303719032 0.739449791 0.441027514
#>   [4,] 0.245136969 0.037699538 0.08623863 0.839970833 0.046885878 0.615325428
#>   [5,] 0.300084044 0.826897842 0.46582405 0.596851202 0.341006053 0.140418951
#>   [6,] 0.669545987 0.710961461 0.06898513 0.037500674 0.622262364 0.185500207
#>   [7,] 0.617027363 0.160426183 0.95395722 0.689393556 0.962945982 0.224820661
#>   [8,] 0.969934778 0.776050363 0.61000798 0.832507574 0.484459572 0.635611401
#>   [9,] 0.509107380 0.509992400 0.28822065 0.765475144 0.680290780 0.331843600
#>  [10,] 0.475968196 0.364945031 0.48108593 0.868914143 0.534667206 0.837145870
#>  [11,] 0.874517240 0.591024250 0.59503920 0.101448478 0.452286255 0.521626037
#>  [12,] 0.911020397 0.635148091 0.85037336 0.376595923 0.565872689 0.632914172
#>  [13,] 0.978652709 0.066128799 0.21363792 0.104509617 0.821273882 0.348126601
#>  [14,] 0.525277970 0.650644467 0.21524916 0.186201808 0.919055045 0.287297755
#>  [15,] 0.368255067 0.966708176 0.43637349 0.012217144 0.832203222 0.850674329
#>  [16,] 0.141336726 0.820066494 0.36656429 0.121264233 0.096442810 0.630130341
#>  [17,] 0.068195822 0.041683093 0.99218312 0.021366252 0.625383925 0.340994850
#>  [18,] 0.226874778 0.236831261 0.50212141 0.238877129 0.111880600 0.381373118
#>  [19,] 0.655688986 0.979969278 0.95221542 0.466551667 0.892547670 0.913319348
#>  [20,] 0.409421722 0.990383977 0.96439853 0.712230857 0.557769136 0.333901190
#>  [21,] 0.740675967 0.970546802 0.51273512 0.821041391 0.509167812 0.607151054
#>  [22,] 0.984876040 0.193704889 0.27220447 0.904050054 0.195884654 0.361187232
#>  [23,] 0.863899324 0.395804560 0.70704386 0.753740171 0.681723390 0.006179304
#>  [24,] 0.868936036 0.839008253 0.08312095 0.915432119 0.637724255 0.155549878
#>  [25,] 0.698600073 0.792981049 0.19885468 0.265487925 0.815769697 0.779478101
#>  [26,] 0.511090977 0.089850025 0.42509921 0.504711035 0.946675238 0.562546084
#>  [27,] 0.831939655 0.583166800 0.76246630 0.273473306 0.856180242 0.274439271
#>  [28,] 0.332642986 0.105344373 0.28110844 0.949781639 0.091699932 0.677426438
#>  [29,] 0.463823137 0.135850132 0.26002468 0.451658254 0.719161314 0.741769106
#>  [30,] 0.109409419 0.634295062 0.14811467 0.901171576 0.935270046 0.354176805
#>  [31,] 0.586410358 0.229267603 0.95557950 0.837081442 0.361929137 0.872761856
#>  [32,] 0.453935887 0.249100239 0.68624690 0.173048422 0.076809715 0.336870968
#>  [33,] 0.568549671 0.512705409 0.41734303 0.068276537 0.956458417 0.685418595
#>  [34,] 0.066516466 0.997796192 0.15670801 0.166173570 0.518820177 0.670704237
#>  [35,] 0.531863235 0.671008959 0.42260697 0.141690655 0.188062635 0.577082316
#>  [36,] 0.489981490 0.076098994 0.84638458 0.887353336 0.104480397 0.593730333
#>  [37,] 0.965408497 0.706395926 0.33882590 0.987632640 0.618675198 0.815625898
#>  [38,] 0.743679992 0.120907484 0.99369930 0.776756294 0.296049240 0.447136084
#>  [39,] 0.711304484 0.308503189 0.99302754 0.276872151 0.392215308 0.489430065
#>  [40,] 0.045485619 0.616634446 0.65171221 0.001723929 0.119553519 0.650726150
#>  [41,] 0.081177270 0.333159736 0.69964927 0.196960391 0.353409183 0.631927129
#>  [42,] 0.118429153 0.362928265 0.57991727 0.728620808 0.825388022 0.354550665
#>  [43,] 0.956122459 0.124529329 0.11656838 0.971042374 0.799543917 0.271931523
#>  [44,] 0.391856718 0.564223621 0.31540431 0.133380391 0.799540167 0.333058138
#>  [45,] 0.965927137 0.794091080 0.97132232 0.950440770 0.524354057 0.166943557
#>  [46,] 0.483228243 0.055327185 0.85162443 0.121719670 0.934247043 0.500709611
#>  [47,] 0.249305418 0.308292770 0.10619343 0.043193062 0.190744396 0.803964956
#>  [48,] 0.369157479 0.813480498 0.72209580 0.224243979 0.167526761 0.786308449
#>  [49,] 0.817333879 0.096258180 0.42516206 0.804548549 0.139298297 0.109716352
#>  [50,] 0.019237124 0.168301573 0.07417556 0.473416179 0.386223618 0.822327071
#>  [51,] 0.783599234 0.826305694 0.69586095 0.590995048 0.331717508 0.780770291
#>  [52,] 0.013242019 0.044001881 0.89662758 0.007410547 0.213996268 0.079785336
#>  [53,] 0.894144914 0.281276192 0.84676586 0.716762103 0.300200688 0.471755071
#>  [54,] 0.657548581 0.581578874 0.39184540 0.908104357 0.813779922 0.879152941
#>  [55,] 0.761273455 0.615253859 0.05936043 0.563798388 0.615837890 0.871639828
#>  [56,] 0.921847878 0.436561169 0.31406990 0.799300761 0.205281763 0.051298557
#>  [57,] 0.615400710 0.595790307 0.92030040 0.778674057 0.105216058 0.350091598
#>  [58,] 0.436615163 0.195402248 0.70437437 0.942737328 0.181674413 0.159441101
#>  [59,] 0.605278825 0.110525458 0.08323104 0.378311792 0.778771785 0.632628587
#>  [60,] 0.829070352 0.567944651 0.55128649 0.811458400 0.690194052 0.711301422
#>  [61,] 0.968650858 0.477366256 0.59614800 0.415097510 0.577774346 0.196466592
#>  [62,] 0.734487865 0.496175316 0.25113836 0.170497097 0.380036351 0.046067403
#>  [63,] 0.568481993 0.029452231 0.67849350 0.699230757 0.874204580 0.381340712
#>  [64,] 0.964768612 0.248015613 0.15555192 0.301879864 0.388444793 0.701622937
#>  [65,] 0.229460827 0.444987454 0.12607512 0.358173094 0.402336334 0.613839786
#>  [66,] 0.742567769 0.492592975 0.97432860 0.808791049 0.205909869 0.564567686
#>  [67,] 0.699989653 0.511419591 0.03635808 0.080165466 0.603607980 0.329443214
#>  [68,] 0.880941252 0.155643941 0.90780464 0.424878390 0.014682112 0.583221471
#>  [69,] 0.210706649 0.513723142 0.69603201 0.973009616 0.243764018 0.855300712
#>  [70,] 0.942012722 0.951291956 0.95308252 0.926529391 0.459722612 0.274661668
#>  [71,] 0.713520117 0.420425977 0.71335651 0.858500321 0.485649926 0.495288798
#>  [72,] 0.094999080 0.150398349 0.65082295 0.101026279 0.692413708 0.142255968
#>  [73,] 0.356004262 0.942009105 0.56815238 0.321695355 0.340671165 0.041807059
#>  [74,] 0.036536181 0.756448995 0.58202584 0.702675828 0.800350380 0.377016457
#>  [75,] 0.832370898 0.961237657 0.61691657 0.207070088 0.257676635 0.955163981
#>  [76,] 0.036327181 0.811326755 0.06280571 0.802856945 0.839749628 0.451227978
#>  [77,] 0.800497398 0.775674219 0.96449121 0.663105682 0.063147330 0.047282888
#>  [78,] 0.093751060 0.231908497 0.95862808 0.799607973 0.150736481 0.854312250
#>  [79,] 0.352694284 0.551596690 0.37359564 0.877684265 0.784147036 0.097018141
#>  [80,] 0.053739527 0.697159855 0.79405555 0.004968022 0.603156488 0.582079979
#>  [81,] 0.902612570 0.123739519 0.29589077 0.007338479 0.154545002 0.891554536
#>  [82,] 0.992589752 0.727384808 0.16647371 0.808773909 0.650340688 0.873719605
#>  [83,] 0.586153616 0.566560055 0.58747904 0.049009201 0.450481645 0.522350492
#>  [84,] 0.762938032 0.283116839 0.34412160 0.791025644 0.835667126 0.412901866
#>  [85,] 0.706806765 0.160027903 0.33154397 0.503309961 0.100632352 0.196091210
#>  [86,] 0.187290220 0.178079764 0.40409285 0.247019528 0.846768287 0.980322336
#>  [87,] 0.438214467 0.789354877 0.19724954 0.191666962 0.142134753 0.436006664
#>  [88,] 0.107018798 0.540422139 0.12110602 0.966684457 0.998888670 0.903436884
#>  [89,] 0.009792334 0.074039083 0.49303693 0.554156797 0.498754429 0.683297965
#>  [90,] 0.527964488 0.328626283 0.86247785 0.951201699 0.746588684 0.266268598
#>  [91,] 0.232796691 0.697649230 0.01595651 0.543388974 0.390355896 0.590801002
#>  [92,] 0.887087161 0.670650587 0.60722420 0.039244597 0.007084669 0.957526077
#>  [93,] 0.825122896 0.009152957 0.13051586 0.042948136 0.023112692 0.417198787
#>  [94,] 0.218492635 0.395334574 0.28736410 0.582029848 0.853017885 0.093801655
#>  [95,] 0.991557138 0.425056567 0.66908841 0.284349385 0.893155629 0.562810528
#>  [96,] 0.650710787 0.546235373 0.75294230 0.052051265 0.815134835 0.029923735
#>  [97,] 0.282278621 0.389744303 0.19985773 0.950283034 0.796805397 0.169326297
#>  [98,] 0.302604396 0.754783913 0.53032176 0.814387434 0.236199372 0.460710786
#>  [99,] 0.141234486 0.767545671 0.12008235 0.573182834 0.072835667 0.622344298
#> [100,] 0.660796172 0.710676418 0.82143456 0.681653182 0.003608302 0.889423082
#>              [,7]        [,8]       [,9]      [,10]
#>   [1,] 0.92716673 0.769598925 0.50155499 0.97012420
#>   [2,] 0.57315103 0.626910265 0.32095941 0.64452012
#>   [3,] 0.56001204 0.296982314 0.80402028 0.03321943
#>   [4,] 0.10233022 0.322921716 0.20943198 0.78305421
#>   [5,] 0.92397157 0.640669960 0.98881606 0.12177969
#>   [6,] 0.92839263 0.709640747 0.87443635 0.39765503
#>   [7,] 0.05144976 0.096165879 0.49567025 0.84967001
#>   [8,] 0.75635400 0.086963051 0.21795756 0.84862948
#>   [9,] 0.02132031 0.994891974 0.72259776 0.88582916
#>  [10,] 0.90774535 0.253045580 0.38203350 0.14946883
#>  [11,] 0.63300611 0.263827749 0.73274800 0.54540367
#>  [12,] 0.18041344 0.153688222 0.47970105 0.32807078
#>  [13,] 0.93805098 0.660216646 0.15143390 0.53200304
#>  [14,] 0.67845421 0.590687511 0.13785155 0.15620757
#>  [15,] 0.10305997 0.298341861 0.45980739 0.51421003
#>  [16,] 0.17375915 0.948297005 0.09790143 0.59137238
#>  [17,] 0.87719720 0.271386304 0.12846918 0.53872819
#>  [18,] 0.53665801 0.924475931 0.33830528 0.61991238
#>  [19,] 0.45967217 0.861358849 0.16057450 0.92139088
#>  [20,] 0.03942938 0.273746871 0.69252450 0.04001758
#>  [21,] 0.26462502 0.296753241 0.62233627 0.27466679
#>  [22,] 0.94018347 0.126345225 0.57024188 0.81949054
#>  [23,] 0.67873977 0.106800505 0.20334670 0.72132405
#>  [24,] 0.32391066 0.161517486 0.57638707 0.74405589
#>  [25,] 0.61090971 0.201048311 0.78416878 0.64243946
#>  [26,] 0.94948146 0.553582505 0.97178596 0.14401102
#>  [27,] 0.99872303 0.931831125 0.66358077 0.59806898
#>  [28,] 0.97679759 0.992306889 0.84828722 0.17882662
#>  [29,] 0.81185289 0.613059707 0.14325479 0.47927602
#>  [30,] 0.08594807 0.035143297 0.42334297 0.09778061
#>  [31,] 0.43967843 0.634916725 0.06252777 0.72627712
#>  [32,] 0.27911842 0.007093211 0.97861874 0.55756068
#>  [33,] 0.60523117 0.716533431 0.74596796 0.21479791
#>  [34,] 0.77310519 0.042885405 0.13408906 0.66441741
#>  [35,] 0.76282414 0.277879262 0.85866018 0.93200617
#>  [36,] 0.09308437 0.516357254 0.52484780 0.19015002
#>  [37,] 0.13693872 0.931579793 0.77565715 0.30735682
#>  [38,] 0.47971437 0.582620490 0.33589448 0.88049626
#>  [39,] 0.29150281 0.924676211 0.97759180 0.10321010
#>  [40,] 0.18099171 0.188947327 0.52719830 0.99001009
#>  [41,] 0.87757222 0.688093994 0.78276051 0.99974403
#>  [42,] 0.60740565 0.204548905 0.00729791 0.97107604
#>  [43,] 0.23565243 0.422897760 0.10186207 0.19654042
#>  [44,] 0.18017422 0.547911235 0.60755835 0.22214353
#>  [45,] 0.60789495 0.155056445 0.43142451 0.81060204
#>  [46,] 0.36594205 0.082434051 0.67247642 0.83923068
#>  [47,] 0.52658767 0.705421544 0.64991465 0.11195791
#>  [48,] 0.52931828 0.201800441 0.32053759 0.65917371
#>  [49,] 0.13468473 0.124462283 0.97852518 0.07995118
#>  [50,] 0.81066212 0.215410776 0.73528874 0.69665245
#>  [51,] 0.23874156 0.579094092 0.05591421 0.08257852
#>  [52,] 0.97368450 0.937716276 0.46537779 0.20596030
#>  [53,] 0.86832516 0.815552979 0.28493569 0.44452774
#>  [54,] 0.56909097 0.606021862 0.95092542 0.21568876
#>  [55,] 0.30153414 0.442793658 0.93450958 0.65124622
#>  [56,] 0.50953777 0.638876798 0.88854693 0.56134106
#>  [57,] 0.02516235 0.022946130 0.01015611 0.62459655
#>  [58,] 0.34258179 0.751952055 0.30436107 0.27333795
#>  [59,] 0.09408042 0.561038367 0.80064243 0.56149156
#>  [60,] 0.63407272 0.748436374 0.75015425 0.42982958
#>  [61,] 0.12902043 0.452120897 0.58817075 0.98945594
#>  [62,] 0.20171202 0.270812742 0.05206579 0.52258937
#>  [63,] 0.36908401 0.589834785 0.86684492 0.09784975
#>  [64,] 0.80811788 0.254416399 0.98660998 0.53731584
#>  [65,] 0.09695840 0.495529422 0.49505749 0.36546201
#>  [66,] 0.86847287 0.733456167 0.73752056 0.60477063
#>  [67,] 0.29552070 0.887375864 0.06963107 0.03268646
#>  [68,] 0.51734871 0.441440820 0.61643794 0.46634185
#>  [69,] 0.95170344 0.544228293 0.43951949 0.60221976
#>  [70,] 0.01564774 0.133819518 0.44980052 0.83595589
#>  [71,] 0.28499537 0.208714132 0.91569194 0.01678871
#>  [72,] 0.37620280 0.456053565 0.28360516 0.29687779
#>  [73,] 0.99393631 0.613751681 0.03705253 0.87965444
#>  [74,] 0.55094785 0.498265839 0.17281866 0.70303504
#>  [75,] 0.53155559 0.076918567 0.61889199 0.57797531
#>  [76,] 0.83846990 0.106320653 0.59191531 0.96910549
#>  [77,] 0.01189957 0.010325240 0.71752832 0.23370514
#>  [78,] 0.96334440 0.124507716 0.68206052 0.91902853
#>  [79,] 0.93409107 0.054430977 0.91453266 0.07231676
#>  [80,] 0.40939021 0.359508844 0.72251832 0.22728096
#>  [81,] 0.15895666 0.745885097 0.46028835 0.74897988
#>  [82,] 0.06524313 0.929713822 0.18311843 0.01175481
#>  [83,] 0.09541508 0.265422801 0.80981618 0.11474790
#>  [84,] 0.40898244 0.404981491 0.46532910 0.56071455
#>  [85,] 0.04932082 0.050311287 0.95440852 0.90650925
#>  [86,] 0.56250121 0.879995591 0.51618939 0.72747839
#>  [87,] 0.70954855 0.166352605 0.95909180 0.20775981
#>  [88,] 0.50035810 0.191377013 0.81090162 0.40357674
#>  [89,] 0.36615768 0.587770430 0.45362527 0.69555887
#>  [90,] 0.39718347 0.829807367 0.24020953 0.14168285
#>  [91,] 0.28521746 0.367521797 0.41706945 0.74150934
#>  [92,] 0.95911190 0.393765606 0.26540165 0.99260464
#>  [93,] 0.13053487 0.225361166 0.26862832 0.61884133
#>  [94,] 0.44225051 0.076778087 0.89111514 0.91421651
#>  [95,] 0.69676212 0.529074538 0.40184214 0.73231100
#>  [96,] 0.25411800 0.378176702 0.40251771 0.12768195
#>  [97,] 0.62405587 0.580698354 0.09679574 0.98239911
#>  [98,] 0.68075226 0.790691922 0.93231284 0.94192777
#>  [99,] 0.02014976 0.045944129 0.03649415 0.49770463
#> [100,] 0.07768696 0.073691322 0.37832993 0.35628965
#> 
#> $y
#>   [1] 22.131095 29.512812 12.080322 11.104958 15.762616 21.949774 22.662693
#>   [8] 20.174627 22.488406 19.266220 15.861558 21.453556 13.892151 20.978716
#>  [15] 17.446777  4.421102  8.575318  5.026703 26.695342 25.208239 20.002290
#>  [22] 16.965802 25.034699 26.441100 23.371437 15.198381 23.454067 13.145792
#>  [29] 14.262138 24.425681 19.826948  5.633620 18.800709 12.018563 11.368112
#>  [36] 13.768754 24.368033 17.757878 17.651532  3.912241  7.857504 18.143668
#>  [43] 24.631091 17.089195 25.213980 12.665118  5.938282 14.088844 10.850843
#>  [50] 10.388499 20.586222  6.684728 20.012808 27.290686 23.561698 21.215071
#>  [57] 21.462424 15.821764 16.148196 26.804811 19.513392 15.871582 16.224051
#>  [64] 14.843459 12.425225 24.020477 21.828828 13.030733 17.214872 21.903759
#>  [71] 22.944929  8.970255 16.791835 16.596962  9.938174 20.465626 19.449338
#>  [78] 14.723235 23.180224  8.051350  5.882117 25.549282 14.457074 23.566215
#>  [85]  9.827486 11.097054 13.373297 26.294499 10.991932 25.050353 18.845599
#>  [92] 11.085979  3.833199 18.131685 19.650377 18.568419 23.556567 16.658674
#>  [99] 12.703880 18.309203
#>