githubnext / githubnext/tsikit-learn

[Autoloop: build-tsikit-learn-scikit-learn-typescript-migration]

Aperta
#7 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

agentic-workflows autoloop automation
Lingua principale
TypeScript
Stelle
1
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

tsikit-learn: scikit-learn → TypeScript Migration

🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Program Goal: Build tsikit-learn, a complete TypeScript port of scikit-learn, one feature at a time.

Issue: #5

Current Best Metric: sklearn_features_ported = 11 (up from 2)


Iteration 2 Summary

This iteration establishes the complete project foundation and ports Phase 1 (Foundation) and Phase 2 (Preprocessing & Metrics) of the migration plan:

Project infrastructure:

  • package.json, tsconfig.json (strictest settings), biome.json, bunfig.toml
  • .github/workflows/ci.yml — CI with Bun test, typecheck, GitHub Pages deploy
  • AGENTS.md — agent instructions and project conventions
  • playground/index.html — interactive feature roadmap showing ported vs pending modules

Phase 1 — Foundation (6 modules):

  • src/exceptions.ts — NotFittedError, ConvergenceWarning, DataConversionWarning, etc.
  • src/base.ts — BaseEstimator, ClassifierMixin, RegressorMixin, TransformerMixin, ClusterMixin, Matrix2D interface, checkIsFitted, clone
  • src/utils/extmath.ts — rowNorms, softmax, logLogistic, safeSparseDot, matVecDot, colMean, colVar, logSumExp
  • src/utils/validation.ts — checkArray, checkXy, checkNFeatures, isMatrix2D, validateSampleWeight, columnMinMax
  • src/utils/multiclass.ts — typeOfTarget, uniqueLabels, labelBinarize, nClasses
  • src/utils/class_weight.ts — computeClassWeight, computeSampleWeight

Phase 2 — Preprocessing & Metrics (5 modules):

  • src/preprocessing/standard_scaler.ts — StandardScaler (fit, transform, inverseTransform, fitTransform)
  • src/preprocessing/minmax_scaler.ts — MinMaxScaler (configurable feature range)
  • src/preprocessing/label_encoder.ts — LabelEncoder, Normalizer (L1/L2/max)
  • src/metrics/regression.ts — MSE, RMSE, MAE, R2, MAPE, explainedVariance, medianAbsoluteError
  • src/metrics/classification.ts — accuracy, confusionMatrix, precision, recall, F1, logLoss, zeroOneLoss
  • src/model_selection/index.ts — trainTestSplit (seeded shuffle), KFold

Tests: 25+ test cases covering all ported modules with property-based assertions.


Metric: sklearn_features_ported: 2 → 11 (+9)
Actions run: §25721028611

[!WARNING]

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by Autoloop · ● 42.7M ·

To install this agentic workflow, run

gh aw add .github/workflows/autoloop.md

[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 25721028611 -n agent -D /tmp/agent-25721028611

# Fetch the bundle into a local branch
git fetch /tmp/agent-25721028611/aw-autoloop-build-tsikit-learn-scikit-learn-typescript-migration.bundle refs/heads/autoloop/build-tsikit-learn-scikit-learn-typescript-migration:refs/heads/autoloop/build-tsikit-learn-scikit-learn-typescript-migration
git checkout autoloop/build-tsikit-learn-scikit-learn-typescript-migration

# Push the branch to origin
git push origin autoloop/build-tsikit-learn-scikit-learn-typescript-migration

# Create the pull request
gh pr create --title '[Autoloop: build-tsikit-learn-scikit-learn-typescript-migration]' --base main --head autoloop/build-tsikit-learn-scikit-learn-typescript-migration --repo githubnext/tsikit-learn

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo il riepilogo della migrazione e ispezionando i moduli src elencati, package.json e la configurazione dei test. Esegui i test Bun e il controllo dei tipi per comprendere la base attuale; «completato» non è definito oltre alla continuazione del port ampio di scikit-learn, e il branch o il bundle del workflow contiene già il lavoro descritto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, typescript
Ambito
machine-learning
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
15/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.