Detect a single core-periphery pair using the Borgatti-Everett algorithm.
	
		Parameters
		----------
		G : NetworkX graph object
		
		Examples
		--------
		>>> import networkx as nx
		>>> import cpalgorithm as cpa
		>>> G = nx.karate_club_graph()  # load the karate club network. 
		>>> spr = cpa.Surprise()
		>>> spr.detect(G)

def detect(self, G):
		"""Detect a single core-periphery pair using the Borgatti-Everett algorithm.
	
		Parameters
		----------
		G : NetworkX graph object
		
		Examples
		--------
		>>> import networkx as nx
		>>> import cpalgorithm as cpa
		>>> G = nx.karate_club_graph()  # load the karate club network. 
		>>> spr = cpa.Surprise()
		>>> spr.detect(G)

		"""

		nodes = G.nodes()
		N = len(nodes)
		Cbest =np.zeros(N)
		qbest = 0 
		for it in range(self.num_runs):	

			C, q = self._detect(G)
		
			if q < qbest:
				Cbest = C
				qbest = q
		
		# ------------	
		# Post process 
		# ------------
		self.c_ = dict(zip(nodes, np.zeros(N).astype(int)))
		self.x_ = dict(zip(nodes, Cbest.astype(int)))
		self.Q_ = self._score(G, self.c_, self.x_)[0]
		self.qs_ = [self.Q_]