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

# weight_col

#### `weight_col: <table.column>` (Optional)

## Description

`weight_col` specifies the target-table column used to generate a canonical `WEIGHT` column in the training table.

This enables native weighted training directly from training table generation, without requiring a custom weighted training table override.

* `weight_col` must be in strict `table.column` form.

* `weight_col` must reference a column on the inferred target table.

* The referenced column must be numerical (`int`, `float`, or `decimal`).

* Expressions are not supported (for example: `SUM(...)`, `AVG(...)`, `MAX(...)`, `COUNT(*)`).

* When set, training table generation produces a canonical `WEIGHT` column.

* Rows with null `WEIGHT` are dropped before final stats/materialization.

* For link prediction (non-array targets), if multiple rows map to one `(ENTITY, TARGET[, time bucket])`, `WEIGHT` is aggregated with `MAX` by default.

* For `LIST_DISTINCT` array-target link prediction, weights are aggregated per `(ENTITY, TARGET)` and emitted as a list aligned with `TARGET`.

* For temporal link prediction, weight aggregation is bucket-local and uses the same time bucketing as label construction.

* For binary classification, if both `weight_col` and `majority_sampling_ratio` are set, both are applied according to [weight\_mode](/reference/weight_mode).

### Supported Task Types

* All static queries
* Temporal link prediction

Not supported for temporal node prediction and forecasting.

### Example

<CodeGroup>
  ```Text Field theme={null}
  weight_col: <table.column>
  weight_col: TRANSACTIONS.AMOUNT
  weight_col: ORDERS.ORDER_VALUE
  ```

  ```yaml YAML theme={null}
  training_table_generation:
    weight_col: TRANSACTIONS.AMOUNT
  optimization:
    weight_mode:
    - weighted_loss
  ```

  ```yaml With MSR theme={null}
  training_table_generation:
    weight_col: TRANSACTIONS.AMOUNT
  optimization:
    majority_sampling_ratio:
    - 20
    weight_mode:
    - sample
  ```
</CodeGroup>

### Default Values

| run\_mode | Default Value |
| --------- | ------------- |
| FAST      | None          |
| NORMAL    | None          |
| BEST      | None          |
