本文整理汇总了Python中Features.values方法的典型用法代码示例。如果您正苦于以下问题:Python Features.values方法的具体用法?Python Features.values怎么用?Python Features.values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Features
的用法示例。
在下文中一共展示了Features.values方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: import Features [as 别名]
# 或者: from Features import values [as 别名]
fil = open("/tmp/citaugur.csv","w")
#~ print("d")
head = ",citations," + ",".join([str(i) for i in f.keys()]) + "\n"
#~ print("e")
fil.write(head)
#~
ct = 0
for i in ids:
c = Citations(cr_getter.getPaper(i))
if c:
if(len(c) >0):
f = Features(paper_getter.getPaper(i))
s = i + ","
s = s + ",".join([str(i) for i in c.values()]) + ","
s = s + ",".join([str(i) for i in f.values()]) + "\n"
fil.write(s)
ct += 1
if ct % 100 is 0:
print(round(100*ct/len(ids)))
#~ library(randomForest)
#~ library(MASS)
#~ df <- na.omit(read.csv("/tmp/citaugur.csv",row.names=1))
#~
#~ df <- df[sample(1:nrow(df),nrow(df),F),which(colnames(df) != "country_of_first_author")]
#~ df$citations <- log10(df$citations+1)
#~
#~ df1 <- df[1:(2*round(nrow(df))/3),]
#~ df2 <- df[(1+2*round(nrow(df))/3):nrow(df),]
#~