Commit 0ca23474 by alejandro77palacios

Función: proyectar red con base en un grupo de estímulos

parent 58a4387e
......@@ -31,3 +31,10 @@ def filtrar_red_por_estimulos(red, *estimulos):
estimulos_y_respuestas = respuestas_asociadas + list(estimulos)
red_filtrada = red.subgraph(estimulos_y_respuestas).copy()
return red_filtrada
def proyectar_red_por_estimulos(red, *estimulos):
respuestas_asociadas = obtener_respuestas_asociadas(red, *estimulos)
red_filtrada = filtrar_red_por_estimulos(red, *estimulos)
proyeccion = nx.bipartite.projected_graph(red_filtrada, respuestas_asociadas)
return proyeccion
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment