ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/learn/dataset.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/learn/dataset.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/learn/dataset.go
Original SHA-256c3d8663742cef243432d197449c930a7a04f1a9b0ab84b85b8c5b38e3484119f
Git blob SHA064724001bd594c918b7679060b92c1457823344
Reading-copy SHA-256c3d8663742cef243432d197449c930a7a04f1a9b0ab84b85b8c5b38e3484119f

Original source ↗

Every recorded occurrence

These 10 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/platform/learn/dataset.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/learn/dataset.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/learn/dataset.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/learn/dataset.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/learn/dataset.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/learn/dataset.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/learn/dataset.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/learn/dataset.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/learn/dataset.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/learn/dataset.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package learn import "sort" // Result values a bid label can carry, mirroring the bid_outcomes.result CHECK. Only win and loss are decided // labels a fit consumes; pending and no_bid are dropped by BuildDataset (an undecided bid is not a training // example). These are the exact strings the ledger stores, so a raw scan maps straight onto them. const ( ResultWin = "win" ResultLoss = "loss" ResultNoBid = "no_bid" ResultPending = "pending" ) // LabeledRow is one bid from the ledger: its decided Result and the named feature values of the segment the // bid was for (market structure only, NEVER a protected attribute or a per candidate score). BuildDataset // keeps only the rows whose Result is win or loss; everything else is an undecided bid and is dropped. type LabeledRow struct { Result string // one of the Result constants; only win and loss survive into the matrix Features map[string]float64 // named segment feature values for this bid } // IsDecided reports whether a result is a decided label (a win or a loss). A pending or no_bid row carries no // outcome to learn from and is excluded from the training matrix. func IsDecided(result string) bool { return result == ResultWin || result == ResultLoss } // BuildDataset assembles the labeled feature matrix from the decided bids. It drops every undecided row // (pending, no_bid, or an unrecognized result), maps win to label 1 and loss to label 0, and returns the // feature matrix x (one row per decided bid, one column per feature), the labels y, and the feature names in a // STABLE order (the sorted union of every feature key across the decided rows). A row missing a feature the // union contains contributes 0.0 for that column, so a ragged input still yields a rectangular matrix; the // stable ordering means the same ledger always produces the same column layout, which the trainer relies on to // pair a fitted coefficient with its feature name. No database, no I/O: this is pure over an in memory rowset. func BuildDataset(rows []LabeledRow) (x [][]float64, y []int, featureNames []string) { // The sorted union of feature names across the decided rows: the stable column layout. nameSet := map[string]struct{}{} for _, r := range rows { if !IsDecided(r.Result) { continue } for name := range r.Features { nameSet[name] = struct{}{} } } featureNames = make([]string, 0, len(nameSet)) for name := range nameSet { featureNames = append(featureNames, name) } sort.Strings(featureNames) for _, r := range rows { if !IsDecided(r.Result) { continue } row := make([]float64, len(featureNames)) for j, name := range featureNames { row[j] = r.Features[name] // a missing feature is the zero column, the documented default } x = append(x, row) if r.Result == ResultWin { y = append(y, 1) } else { y = append(y, 0) } } return x, y, featureNames }

Search equations, builds, manuscript text, and recovered sources.