NaN in your
feature columns, locally or through the hosted API, and get finite predictions
back. No imputation step is required before calling the model.
Quickstart
Missing targets are different:
y_train must be numeric and complete. Drop
context rows whose target is missing. A filled-in target is a made-up label, and
it will steer every prediction.What happens to a NaN
You don’t have to do anything, but it helps to know the defaults:- Numeric features — missing values are imputed inside the model’s own preprocessing (server-side when you call the hosted API). Statistics come from your context rows, never from the query rows.
- Categorical features (DataFrame inputs via the
synthefyclient) — with the default ordinal encoding, a missing value staysNaNand is imputed server-side alongside the numeric columns; withcategorical_encoding="onehot", missing values get their own indicator column instead. - Columns with no observed values — a feature that is entirely missing carries no signal; it is neutralized rather than invented.
Imputing yourself
Sometimes you want the fill values under your control, to keep them consistent across models in a comparison, or to encode domain knowledge (for instance, a missing sensor reading that really means zero). Any imputation works, but the recipe we use in production and in our own benchmark harness is per-column train median, then 0 for columns with no observed values:- Median, not zero. On a non-centered feature, zero-filling plants an often-wild outlier in every incomplete row. The median stays inside the feature’s real range and is robust to skew and outliers, which tabular data has in abundance.
- Train statistics only. The test rows are filled with medians computed from the training rows. Computing fill values from the test set leaks information about the data you are predicting on and inflates evaluation scores.
Good to know
- Benchmarking. When you compare Nori against other models, apply the same imputation to every model, fit on the training split only. Mixed preprocessing is the most common source of unreproducible tabular comparisons. Synthefy’s own evaluation loaders follow the recipe above (train-median imputation with zero fallback), so published numbers match how the model is preprocessed in production.
- Meaningful gaps. If a missing value carries signal in your domain, keep
the
is_missingindicator from the tip above rather than relying on the fill value to encode it.
Next steps
Large tables
Serve a context table larger than GPU memory, and see which fallback ran.
Python Client
Call the same model over the hosted API, or locally, from one client.
Quickstart
Model sizes, the hosted API, and the request contract.