def to_directed(self):
        from networkx import DiGraph
        G=DiGraph()
        G.name=self.name
        G.add_nodes_from(self)
        G.add_edges_from( ((u,v,deepcopy(data)) 
                           for u,nbrs in self.adjacency_iter() 
                           for v,data in nbrs.items()) )
        G.graph=deepcopy(self.graph)
        G.node=deepcopy(self.node)
        return G
Generate three random samples to show the value of 1-KNN compared to 5KNN learner performance
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/classes/graph.py/Graph.to_directed--crossover with--dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstklearn/1knn.py/_test1