{"uid":"cap_iMAQ8Q9cD26AcX5Tz-m8U","slug":"covariance-whitening-and-coloring-transform-ecf27f82","name":"Covariance Whitening and Coloring Transform","description":"Produces the two transforms a stochastic model normally needs from a covariance: the whitening matrix that maps correlated data to unit-variance uncorrelated data, and the coloring matrix that goes back the other way. Both are returned so the round trip is available without a second call.","url":"https://stat.halowerk.com/v1/oss-openblas-covariance-whitening-transform?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType"],"properties":{"type":{"const":"http"},"method":{"const":"POST"},"bodyType":{"const":"json"},"schemaUrl":{"type":"string","format":"uri"},"exampleUrl":{"type":"string","format":"uri"}},"additionalProperties":true},"output":{"type":"object","required":["type"],"properties":{"type":{"const":"json"},"schemaUrl":{"type":"string","format":"uri"},"exampleUrl":{"type":"string","format":"uri"}},"additionalProperties":true}},"additionalProperties":true},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AoWK3x1osUZ5n4aIHQg-X","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes both the whitening matrix (correlated → uncorrelated unit-variance) and coloring matrix (inverse transform) from a covariance matrix in a single call.","exampleAgentPrompt":"Given this 4x4 covariance matrix [[1.0,0.8,0.3,0.1],[0.8,1.0,0.4,0.2],[0.3,0.4,1.0,0.5],[0.1,0.2,0.5,1.0]], compute both the whitening and coloring matrices so I can decorrelate my data and reconstruct it.","exampleUseCases":[{"title":"Preprocessing correlated features for ML","prompt":"I have this 5x5 covariance matrix from my training data and I need both the whitening transform to decorrelate the features and the coloring matrix to go back — can you compute them together so I don't need two separate calls?"},{"title":"Generating correlated samples from white noise","prompt":"I'm building a Monte Carlo simulation and I need the coloring matrix derived from this covariance [[2.1,1.3],[1.3,0.9]] so I can multiply uncorrelated Gaussian samples back into correlated ones matching my asset return structure."},{"title":"Mahalanobis distance preprocessing","prompt":"For my anomaly detector I need the whitening matrix for this 3x3 covariance [[1.0,0.6,0.2],[0.6,1.0,0.4],[0.2,0.4,1.0]] so I can project data into a space where Euclidean distance equals Mahalanobis distance."}],"resultDescription":"Returns two matrices: a whitening matrix that linearly transforms correlated data (described by the input covariance) into uncorrelated unit-variance data, and a coloring matrix that is its inverse transform — mapping uncorrelated unit-variance data back to the original correlated space. Both are provided so the complete round-trip is available without an additional API call.","failureModes":["Non-square covariance matrix returns a validation error","Non-positive-semi-definite matrix may cause numerical failure or error","Matrix dimension exceeds 128x128 limit returns schema validation error","Near-singular covariance may produce numerically unstable results or an error response","Mismatched inner dimensions (non-symmetric matrix) trigger an input validation error"],"whenToPreferThis":"Choose this endpoint when you need both the whitening and coloring (inverse) transforms simultaneously, avoiding two separate calls. It is ideal for stochastic modeling pipelines, machine learning feature preprocessing, Mahalanobis distance computation, and Monte Carlo simulation where both the forward (decorrelating) and backward (recorrelating) linear transforms are required. Prefer this over general matrix inversion or decomposition services when the specific statistical semantics of whitening and coloring are needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:30:14.303Z","isFirstParty":false,"canonicalSlug":"covariance-whitening-and-coloring-transform-ecf27f82"}