# Regressing stochastic process to a morphism in a finite category

Data can be modeled with the multiset monad. There exists a map from the multiset monad, $$\mathcal{M}$$ to a monad of measures of finite support, $$\mathcal{P}$$, as seen here. This monad will have a Kleisli category, $$K$$, whose morphisms are $$Y \rightarrow \mathcal{P}(X)$$. These can be interpreted as a kind of probabilistic function. If we think of the Giry monad instead, the Stochastic process or Gaussian process are within the Kleisli category in the sense that a map goes from a set to a probability measure over another set. Returning to our case, with $$\mathcal{P}$$, these morphisms can be composed, and thus a collection of arrows in $$K$$ should provide a representation of an imprecisely known category.

To see this more clearly, in the case that all value in a single morphism in $$K$$ have measures with all values 0 except 1, this is exactly a function. Thus, it is the case that the Kleisli category for the monad of measures of fintie support holds within it the power to expand the notion of a category.

What I am interested in doing is regressing these probabilistic functions into "pure" functions. This would, in effect, regress a category. I am not sure how to do this, but there is another category, very much related to $$K$$ that holds the key to the regression of the morphisms. Specifically, this is the Eilenberg-Moore category of $$\mathcal{P}$$, the monad of measures of finite support.

It is the case that the closely related Giry monad, $$\mathcal{G}$$, itself has an Eilenberg-Moore category where every distribution has an average. This is because it's arrows are of this type $$\mathcal{G}(X) \rightarrow Y$$. We focus on the finite case where morphisms are $$\mathcal{P}(X) \rightarrow Y$$.

What I am wondering is how can we use this to regress those morphisms in the Kleisli category? Is it just a functor from the Kleisli category to the Eilenberg-Moore category? I have thought that maybe it is something like an action of one category on another, since the two forms of morphisms compose like this $$(X \rightarrow \mathcal{P}(Y)) \cdot (\mathcal{P}(Y) \rightarrow Z)$$

Is there some way to combine these two categories to get a regression of the morphisms I am talking about?