MCPcopy Create free account
hub / github.com/InternScience/InternAgent / generate_data

Function generate_data

tasks/AutoDebug/code/experiment.py:39–47  ·  view source on GitHub ↗

Generate synthetic regression data

(n_samples=1000, n_features=20, noise=10.0, random_state=42)

Source from the content-addressed store, hash-verified

37
38
39def generate_data(n_samples=1000, n_features=20, noise=10.0, random_state=42):
40 """Generate synthetic regression data"""
41 X, y = make_regression(
42 n_samples=n_samples,
43 n_features=n_features,
44 noise=noise,
45 random_state=random_state
46 )
47 return X.astype(np.float32), y.astype(np.float32)
48
49
50def train_model(model, train_loader, val_loader, epochs=100, lr=0.001, device='cpu'):

Callers 1

run_experimentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected