Commit e908f43d authored by Benjamin Murauer's avatar Benjamin Murauer
Browse files

fixed bug in data concatenation

parent adb5224f
Pipeline #45053 passed with stage
in 1 minute and 26 seconds
......@@ -45,6 +45,10 @@ VERSION=$(python -m setup --version)
echo "new version is: ${VERSION}"
git add setup.cfg setup.py
git commit -m "release v${VERSION}"
# the pre-commit hook will change the files (remove trailing whitespace)
# so we have to add them again
git add setup.cfg setup.py
git commit -m "release v${VERSION}"
git push origin master
git tag "v${VERSION}"
git push origin "v${VERSION}"
......
[bumpversion]
current_version = 0.8.21
current_version = 0.8.22
[bumpversion:file:setup.py]
......
......@@ -10,7 +10,7 @@ with open('README.md') as fh:
setup(
name='dbispipeline',
version='0.8.21',
version='0.8.22',
author='Benjamin Murauer, Michael Vötter',
author_email='b.murauer@posteo.de',
description='should make things more reproducible',
......
......@@ -7,8 +7,8 @@ import warnings
import numpy as np
import pandas as pd
from sklearn import metrics
from sklearn.base import clone
from sklearn import metrics
from sklearn.model_selection import BaseCrossValidator
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import PredefinedSplit
......@@ -259,7 +259,7 @@ class FixedSplitGridEvaluator(GridEvaluator):
if type(xtrain) == np.ndarray:
x = np.concatenate((xtrain, xtest))
if type(xtrain) == pd.DataFrame:
elif type(xtrain) in [pd.DataFrame, pd.Series]:
x = pd.concat((xtrain, xtest))
else:
raise ValueError('don\'t know how to concatenate ', type(xtrain),
......@@ -267,11 +267,11 @@ class FixedSplitGridEvaluator(GridEvaluator):
if type(ytrain) == np.ndarray:
y = np.concatenate((ytrain, ytest))
elif type(ytrain) == pd.DataFrame:
elif type(ytrain) in [pd.DataFrame, pd.Series]:
y = pd.concat((ytrain, ytest))
else:
raise ValueError('don\'t know how to concatenate ', type(xtrain),
type(xtest))
raise ValueError('don\'t know how to concatenate ', type(ytrain),
type(ytest))
return super().evaluate(model, (x, y))
......
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