(shape, sparsity=0.5)
| 31 | |
| 32 | |
| 33 | def random_binary_tensor(shape, sparsity=0.5): |
| 34 | X = (np.random.rand(*shape) >= (1 - sparsity)).astype(float) |
| 35 | return X |
| 36 | |
| 37 | |
| 38 | def random_regression_problem(n_ex, n_in, n_out, intercept=0, std=1, seed=0): |
nothing calls this directly
no outgoing calls
no test coverage detected