# the progress bar implied that the transforming of the estimator didn't finish, but the output dvalues' shape is correct

**URL:** https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213
**Category:** Support & Discussions
**Tags:** machine-learning
**Created:** [July 4, 2022, 11:45am UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213 "2022-07-04T11:45:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![YuZhou](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yuzhou/32/76_2.png) [@YuZhou](https://mne.discourse.group/u/YuZhou)
#### Post date: [July 4, 2022, 11:45am UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/1 "2022-07-04T11:45:58Z")

</div>

- MNE version: 1.0
- operating system: linux

Hi! guys,  
When I trained the classifier in one dataset and tested it in another dataset, and tried to get the d values, I found that the progress bar showed the transformation of the estimator not finishing. However, the output d value had the correct shape, and the values seemed right. But I still worried that there was something wrong I didn’t notice. here is my code snippet:

```python
data_learn_pp = data_learn[o][r][:, :, start:end]
# (188, 72, 5)

x_train = np.expand_dims(np.mean(data_learn_pp, axis=2), axis=2) # (188, 72, 1)

time_gen = GeneralizingEstimator(clf, scoring='roc_auc', n_jobs=n_jobs, verbose=True)

time_gen.fit(X=x_train, y=labels_fea_learn[o][r][f])

n_trials = epo_data_obj_roi_ds_arr_trans_per.shape[0]

dvalues = []
for ntp in range(n_trials):
    X = np.expand_dims(epo_data_obj_roi_ds_arr_trans_per[ntp, :, :], axis=0) # (1, 72, 245)
    dvalue = np.squeeze(time_gen.decision_function(X)) # (245,)
    dvalues.append(dvalue)
    # len(dvalues): 56, i.e., n_trials

dval = np.asarray(dvalues)

```

Here is the screenshot of the progress bar:

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/d/dadf0088cc2c786364b7cc03db38c58e346d984c.png)

For each trial, the progress bar showed that only 20 time points in 245 time points had been calculated, but strangely my output `dvalue` had the shape of (245,) instead of (20,).

---

<div class="post-metadata">

### Author: ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)
#### Post date: [July 4, 2022, 5:02pm UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/2 "2022-07-04T17:02:16Z")

</div>

Hello, do you also see this problem with

```python
n_jobs=1

```

?

---

<div class="post-metadata">

### Author: ![YuZhou](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yuzhou/32/76_2.png) [@YuZhou](https://mne.discourse.group/u/YuZhou)
#### Post date: [July 5, 2022, 1:48am UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/3 "2022-07-05T01:48:40Z")

</div>

Hi! Richard,  
Thank you very much for your reply!

When I set n\_jobs=1, the transforming generalizing estimator bar became shorter, here is the screenshot:

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/5/582df560c7d7cdd05f809e32ba09fc05ce0cdc5e.png)

I found that the number of processed time points corresponded to the number of n\_jobs I set. if I set n\_jobs=1, the processed time point is 1 as I circled with red color. if I set n\_jobs=20, the processed time points is 20 as I posted in the original picture.  
However, the output dvalue’s shape is still correct and the value looked normal.

---

<div class="post-metadata">

### Author: ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)
#### Post date: [July 5, 2022, 5:55am UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/4 "2022-07-05T05:55:21Z")

</div>

The number you’re referring to is simply the current number (count) of jobs that’s being processed.

It appears to me that somehow all the output in your window is kind of messed up.

But as long as the results you’re getting are correct, there’s nothing to worry about.

---

<div class="post-metadata">

### Author: ![YuZhou](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yuzhou/32/76_2.png) [@YuZhou](https://mne.discourse.group/u/YuZhou)
#### Post date: [July 5, 2022, 11:11am UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/5 "2022-07-05T11:11:11Z")

</div>

Although the output looked normal, I’m still confused about why the processing bar didn’t finish and the processing percentage is always stopped in the n\_jobs I set / the total number of the time points, which did not make sense. In the normal case, the processing bar should stop at 100% percent, i.e., 245/245. (245 is the number of time points in an epoch after downsample).  
By the way, what do you mean by the output in my window is messed up, I don’t get it 🫣

---

<div class="post-metadata">

### Author: ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)
#### Post date: [July 5, 2022, 6:18pm UTC](https://mne.discourse.group/t/the-progress-bar-implied-that-the-transforming-of-the-estimator-didnt-finish-but-the-output-dvalues-shape-is-correct/5213/6 "2022-07-05T18:18:10Z")

</div>

> [@YuZhou](#):
>
> what do you mean by the output in my window is messed up, I don’t get it 🫣

It appears the progress bars don’t display correctly, and content appears in lines where it shouldn’t. Everything is a bit out of order.
