我正在尝试在Protege上安装GraphViz plugIn.我先安装Graphviz2.36软件包但它不起作用.然后我用brew install graphviz我得到了这个错误Warning: graphviz-2.38.0_1 already installed, it's just not linked.因此,我使用brew link graphviz但是我得到了这个错误
错误:无法符号链接bin /非循环
目标/ usr/local/bin/acyclic
已存在.你可能想删除它:
rm'/ usr/local/bin/acyclic'
因为这个,我使用brew link --overwrite graphviz了我得到这个错误:
错误:无法使用符号链接/ graphviz/arith.h/usr/local/include/graphviz不可写.
任何人都知道如何解决这个问题?
我正在尝试使用SVM,但是当我使用pandas数据帧时,我不知道如何适应模型.如果我的数据如下所示:
df = pd.DataFrame({"x": ['011', '100', '111'] , "y": [0,1,0]})
df.x.apply(lambda x: np.array(list(map(int,x))))
>>>df
x y
0 [0, 1, 1] 0
1 [1, 0, 0] 1
2 [1, 1, 1] 0
Run Code Online (Sandbox Code Playgroud)
如果我尝试以这种方式拟合模型:
clf = svm.SVC().fit(df.x, df.y)
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
ValueError: setting an array element with a sequence.
Run Code Online (Sandbox Code Playgroud)
使用此数据框适合SVM的正确方法是什么?