yesno

A yesno question asks whether the outcome will happen for each case. The answer is p, the chance that it will, from 0 to 1. It is the learned counterpart of Jev's Noul. A Noul is a model's judgement of the case in front of it. p is how often the outcome happened to cases like it.

When to use

Use yesno when the chance itself is what your code needs. Will this customer churn? Will this lead convert? Will this agent run fail? To act on named bands instead of a number, use a score. To pick between options you control, use a choice.

Request

{
  "data": {"dataset_id": "sample:saas_churn"},
  "entity_column": "customer_id", "subject_kind": "org",
  "questions": {
    "churn": {"type": "yesno", "outcome_column": "churned", "outcome_is_desirable": false}
  },
  "cases": {"ids": ["cust_0001"]}
}
Field
type "yesno"
outcome_column the yes/no column to learn
outcome_is_desirable optional; false here, because churn is to be avoided
positive_values optional; the values meaning yes, when Datagoat can't tell

Answer

"churn": {
  "type": "yesno", "state": "answered",
  "quality": {"realised_lift": 4.48, "top_decile_lift": 4.44, "validation_scheme": "holdout", "confidence_tier": "high"},
  "cases": [{
    "entity_id": "cust_0001", "p": 0.7005,
    "reasons": [
      {"feature_label": "logins_last_30d", "value": 11, "likelihood_direction": "higher", "strength": "strong"},
      {"feature_label": "tenure_months",   "value": 21, "likelihood_direction": "higher", "strength": "strong"}
    ]
  }],
  "verdicts": [{"verdict": {"…": "…"}, "signature": {"…": "…"}}]
}

The whole answer is described in Answers.

Reading p

p is the model's estimate of how often cases like this one had the outcome in the record. Near 1 is a strong yes. Near 0 is a strong no. A confident no is still an answer, and it bills like one.

Set thresholds in your code, from what each mistake costs. Use a high threshold when acting on a false yes is expensive, such as a retention discount for everyone above it. Use a low one when a miss is expensive, such as a machine that faults. The same p can feed several thresholds, one for each action (see Patterns).

Writing yesno questions

  • Name an outcome column where yes means the thing you're asking about. churned, not retained, if your code asks "will they churn?"
  • Give the outcome a window if the column has one: churned_90d answers a sharper question than churned.
  • Ask several yesno questions about different outcomes in one call. Each outcome is its own fit.