functionVerified releasev1
predict_topics
Apply a supplied fitted HN topic model without fitting vocabulary or components. Returns topic assignments, automatic keyword tags, unknown-topic diagnostics and unchanged observed popularity values.
Interface
Verified contract
Inputs
| Name | Type |
|---|---|
| snapshot | dict |
| model | dict |
Outputs
| Name | Type |
|---|---|
| default | dict |
Exact release
Pinned local call
from spl import SPLClient
result = SPLClient.embedded().call(
"splime://@splime.project/case4-hn/predict_topics@1",
kwargs={'model': {}, 'snapshot': {}},
trust=True,
)Review before running. Public bundles contain executable code. Verify the publisher and exact content hash; a virtual environment isolates dependencies, not the operating system.
Evidence
Evidence-backed concepts
- Predict topics
- Automatic keyword tags
- Unknown topic diagnostics
- Fitting vocabulary
- Topic assignments
- Unchanged observed popularity values
- Apply supplied fitted
- Fitted hn topic
History
Public versions
- v12 downloads
Discover
Similar Objects
- train_topic_modelFit a simple TF-IDF and nonnegative matrix factorization topic model on supplied training titles only. Returns portable JSON vocabulary, IDF weights, learned components, automatic top-term names and a content identity; no rule-generated labels.
- tag_titlesAssign HN titles to topics with the immutable trained model embedded as a required native graph dependency. Automatic names use learned top terms; no caller model file or retraining. Returns hn-topics-v1 predictions.
- evaluate_topics_temporallySplit HN stories chronologically, fit vocabulary and topics only on earlier titles, then inspect later-title coverage and reconstruction. No supervised accuracy or future-popularity forecast is claimed.
- hn_topic_digestFetch real HN stories, normalize them, apply the required immutable embedded trained model, count observed attention and render notebook-safe HTML. Training is a separate operation. Published implementation executes locally in embedded mode.
- case5_first_pd1_predictApply the fitted first_pd1 rules embedded in this release. Returns application IDs, predicted classes, probabilities and segments. No caller-side model file or retraining is required.