Type Error on Regression Problem


RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “C:\Users\jorda\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\parallel_sampling.py”, line 73, in run
self._start_loop()
File “C:\Users\jorda\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\parallel_sampling.py”, line 113, in _start_loop
point, stats = self._compute_point()
File “C:\Users\jorda\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\parallel_sampling.py”, line 139, in _compute_point
point, stats = self._step_method.step(self._point)
File “C:\Users\jorda\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\step_methods\arraystep.py”, line 247, in step
apoint, stats = self.astep(array)
File “C:\Users\jorda\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\step_methods\hmc\base_hmc.py”, line 117, in astep
‘might be misspecified.’ % start.energy)
ValueError: Bad initial energy: inf. The model might be misspecified.
“”"

The above exception was the direct cause of the following exception:

ValueError Traceback (most recent call last)
ValueError: Bad initial energy: inf. The model might be misspecified.

The above exception was the direct cause of the following exception:

RuntimeError Traceback (most recent call last)
in ()
36 y = pm.Normal(‘sales’, mu = mu, sd = s, observed = Y_train, shape = Y_train.shape)
37
—> 38 trace = pm.sample(draws=10000 ,progressbar=True)

~\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\sampling.py in sample(draws, step, init, n_init, start, trace, chain_idx, chains, cores, tune, nuts_kwargs, step_kwargs, progressbar, model, random_seed, live_plot, discard_tuned_samples, live_plot_kwargs, compute_convergence_checks, use_mmap, **kwargs)
447 _print_step_hierarchy(step)
448 try:
→ 449 trace = _mp_sample(**sample_args)
450 except pickle.PickleError:
451 _log.warning(“Could not pickle model, sampling singlethreaded.”)

~\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\sampling.py in _mp_sample(draws, tune, step, chains, cores, chain, random_seed, start, progressbar, trace, model, use_mmap, **kwargs)
997 try:
998 with sampler:
→ 999 for draw in sampler:
1000 trace = traces[draw.chain - chain]
1001 if trace.supports_sampler_stats and draw.stats is not None:

~\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\parallel_sampling.py in iter(self)
303
304 while self._active:
→ 305 draw = ProcessAdapter.recv_draw(self._active)
306 proc, is_last, draw, tuning, stats, warns = draw
307 if self._progress is not None:

~\AppData\Local\conda\conda\envs\theano\lib\site-packages\pymc3\parallel_sampling.py in recv_draw(processes, timeout)
221 if msg[0] == ‘error’:
222 old = msg[1]
→ 223 six.raise_from(RuntimeError(‘Chain %s failed.’ % proc.chain), old)
224 elif msg[0] == ‘writing_done’:
225 proc._readable = True

~\AppData\Local\conda\conda\envs\theano\lib\site-packages\six.py in raise_from(value, from_value)

RuntimeError: Chain 0 failed.