Search code examples
pythonscikit-learncloud9-idelogistic-regression

sklearn logistic regression on Cloud9: killed


Im trying to use python sklearn to do logistic regression for Udacity Google course on Deep Learning (assignment 1)

so its quite a big training dataset (unzipped = about 1 Go)

on my laptop PC, the following ran fine

(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))

However, running the same code on Cloud9, i get the laconic output "Killed"

Is it some kind of RAM problem ? how can do some controls to see what the problem is ?

thanks


Solution

  • You are running out of RAM. To see how much RAM you're using, you can look at the resource monitor in the top right corner of the screen.


    Source: Running out of RAM on Cloud9.