Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


SELF (version 0.1.1)

synthetic_data_nonlinear: synthetic nonlinear data base on the graph

Description

synthetic nonlinear data base on the graph. The data generation mechanism is y=scale(a1b1x^2+a2b2x^3+a3b3x^4+a4b4sin(x)+a5b5sin(x^2)).

Usage

synthetic_data_nonlinear(G, sample_num, ratio = 1, return_noise = FALSE)

Arguments

G

An adjacency matrix.

sample_num

The number of samples

ratio

The noise ratio. It will grow or shrink the value of the noise.

return_noise

Whether return the noise of each nodes for further analysis.

Value

Return a synthetic data

Examples

Run this code
# NOT RUN {
G<-matrix(c(0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0),nrow = 4,ncol = 4)
data=synthetic_data_nonlinear(G,100)
# }

Run the code above in your browser using DataLab