To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit ebac23f9 authored by Martyna Plomecka's avatar Martyna Plomecka
Browse files

Added the results of CV of SVM (but not able to use lambda 10000 - overflow error)

parent dbc92646
......@@ -32,8 +32,8 @@ def cross_validate_kNN(X, y):
def cross_validate_SVC(X, y):
logging.info("Cross-validation SVC...")
classifier = LinearSVC(tol=1e-5)
parameters_SVC = {'C': [1, 10, 100, 1000, 10000], 'max_iter': [1000, 10000, 100000]}
classifier = LinearSVC(tol=1e-2, max_iter=500)
parameters_SVC = {'C': [0.01, 0..1, 1, 10, 100]}
cross_validate(classifier=classifier, parameters=parameters_SVC, X=X, y=y)
def cross_validate_RFC(X, y):
......@@ -44,7 +44,7 @@ def cross_validate_RFC(X, y):
def cross_validate(classifier, parameters, X, y):
X = X.reshape((36223, 500 * 129))
clf = GridSearchCV(classifier, parameters, scoring='accuracy', n_jobs=-1, verbose=3, cv=2)
clf = GridSearchCV(classifier, parameters, scoring='accuracy', verbose=3, cv=2)
clf.fit(X, y.ravel())
export_dict(clf.cv_results_['mean_fit_time'], clf.cv_results_['std_fit_time'], clf.cv_results_['mean_score_time'],
......
......@@ -48,9 +48,9 @@ def main():
print(trainY.shape)
if config['model'] == 'simple_classifier':
try_sklearn_classifiers(trainX, trainY)
# try_sklearn_classifiers(trainX, trainY)
# cross_validate_kNN(trainX, trainY)
# cross_validate_SVC(trainX, trainY)
cross_validate_SVC(trainX, trainY)
# cross_validate_RFC(trainX, trainY)
else:
# tune(trainX,trainY)
......
(36223, 500, 129)
(36223, 1)
Fitting 2 folds for each of 5 candidates, totalling 10 fits
[CV] C=1 .............................................................
[CV] ................................. C=1, score=0.699, total=16.2min
[CV] C=1 .............................................................
[CV] ................................. C=1, score=0.697, total=16.6min
[CV] C=10 ............................................................
[CV] ................................ C=10, score=0.699, total=16.5min
[CV] C=10 ............................................................
[CV] ................................ C=10, score=0.697, total=16.1min
[CV] C=100 ...........................................................
[CV] ............................... C=100, score=0.699, total=14.7min
[CV] C=100 ...........................................................
[CV] ............................... C=100, score=0.697, total=14.4min
[CV] C=1000 ..........................................................
[CV] .............................. C=1000, score=0.699, total=14.8min
[CV] C=1000 ..........................................................
[CV] .............................. C=1000, score=0.697, total=14.8min
[CV] C=10000 .........................................................
[CV] ............................. C=10000, score=0.699, total=15.8min
[CV] C=10000 .........................................................
[CV] ............................. C=10000, score=0.697, total=15.4min
INFO:root:Started the Logging
INFO:root:X training loaded.
INFO:root:(129, 500, 36223)
INFO:root:y training loaded.
INFO:root:(1, 36223)
INFO:root:Setting the shapes
INFO:root:(36223, 500, 129)
INFO:root:(36223, 1)
INFO:root:Cross-validation SVC...
Sender: LSF System <lsfadmin@eu-g1-020-2>
Subject: Job 166889268: <python /cluster/home/mplomecka/dl-project/main.py> in cluster <euler> Exited
Job <python /cluster/home/mplomecka/dl-project/main.py> was submitted from host <eu-login-16> by user <mplomecka> in cluster <euler> at Wed Mar 24 09:23:07 2021
Job was executed on host(s) <15*eu-g1-020-2>, in queue <bigmem.24h>, as user <mplomecka> in cluster <euler> at Wed Mar 24 09:23:13 2021
</cluster/home/mplomecka> was used as the home directory.
</cluster/home/mplomecka/dl-project> was used as the working directory.
Started at Wed Mar 24 09:23:13 2021
Terminated at Wed Mar 24 12:01:46 2021
Results reported at Wed Mar 24 12:01:46 2021
Your job looked like:
------------------------------------------------------------
# LSBATCH: User input
python /cluster/home/mplomecka/dl-project/main.py
------------------------------------------------------------
Exited with exit code 1.
Resource usage summary:
CPU time : 9496.02 sec.
Max Memory : 85092 MB
Average Memory : 83600.53 MB
Total Requested Memory : 120000.00 MB
Delta Memory : 34908.00 MB
Max Swap : -
Max Processes : 3
Max Threads : 4
Run time : 9526 sec.
Turnaround time : 9519 sec.
The output (if any) follows:
2021-03-24 09:23:16.263690: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
(36223, 500, 129)
(36223, 1)
Fitting 2 folds for each of 5 candidates, totalling 10 fits
[CV] C=1 .............................................................
[CV] ................................. C=1, score=0.699, total=16.2min
[CV] C=1 .............................................................
[CV] ................................. C=1, score=0.697, total=16.6min
[CV] C=10 ............................................................
[CV] ................................ C=10, score=0.699, total=16.5min
[CV] C=10 ............................................................
[CV] ................................ C=10, score=0.697, total=16.1min
[CV] C=100 ...........................................................
[CV] ............................... C=100, score=0.699, total=14.7min
[CV] C=100 ...........................................................
[CV] ............................... C=100, score=0.697, total=14.4min
[CV] C=1000 ..........................................................
[CV] .............................. C=1000, score=0.699, total=14.8min
[CV] C=1000 ..........................................................
[CV] .............................. C=1000, score=0.697, total=14.8min
[CV] C=10000 .........................................................
[CV] ............................. C=10000, score=0.699, total=15.8min
[CV] C=10000 .........................................................
[CV] ............................. C=10000, score=0.697, total=15.4min
[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
[Parallel(n_jobs=1)]: Done 1 out of 1 | elapsed: 16.2min remaining: 0.0s
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
[Parallel(n_jobs=1)]: Done 2 out of 2 | elapsed: 32.8min remaining: 0.0s
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
warnings.warn("Liblinear failed to converge, increase "
[Parallel(n_jobs=1)]: Done 10 out of 10 | elapsed: 155.5min finished
Traceback (most recent call last):
File "/cluster/home/mplomecka/dl-project/main.py", line 65, in <module>
main()
File "/cluster/home/mplomecka/dl-project/main.py", line 53, in main
cross_validate_SVC(trainX, trainY)
File "/cluster/home/mplomecka/dl-project/SimpleClassifiers/sklearnclassifier.py", line 37, in cross_validate_SVC
cross_validate(classifier=classifier, parameters=parameters_SVC, X=X, y=y)
File "/cluster/home/mplomecka/dl-project/SimpleClassifiers/sklearnclassifier.py", line 48, in cross_validate
clf.fit(X, y.ravel())
File "/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(**kwargs)
File "/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/model_selection/_search.py", line 765, in fit
self.best_estimator_.fit(X, y, **fit_params)
File "/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_classes.py", line 233, in fit
self.coef_, self.intercept_, self.n_iter_ = _fit_liblinear(
File "/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/site-packages/sklearn/svm/_base.py", line 966, in _fit_liblinear
raw_coef_, n_iter_ = liblinear.train_wrap(
File "sklearn/svm/_liblinear.pyx", line 39, in sklearn.svm._liblinear.train_wrap
OverflowError: value too large to convert to npy_int32
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment