{"uid":"cap_946C-Au28i49r3_mcmryN","slug":"openblas-low-rank-matrix-compression-svd-pca-2d8034a1","name":"OpenBLAS Low-Rank Matrix Compression (SVD/PCA)","description":"Factors a matrix into rank-k left and right factors with their singular values, optionally centering the columns first, and states what the compression actually cost: the Frobenius reconstruction error against the input and the fraction of spectral energy retained. The full spectrum comes back too, so a caller can pick a different k without a second call. With centering enabled this is principal component analysis, and the column means are returned as part of the model.","url":"https://stat.halowerk.com/v1/oss-openblas-low-rank-matrix-compress?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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iU9JFiEbOAB6RpvcNsrK4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Factorizes a matrix into rank-k left and right singular vectors with singular values, optionally centering columns for PCA, and returns reconstruction error and spectral energy retained along with the full spectrum.","exampleAgentPrompt":"Compress this 50×30 data matrix to rank 5 using low-rank SVD, and center the columns first so it's doing PCA — I want to see the reconstruction error, how much spectral energy is retained, and the full singular value spectrum so I can decide if rank 5 is good enough.","exampleUseCases":[{"title":"PCA on customer feature matrix","prompt":"I have a 100×20 matrix of customer features and I want to run PCA on it — center the columns and reduce it to rank 4. Give me the principal components, singular values, and tell me what fraction of the variance is retained."},{"title":"Choosing optimal rank for image compression","prompt":"I've got a 128×128 grayscale image flattened into a numeric matrix and I want to try compressing it to rank 10. Don't center the columns — just give me the SVD factors, the Frobenius error, and the full spectrum so I can evaluate whether rank 10 is enough."},{"title":"Latent factor extraction for recommendation data","prompt":"Take this 80×50 user-item interaction matrix and factorize it down to rank 8 without centering. I need the left and right factor matrices and the singular values for a latent factor model, plus the reconstruction error to validate quality."}],"resultDescription":"Returns left singular vectors (U), right singular vectors (V), and singular values for the requested rank k, plus the full singular value spectrum so the caller can re-evaluate without a second call. Also reports the Frobenius reconstruction error between the low-rank approximation and the original matrix, the fraction of total spectral energy retained, and (when center_columns is true) the column means used during centering.","failureModes":["rank k exceeds the smaller matrix dimension — returns an error","matrix dimensions exceed 128×128 limit — returns validation error","matrix contains values outside the allowed ±1,000,000 range — returns validation error","matrix has inconsistent row lengths (ragged array) — returns parsing error","payment not included or insufficient — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need truncated SVD or PCA on a matrix up to 128×128 and want reconstruction diagnostics (Frobenius error, spectral energy fraction) and the full spectrum in a single call, avoiding a second round-trip to pick a different rank. Prefer it over generic linear algebra libraries when you need a hosted, pay-per-call solution with no infrastructure overhead and OpenBLAS-backed numerical precision.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:32:59.942Z","isFirstParty":false,"canonicalSlug":"openblas-low-rank-matrix-compression-svd-pca-2d8034a1"}