zypl.Foundation

Preparing a labelled file.

What a CSV needs for a labelled run: the header, the target, an id column, and what is read as missing.

The file

A plain comma-separated file, the first line naming the columns. Quotes around a value are removed; a comma inside a value is not supported, so remove commas from text fields before uploading.

  • Unnamed columns get a name, index for the first and index_2 and on for the next, so they stay addressable.
  • An id column is recognised when it is named id, index, row_id or unnamed…, or its name ends in id, such as customerID, and more than 95% of its values are distinct. It labels the predictions and is not used as a feature.
  • Missing values are empty cells and na, n/a, nan, null, none and ?, in any case.
  • A column is categorical when any of its non-missing values is not a number; otherwise it is numeric, with missing values kept as gaps.

The target

Pick the column with the outcome. A target with up to 20 distinct values is read as classes; the positive class defaults to the rarest one and can be changed. A run needs at least two classes. A numeric target with more values than that, many of them decimals, is read as regression, which the demo does not run yet.

Size

Every labelled row is sent as context with the request. By default, above 12,000 labelled rows the context is thinned to 12,000 — each class keeps its share, rows are taken at an even stride, and a rerun sends the same rows. A request must also stay under about 9.5 MB.

A test file

To score new rows, upload a second file with the same feature columns as the training file; it needs no target. The demo stops before running if any training feature is missing from it.