Real feature matrices have holes, and constant columns, and columns that are entirely missing for a whole segment. All three turn a naive standardiser into a matrix of nan, and a single nan in a batch makes every gradient computed from it nan too.
Implement standardize(x) for a 2-D array of shape (n, d) that may contain nan. Return an array of the same shape where, for each column independently:
Use the population standard deviation (divide by the count, not the count minus one).
Two columns have no meaningful scaling, and the contract for both is the same: return zeros for them, never nan or inf.
The output must contain no nan and no inf for any input.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen