If a simple error in one component of the pipeline leads to immediate failure, the sequence of conversion approaches is still followed until the last one fails. Only then does the overall operation fail and resulting stack trace displayed to user.
For example, in the following degenerate case, there should be a way to figure out how to clearly fault the ErrorTransformer in the log:
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'Series'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'DataFrame'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'asarray2d'
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py:475: DataConversionWarning: Data with input dtype int64 was converted to float64 by StandardScaler.
warnings.warn(msg, DataConversionWarning)
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 24, in transform
return _transform(X, **transform_kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'Series'
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'Series'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'DataFrame'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'asarray2d'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 24, in transform
return _transform(X, **transform_kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'DataFrame'
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'Series'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 433, in check_array
array = np.array(array, dtype=dtype, order=order, copy=copy)
ValueError: setting an array element with a sequence.
DEBUG:fhub_core.feature:Converting using approach 'DataFrame'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray2d'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 24, in transform
return _transform(X, **transform_kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray'
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'Series'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'DataFrame'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/preprocessing/data.py", line 681, in transform
estimator=self, dtype=FLOAT_DTYPES)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[1. 2. 3. 4.].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
DEBUG:fhub_core.feature:Converting using approach 'asarray2d'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 24, in transform
return _transform(X, **transform_kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'asarray2d'
DEBUG:fhub_core.feature:Converting using approach 'identity'
DEBUG:fhub_core.feature:Application subsequently failed with exception 'ValueError'
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py", line 50, in wrapped
return func(convert(X), **kwargs)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/scikit_learn-0.19.1-py3.6-macosx-10.7-x86_64.egg/sklearn/pipeline.py", line 426, in _transform
Xt = transform.transform(Xt)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_transformers-0.2.4-py3.6.egg/fhub_transformers/base.py", line 27, in transform
return self.func_call(X)
File "/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/funcy-1.10.1-py3.6.egg/funcy/funcs.py", line 37, in <lambda>
return lambda *a: func(*(a + args))
File "<ipython-input-14-70b3694491b7>", line 12, in error
raise ValueError
ValueError
DEBUG:fhub_core.feature:Converting using approach 'Series'
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-14-70b3694491b7> in <module>()
28
29 with LoggingContext(logging.getLogger('fhub_core'), level=logging.DEBUG):
---> 30 mapper.transform(df)
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/sklearn_pandas-1.6.0-py3.6.egg/sklearn_pandas/dataframe_mapper.py in transform(self, X)
277 if transformers is not None:
278 with add_column_names_to_exception(columns):
--> 279 Xt = transformers.transform(Xt)
280 extracted.append(_handle_feature(Xt))
281
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py in wrapped(X, y, **kwargs)
48 return func(convert(X), y=convert(y), **kwargs)
49 else:
---> 50 return func(convert(X), **kwargs)
51 except catch as e:
52 formatted_exc = indent(traceback.format_exc(), n=8)
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py in transform(self, X, **transform_kwargs)
22 def transform(self, X, **transform_kwargs):
23 _transform = make_robust_to_tabular_types(super().transform)
---> 24 return _transform(X, **transform_kwargs)
25
26
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/fhub_core-0.3.3-py3.6.egg/fhub_core/feature.py in wrapped(X, y, **kwargs)
48 return func(convert(X), y=convert(y), **kwargs)
49 else:
---> 50 return func(convert(X), **kwargs)
51 except catch as e:
52 formatted_exc = indent(traceback.format_exc(), n=8)
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/pandas-0.22.0-py3.6-macosx-10.7-x86_64.egg/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
262 else:
263 data = _sanitize_array(data, index, dtype, copy,
--> 264 raise_cast_failure=True)
265
266 data = SingleBlockManager(data, index, fastpath=True)
/usr/local/anaconda3/envs/dengue_prediction/lib/python3.6/site-packages/pandas-0.22.0-py3.6-macosx-10.7-x86_64.egg/pandas/core/series.py in _sanitize_array(data, index, dtype, copy, raise_cast_failure)
3273 elif subarr.ndim > 1:
3274 if isinstance(data, np.ndarray):
-> 3275 raise Exception('Data must be 1-dimensional')
3276 else:
3277 subarr = _asarray_tuplesafe(data, dtype=dtype)
Exception: a: Data must be 1-dimensional