+1 to @Armavica . The regression model here confuse me a bit, especially given that y is essentially a Categorical Random Variable (it is a transformation of one), the parameter p should have shape (len(y), len(d)) which is (85, 4). But your regression output is (85, ), which could not be reshaped into the right p for a Categorical. I usually find expressing your problem as a generative model helps, for example, writing a function to simulate fake data with numpy.random.
2 Likes