我有字符串和不相等的特征向量。我如何在sklearn中使用它?无需转换为二进制文件
x=[["a","b"],["a","d","c"],["b","f"],["c","f","d"]]
y=[1,0,1,0]
from sklearn import ensemble
clf = ensemble.RandomForestClassifier(n_estimators=100)
clf.fit(x,y)
xt=[["b","f","d"],["a","c"]]
clflist=clf.predict(xt)
print(clflist)