Hi @iffiX,
The usual size of n_samples and n_features can be anything really, since I have written a classifier that can be used for any general datasets. But I will take note of your rule of thumb about if “n_samples * n_features < 1e8, then no need to split by class”.
Yes you are correct, X_prime is always (n_samples, n_features + 1) regardless of encoding.
I see what you mean now by “vectorize”. First, `torch.matmul()’ itself has the “vectorization” feature where it can multiple vectors inside a matrix in a “vectorization” manner. Second, rather than just using 2d tensors, I can use a 3d (or higher) dimension tensors to incorporate the 2 classes into one tensor object and then vectors inside this one higher dimension tensor object can be “vectorized”.
Questions:

Can I ask how did you determine the value 1e8 in n_samples * n_features < 1e8?
Can I ask why is there a need to add 1e-6 in (m_class + 1e-6)?
So for my code, it is difficult to parallelize over multiple GPUs at all? It would be nice if at most I could perhaps just parallelize over the 2 classes on 2 GPUs.