<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy" -->

---
title: Estimating from No Data: Deriving a Continuous Score...
description: A technical walkthrough explains how to derive a continuous, interpretable score from a neural network trained only on categorical labels, using a low-capacity...
canonical: https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Estimating from No Data: Deriving a Continuous Score from Categories | daily.dev
og:description: A technical walkthrough explains how to derive a continuous, interpretable score from a neural network trained only on categorical labels, using a low-capacity...
og:url: https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy
og:image: https://api.daily.dev/og/posts/Lo9QdEufY.png
og:image:alt: Estimating from No Data: Deriving a Continuous Score from Categories
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimating from No Data: Deriving a Continuous Score from Categories

**[Towards Data Science](https://daily.dev/sources/tds)** · 14 min read · 0 upvotes · 0 comments

## Summary

A technical walkthrough explains how to derive a continuous, interpretable score from a neural network trained only on categorical labels, using a low-capacity linear bottleneck plus a 'category approximator head' with trainable thresholds. It covers the math for extracting thresholds from a softmax dense layer's weights and biases, a 'propagate-sum' trick using Keras tensor slicing to force category ordering, and demonstrates the approach on a toy medical dataset predicting infection severity from 8 features, achieving 80% accuracy with a fully interpretable linear model.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/estimating-from-no-data-deriving-a-continuous-score-from-categories-2>

## Questions this post answers

### How can I train a neural network to output a continuous score when I only have categorical labels to train on, not numeric scores?

Use a low-capacity linear bottleneck (a single dense layer with no activation) as the encoder, followed by a 'category approximator head' that predicts the category from the score via a softmax dense layer trained with categorical cross-entropy. Reducing model capacity prevents the network from collapsing outputs to just the category indices, keeping the score continuous and meaningful.

_daily.dev surfaces practical write-ups like this for engineers designing interpretable scoring models from limited labels._

### How do I extract decision thresholds from a softmax classification layer that sits on top of a single score value?

Given a dense layer with weights [w1,w2,w3] and biases [b1,b2,b3] producing softmax logits from a single score input, thresholds between neighboring categories are the intersection points of their linear output functions: t0 = (b2-b1)/(w1-w2) and t1 = (b3-b2)/(w2-w3), since softmax always favors the largest logit and each category wins over exactly one contiguous score range.

_engineers building interpretable ML pipelines can find similar deep-dive techniques curated on daily.dev._

### How can I force a neural network's output categories to stay in a fixed, meaningful order when training on category labels alone?

Apply a 'propagate-sum' trick in Keras: split the dense layer's raw outputs into components d1, d2, d3, then feed the softmax with cumulative sums o1=d1, o2=d1+d2, o3=d1+d2+d3, while constraining d1, d2, d3 to be non-negative. This makes the effective weights driving category order strictly increasing, preventing the model from learning a nonsensical category ordering.

_developers wrestling with ordering constraints in trained models can track techniques like this via daily.dev._

## Similar posts on daily.dev

- [From Raw Data to Risk Classes](https://daily.dev/posts/from-raw-data-to-risk-classes-qye2zmgfs) · Towards Data Science · 1 upvotes · 0 comments
- [Your Model’s 0.9 Probably Isn’t 90%](https://daily.dev/posts/your-model-s-0-9-probably-isn-t-90--fhtgyspvh) · Medium · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#neural-networks](https://daily.dev/tags/neural-networks), [#keras](https://daily.dev/tags/keras)

[View this post on daily.dev](https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Estimating from No Data: Deriving a Continuous Score from Categories","url":"https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy"},"datePublished":"2026-08-21T18:03:50.130Z","dateModified":"2026-08-21T18:04:16.980Z","description":"A technical walkthrough explains how to derive a continuous, interpretable score from a neural network trained only on categorical labels, using a low-capacity...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/71d654d3eef20eb3974be9ca52e67405?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/71d654d3eef20eb3974be9ca52e67405?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,neural-networks,keras","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"Estimating from No Data: Deriving a Continuous Score from Categories"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/estimating-from-no-data-deriving-a-continuous-score-from-categories-lo9qdeufy#faq","mainEntity":[{"@type":"Question","name":"How can I train a neural network to output a continuous score when I only have categorical labels to train on, not numeric scores?","acceptedAnswer":{"@type":"Answer","text":"Use a low-capacity linear bottleneck (a single dense layer with no activation) as the encoder, followed by a 'category approximator head' that predicts the category from the score via a softmax dense layer trained with categorical cross-entropy. Reducing model capacity prevents the network from collapsing outputs to just the category indices, keeping the score continuous and meaningful. daily.dev surfaces practical write-ups like this for engineers designing interpretable scoring models from limited labels."}},{"@type":"Question","name":"How do I extract decision thresholds from a softmax classification layer that sits on top of a single score value?","acceptedAnswer":{"@type":"Answer","text":"Given a dense layer with weights [w1,w2,w3] and biases [b1,b2,b3] producing softmax logits from a single score input, thresholds between neighboring categories are the intersection points of their linear output functions: t0 = (b2-b1)/(w1-w2) and t1 = (b3-b2)/(w2-w3), since softmax always favors the largest logit and each category wins over exactly one contiguous score range. engineers building interpretable ML pipelines can find similar deep-dive techniques curated on daily.dev."}},{"@type":"Question","name":"How can I force a neural network's output categories to stay in a fixed, meaningful order when training on category labels alone?","acceptedAnswer":{"@type":"Answer","text":"Apply a 'propagate-sum' trick in Keras: split the dense layer's raw outputs into components d1, d2, d3, then feed the softmax with cumulative sums o1=d1, o2=d1+d2, o3=d1+d2+d3, while constraining d1, d2, d3 to be non-negative. This makes the effective weights driving category order strictly increasing, preventing the model from learning a nonsensical category ordering. developers wrestling with ordering constraints in trained models can track techniques like this via daily.dev."}}]}
```

