MCPcopy Index your code
hub / github.com/ddbourgin/numpy-ml / random_regression_problem

Function random_regression_problem

numpy_ml/plots/lm_plots.py:38–51  ·  view source on GitHub ↗
(n_ex, n_in, n_out, intercept=0, std=1, seed=0)

Source from the content-addressed store, hash-verified

36
37
38def random_regression_problem(n_ex, n_in, n_out, intercept=0, std=1, seed=0):
39 X, y, coef = make_regression(
40 n_samples=n_ex,
41 n_features=n_in,
42 n_targets=n_out,
43 bias=intercept,
44 noise=std,
45 coef=True,
46 random_state=seed,
47 )
48 X_train, X_test, y_train, y_test = train_test_split(
49 X, y, test_size=0.3, random_state=seed
50 )
51 return X_train, y_train, X_test, y_test, coef
52
53
54def random_classification_problem(n_ex, n_classes, n_in, seed=0):

Callers 2

plot_bayesFunction · 0.70
plot_regressionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected