'drawing a graph for model
def add_edge(self, start, end, **kwargs):
model.add_nodes_from(path)
model.add_edge(('Patient number',0),('Gender',0),('Age (years)',0),('Place of residence',0),('Number of children',0)))
sorted(model.edges(df))
nx.is_directed_acyclic_graph(model)
i need to draw a graph by using plot but i have error
plot code:
plt.plot(model)
plt.show()
error message:
TypeError Traceback (most recent call last)
<ipython-input-10-e60ddcd33b72> in <module>()
----> 1 plt.plot(model)
2 plt.show()
6 frames
/usr/local/lib/python3.7/dist-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x)
1315 return np.ma.asarray(x, float).filled(np.nan)
1316 else:
-> 1317 return np.asarray(x, float)
1318
1319
TypeError: float() argument must be a string or a number, not 'LogisticRegression'
how i can detect x , y value? ( i add edge for data and its stage)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
