我试图使用python sklearn对Udacity Google深度学习课程进行逻辑回归(作业1)
所以它是一个非常大的训练数据集(解压=约1 Go)
在我的笔记本电脑上,以下运行正常
(samples, width, height) = train_dataset.shape
X = np.reshape(train_dataset,(samples,width*height))
(samples, width, height) = test_dataset.shape
Xtest=np.reshape(test_dataset,(samples,width*height))
Y=train_labels
Ytest=test_labels
from sklearn import datasets, neighbors, linear_model
logistic = linear_model.LogisticRegression(C=0.001)
knn = neighbors.KNeighborsClassifier()
import time
t1 = time.time()
print('KNN score: %f' % knn.fit(X,Y).score(Xtest,Ytest))
print('LogisticRegression score: %f'
% logistic.fit(X,Y).score(Xtest,Ytest))
t2 = time.time()
print("Time: %0.2fs" % (t2 - t1))
但是,在Cloud9上运行相同的代码,我得到了简洁的输出" Killed"
这是某种RAM问题吗?如何做一些控制来看问题是什么?
感谢