Conversation
There was a problem hiding this comment.
i thought we agreed not to publish this? or is this a different version or something
| /** | ||
| * Extract all signal names from the current config | ||
| */ |
There was a problem hiding this comment.
the docstrings here and below have messed up formatting
| @@ -0,0 +1,16 @@ | |||
| #!/usr/bin/env node | |||
|
|
|||
| require('ts-node/register'); | |||
There was a problem hiding this comment.
what is ts-node/register for?
| /** | ||
| * Load target scores from file or prompt user | ||
| */ | ||
| private async loadTargetScores(inputFile?: string): Promise<TargetScores> { |
There was a problem hiding this comment.
can you check why the colors are messed up from this point onwards? private is white whereas above this its colored blue. I think its because typescript generally expects all private functions to be defined above any public functions but honestly im not quite sure
There was a problem hiding this comment.
i think it would be good to have a new doc in the repo that explains the regression tool. like part of a CONTRIBUTING.md file --> where you explain how one might add a new metric to the list, re-calibrate weights, etc.
This PR introduces a CLI tool that uses linear regression to automatically determine optimal signal weights based on target scores for known packages. This tool helps calibrate the scoring algorithm by learning from examples of packages with desired scores.
The regression tool is a command-line tool that:
optimal-weights.jsonfile with normalized weights (sum = 100)Usage:
# Run with example targets ./bin/regression-cli src/regression-lib/example-targets.jsonExample Input (
src/regression-lib/example-targets.json){ "aws-cdk-lib": 95, "cdk-ecr-deployment": 85, "@mrgrain/cdk-esbuild": 75, "cdk-stacksets": 65, "cdk-remote-stack": 55, "@aws-amplify/cdk-exported-backend": 35, "cdk-ssm-parameter-store": 25 }Example Output
