一个月前,我在Jupyter笔记本中运行了与SVM相关的代码。当时,结果非常好。我最近检查了几件事,它们按原样运行了代码,但是有内存错误。我不知道原因。
我尝试重新启动计算机并重新安装conda。
代码:
MemoryError Traceback (most recent call last)
<ipython-input-10-85ee7435c48f> in <module>()
3
4 cclf = CalibratedClassifierCV(base_estimator=LinearSVC(penalty='l2', dual=False), cv=5)
----> 5 cclf.fit(train_X,train_y_arg)
D:\Users\GIL\Anaconda3\lib\site-packages\sklearn\calibration.py in fit(self, X, y, sample_weight)
179
sample_weight=base_estimator_sample_weight[train])
180 else:
--> 181 this_estimator.fit(X[train], y[train])
182
183 calibrated_classifier = _CalibratedClassifier(
MemoryError:
错误:
first_input = input()
if first_input == a:
print("something")
elif first_input == b:
print("Another")
elif first_input == c:
second_input = input()
if second_input == d:
print("done")