  We consider the problem of learning a directed graph $G^\star$ from
observational data. We assume that the distribution which gives rise to the
samples is Markov and faithful to the graph $G^\star$ and that there are no
unobserved variables. We do not rely on any further assumptions regarding the
graph or the distribution of the variables. In particular, we allow for
directed cycles in $G^\star$ and work in the fully non-parametric setting.
Given the set of conditional independence statements satisfied by the
distribution, we aim to find a directed graph which satisfies the same
$d$-separation statements as $G^\star$. We propose a hybrid approach consisting
of two steps. We first find a partially ordered partition of the vertices of
$G^\star$ by optimizing a certain score in a greedy fashion. We prove that any
optimal partition uniquely characterizes the Markov equivalence class of
$G^\star$. Given an optimal partition, we propose an algorithm for constructing
a graph in the Markov equivalence class of $G^\star$ whose strongly connected
components correspond to the elements of the partition, and which are partially
ordered according to the partial order of the partition. Our algorithm comes in
two versions -- one which is provably correct and another one which performs
fast in practice.
