
Linear imbalance. The number of class samples, \(K_{i}\) , for classes \(i\in \lbrace 1..N\rbrace \)  is defined by:
\(K_{i} = \mathtt {round} \left( K_{min}-c + (i - 1) \times (K_{max}+c*2 - K_{min}) / (N-1) \right),\) 
where \(c=0.499\)  for rounding purposes. For example, this means that for linear 1-9-shot 5-way task, \(K_{i} \in \lbrace 1, 3, 5, 7, 9\rbrace \) , and for linear 4-6-shot 5-way task \(K_{i} \in \lbrace 4, 4, 5, 6, 6\rbrace \) .

Step imbalance. The number of class samples, \(K_{i}\) , is determined by an additional variable \(N_{min}\)  specifying the number of minority classes. Specifically, for classes \(i\in \lbrace 1..N\rbrace \) :
\(K_{i}={\left\lbrace \begin{array}{ll}K_{min}, & \text{if}~i \le N_{min},\\K_{max}, & \text{otherwise}.\end{array}\right.}\) 
For example, in a step 1-9-shot 5-way task with 1 minority class \(K_{i} \in \lbrace 1, 9, 9, 9, 9\rbrace \) .

Random imbalance. The number of class samples, \(K_{i}\) , is sampled from a uniform distribution, i.e. \( K_{i} \sim \mathtt {Unif}(K_{min}, K_{max})\) , with \(K_{min}\)  and \(K_{max}\)  inclusive. This is appropriate for the problem at hand (small number of classes), but it could be replaced by a Zipf/Power Law [1]} for a more appropriate imbalance in problems with a large number of classes.

