问题描述
我认为这是我的编码错误,但我不知道我做错了什么。当 x+x^2 处于二项式 glmnet 模型中时,我试图为 x 创建边际效应图。当我在新数据集上使用 predict.cv.glmnet() 进行预测时,几乎好像模型系数的符号被切换了。因此,在对模型公式与预测函数进行硬编码时,我一直在比较预测。我对新数据有不同的预测,但对训练数据没有,我不知道为什么。
Traceback (most recent call last):
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\commands\install.py",line 316,in run
requirement_set = resolver.resolve(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py",line 121,in resolve
self._result = resolver.resolve(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py",line 453,in resolve
state = resolution.resolve(requirements,max_rounds=max_rounds)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py",line 318,in resolve
name,crit = self._merge_into_criterion(r,parent=None)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py",line 173,in _merge_into_criterion
crit = Criterion.from_requirement(self._p,requirement,parent)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py",line 82,in from_requirement
if not cands:
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\structs.py",line 124,in __bool__
return bool(self._sequence)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py",line 99,in __bool__
return any(self)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py",line 237,in iter_index_candidates
candidate = self._make_candidate_from_link(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py",line 165,in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py",line 300,in __init__
super().__init__(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py",line 144,in __init__
self.dist = self._prepare()
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py",line 226,in _prepare
dist = self._prepare_distribution()
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py",line 311,in _prepare_distribution
return self._factory.preparer.prepare_linked_requirement(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py",line 457,in prepare_linked_requirement
return self._prepare_linked_requirement(req,parallel_builds)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py",line 480,in _prepare_linked_requirement
local_file = unpack_url(
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py",line 240,in unpack_url
unpack_file(file.path,location,file.content_type)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\utils\unpacking.py",line 266,in unpack_file
untar_file(filename,location)
File "c:\users\timo\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\utils\unpacking.py",line 230,in untar_file
with open(path,'wb') as destfp:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\Timo\\AppData\\Local\\Temp\\pip-install-wpb7xknq\\voevent-parse_090e9cbdcae64f31a771cb0698293f1a\\src/voeventparse/fixtures/MOA_Lensing_Event_2015-07-10T14:50:54.00.xml'
Removed build tracker: 'C:\\Users\\Timo\\AppData\\Local\\Temp\\pip-req-tracker-cmjrk9m4'
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)