|
本帖最后由 xingpengwei 于 2016-8-5 16:55 编辑
运行一个400D的libsvm文件,出现了错误,不知道为什么,188D的也是
我的特征文件样例:见附件
- xingpengwei@biosrv:/Bioinformatics_Machine_Learning/Machine_Learning/classifier/ELM/Python-ELM$ python runElm.py -f sigmoid -h 10 -c EL CPPsite3_peptides_formated_400D.libsvm > error.log
- Traceback (most recent call last):
- File "runElm.py", line 121, in <module>
- ELMClassiferM(dgx,dgy,hidden=int(h),fun=f)
- File "runElm.py", line 75, in ELMClassiferM
- cross_val(dgx,dgy,elmc)
- File "runElm.py", line 51, in cross_val
- auc = cross_val_score(e,x,y,cv=cv,scoring = "roc_auc");
- File "/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1433, in cross_val_score
- for train, test in cv)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/parallel.py", line 800, in __call__
- while self.dispatch_one_batch(iterator):
- File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/parallel.py", line 658, in dispatch_one_batch
- self._dispatch(tasks)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/parallel.py", line 566, in _dispatch
- job = ImmediateComputeBatch(batch)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/parallel.py", line 180, in __init__
- self.results = batch()
- File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/parallel.py", line 72, in __call__
- return [func(*args, **kwargs) for func, args, kwargs in self.items]
- File "/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1550, in _fit_and_score
- test_score = _score(estimator, X_test, y_test, scorer)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1606, in _score
- score = scorer(estimator, X_test, y_test)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/scorer.py", line 184, in __call__
- return self._sign * self._score_func(y, y_pred, **self._kwargs)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/ranking.py", line 257, in roc_auc_score
- sample_weight=sample_weight)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/base.py", line 79, in _average_binary_score
- return binary_metric(y_true, y_score, sample_weight=sample_weight)
- File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/ranking.py", line 248, in _binary_roc_auc_score
- raise ValueError("Only one class present in y_true. ROC AUC score "
- ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|