我搜索了很多,但没有找到答案.假设我们有一些来自.csv文件的数据(我们称之为xx.csv).像这样的东西
Number A B C ... Z
1 .. .. ..
.
.
.
4000 .. .. .. ... ...
Run Code Online (Sandbox Code Playgroud)
你可以把你想要的任何东西放在A,B,C ......姓名,数字,NAs等等.所以,最简单的方法是我用另一个外部替换整个列(比方说B)(我的意思是不是来自csv文件)??
我有SQLdf的问题.虽然我正在尝试更新表,但它总是将NULL作为输出.我对这个问题嗤之以鼻,但我无法弄清楚如何解决它.我的代码是:
fn$sqldf("update cons set V1='%$numbernew%' where V1=$'contact'")
Run Code Online (Sandbox Code Playgroud)
但是在我检查它以确定是否有变化后,所有都与开始时相同.任何想法都会有帮助.
我试图找出如何使神经网络包工作.我对我创建的数据及其结果进行了一些测试(大约50行数据和三列,其中第四行是我想要的结果,它是通过简单的数学执行来完成的,比如总结其他三列),到目前为止一直很好.然后我决定在真实数据上应用这个包.我从这里下载了mpg数据集http://vincentarelbundock.github.io/Rdatasets/datasets.html
我正在运行下面的代码:
net<- neuralnet(cty~displ+year+cyl+hwy,
datain, hidden=3)
Run Code Online (Sandbox Code Playgroud)
即使我有3个隐藏层,或8或18,错误是相同的,并且包处理数据的时间相对较少(这234行):
Error Reached Threshold Steps
1 2110.173077 0.006277805853 54
Run Code Online (Sandbox Code Playgroud)
对此有什么好的建议吗?
出于学习原因,我正在尝试创建一个琐事游戏,但是我的字典发生了一些我无法理解的奇怪事情。
我通常测试的代码是这样的:
cat = {
'easy': {
'books': 'https://opentdb.com/api.php?amount=50&category=10&difficulty=easy&type=boolean',
'films': 'https://opentdb.com/api.php?amount=50&category=11&difficulty=easy&type=boolean',
'general knowledge': 'https://opentdb.com/api.php?amount=50&category=9&difficulty=easy&type=boolean',
'music': 'https://opentdb.com/api.php?amount=50&category=12&difficulty=easy&type=boolean',
'science & nature': 'https://opentdb.com/api.php?amount=50&category=17&difficulty=easy&type=boolean',
'sports': 'https://opentdb.com/api.php?amount=50&category=21&difficulty=easy&type=boolean'
},
'medium': {
'books': 'https://opentdb.com/api.php?amount=50&category=10&difficulty=medium&type=boolean',
'films': 'https://opentdb.com/api.php?amount=50&category=11&difficulty=medium&type=boolean',
'general knowledge': 'https://opentdb.com/api.php?amount=50&category=9&difficulty=medium&type=boolean',
'music': 'https://opentdb.com/api.php?amount=50&category=12&difficulty=medium&type=boolean',
'science & nature': 'https://opentdb.com/api.php?amount=50&category=17&difficulty=medium&type=boolean',
'sports': 'https://opentdb.com/api.php?amount=50&category=21&difficulty=medium&type=boolean'
}
}
print(cat)
for level in cat:
print(level)
catselect = []
while catselect not in ("1", "2"):
catselect = input("Select a category, for easy press 1, for medium press 2: ")
if catselect == "1":
selectedcat = "easy"
elif catselect …Run Code Online (Sandbox Code Playgroud)