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 3586b4b8 authored by Martyna Plomecka's avatar Martyna Plomecka
Browse files

Added the crossvalidation for SVM for lower lambdas

parent 99c03f39
......@@ -33,7 +33,7 @@ def cross_validate_kNN(X, y):
def cross_validate_SVC(X, y):
logging.info("Cross-validation SVC...")
classifier = LinearSVC(tol=1e-2, max_iter=500)
parameters_SVC = {'C': [0.01, 0..1, 1, 10, 100]}
parameters_SVC = {'C': [0.001, 0.01, 0.1]}
cross_validate(classifier=classifier, parameters=parameters_SVC, X=X, y=y)
def cross_validate_RFC(X, y):
......
(36223, 500, 129)
(36223, 1)
Fitting 2 folds for each of 3 candidates, totalling 6 fits
[CV] C=0.001 .........................................................
[CV] ............................. C=0.001, score=0.699, total=18.4min
[CV] C=0.001 .........................................................
[CV] ............................. C=0.001, score=0.697, total=17.6min
[CV] C=0.01 ..........................................................
[CV] .............................. C=0.01, score=0.699, total=17.3min
[CV] C=0.01 ..........................................................
[CV] .............................. C=0.01, score=0.697, total=17.0min
[CV] C=0.1 ...........................................................
[CV] ............................... C=0.1, score=0.699, total=16.0min
[CV] C=0.1 ...........................................................
[CV] ............................... C=0.1, score=0.697, total=16.2min
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-042-3>
Subject: Job 166917611: <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 12:39:56 2021
Job was executed on host(s) <15*eu-g1-042-3>, in queue <bigmem.24h>, as user <mplomecka> in cluster <euler> at Wed Mar 24 12:40:24 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 12:40:24 2021
Terminated at Wed Mar 24 14:26:21 2021
Results reported at Wed Mar 24 14:26:21 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 : 6339.34 sec.
Max Memory : 83525 MB
Average Memory : 76098.60 MB
Total Requested Memory : 120000.00 MB
Delta Memory : 36475.00 MB
Max Swap : 2884 MB
Max Processes : 3
Max Threads : 4
Run time : 6376 sec.
Turnaround time : 6385 sec.
The output (if any) follows:
2021-03-24 12:40:25.992268: 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 3 candidates, totalling 6 fits
[CV] C=0.001 .........................................................
[CV] ............................. C=0.001, score=0.699, total=18.4min
[CV] C=0.001 .........................................................
[CV] ............................. C=0.001, score=0.697, total=17.6min
[CV] C=0.01 ..........................................................
[CV] .............................. C=0.01, score=0.699, total=17.3min
[CV] C=0.01 ..........................................................
[CV] .............................. C=0.01, score=0.697, total=17.0min
[CV] C=0.1 ...........................................................
[CV] ............................... C=0.1, score=0.699, total=16.0min
[CV] C=0.1 ...........................................................
[CV] ............................... C=0.1, score=0.697, total=16.2min
[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: 18.4min 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: 36.0min 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 "
[Parallel(n_jobs=1)]: Done 6 out of 6 | elapsed: 102.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