Description
Reuse the random linear-noise dataset generator once, then fit separate supplied ridge penalties with an unpenalized intercept alongside its OLS baseline; preserve the ridge core's 10-significant-digit coefficients/predictions (predictions use unrounded internal coefficients), and report nonfinite fits without training-quality claims.
Synthetic statistical data separates a specified generating model from the values observed in a finite draw. A model parameter, a sample summary, and the result of a fitted analysis answer different questions; retaining them separately makes numerical and statistical checks easier to interpret.
Reuse the random linear-noise dataset generator once, then fit separate supplied ridge penalties with an unpenalized intercept alongside its OLS baseline; preserve the ridge core's 10-significant-digit coefficients/predictions (predictions use unrounded internal coefficients), and report nonfinite fits without training-quality claims.
When to use this tool
Use this generator to create reproducible ridge regression benchmark cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply intercept, slope, noiseStandardDeviation, count, minimumX, maximumX, lambdas in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read model, observations, ordinaryLeastSquares, ridge. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Generate the same seeded linear-noise dataset used by the linked linear benchmark, then fit the supplied distinct ridge penalties to those observations. Return ordinary least squares alongside each ridge fit, recording non-finite results as status not-finite and null result.1
Delegated operations used for this result: linear regression noise benchmark; ridge. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| intercept | Intercept | Required. Finite number. |
| slope | Slope | Required. Finite number. |
| noiseStandardDeviation | Noise Standard Deviation | Required. Finite number; minimum 0. |
| count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 2; maximum 1024. |
| minimumX | Minimum X | Required. Finite number. |
| maximumX | Maximum X | Required. Finite number. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| lambdas | Lambdas | Required. Array of Finite number; minimum 0.; minimum items 1; maximum items 16. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| model | Model | Required. Object; no unknown keys. |
| model.intercept | Intercept | Required. Finite number. |
| model.slope | Slope | Required. Finite number. |
| model.noiseStandardDeviation | Noise Standard Deviation | Required. Finite number; minimum 0. |
| observations | Observations | Required. Array of Object; no unknown keys.; minimum items 2; maximum items 1024. |
| observations[].x | X | Required. Finite number. |
| observations[].target | Target | Required. Finite number. |
| observations[].observed | Observed | Required. Finite number. |
| ordinaryLeastSquares | Ordinary Least Squares | Required. Object; no unknown keys. |
| ordinaryLeastSquares.status | Named outcome; inspect null and error fields before interpreting associated values. | Required. Text; one of "finite", "numeric-overflow". |
| ordinaryLeastSquares.result | Result | Required. Object; no unknown keys. or Null. |
| ordinaryLeastSquares.predictions | Predictions | Required. Array of Finite number.; maximum items 1024. |
| ridge | Ridge | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| ridge[].lambda | Lambda | Required. Finite number; minimum 0. |
| ridge[].status | Named outcome; inspect null and error fields before interpreting associated values. | Required. Text; one of "finite", "not-finite". |
| ridge[].result | Result | Required. Object; no unknown keys. or Null. |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"count": 4,
"minimumX": 0,
"maximumX": 3,
"intercept": 1,
"slope": 2,
"noiseStandardDeviation": 1,
"lambdas": [
0,
5
],
"seed": 42
},
"output": {
"model": {
"intercept": 1,
"slope": 2,
"noiseStandardDeviation": 1
},
"observations": [
{
"x": 0,
"target": 1,
"observed": 0.043837770615851035
},
{
"x": 1,
"target": 3,
"observed": 2.7269738951173896
},
{
"x": 2,
"target": 5,
"observed": 3.1583728152164032
},
{
"x": 3,
"target": 7,
"observed": 5.859117929045976
}
],
"ordinaryLeastSquares": {
"status": "finite",
"result": {
"intercept": 0.26548969319,
"rSquared": 0.939883837957,
"slope": 1.78772393954
},
"predictions": [
0.26548969319,
2.05321363273,
3.84093757227,
5.62866151181
]
},
"ridge": [
{
"lambda": 0,
"status": "finite",
"result": {
"intercept": 0.2654896932,
"lambda": 0,
"predictions": [
0.2654896932,
2.053213633,
3.840937572,
5.628661512
],
"slope": 1.78772394
}
},
{
"lambda": 5,
"status": "finite",
"result": {
"intercept": 1.606282648,
"lambda": 5,
"predictions": [
1.606282648,
2.500144618,
3.394006587,
4.287868557
],
"slope": 0.8938619698
}
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Penalties are compared on the same synthetic observations. This is in-sample fitting, not cross-validation, penalty selection, or proof of generalization; numerical conditioning can affect individual fits.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Polynomial Regression Benchmark Generator
Generate known ascending-coefficient polynomial targets on a bounded evenly spaced grid, add seeded normal noise, and delegate separate requested degree-1–6 normal-equation fits and predictions; reverse coefficients only at the highest-first evaluator boundary, retain singular/nonfinite fit outcomes, and make no exact-solver or stability guarantee.
- Random Streaming Microcluster Benchmark Generator
Generate one labeled Gaussian point sequence and recompute the existing order-dependent maximum-radius BIRCH-style microclusters at supplied batch-prefix boundaries; thresholds and reported centroids use one explicit uniform coordinate scale, preserve inherited ten-significant-digit centroids, and do not imply an incremental-state API or full BIRCH tree.