It didn't work Andy, even after that...
I removed refitting the data, but didn't set random_state explicitly. The
same problem persist. Look at these few examples:
Y_true Y_predict Class0_prob. Class1_prob.
1 0 0.28 0.72
0
I just told you that the repeated call to fit is the reason.
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for al
Hi Andy,
Yes here is the full code in which I am having a training dataset (x_data)
and an independent test dataset(test_x_data).
Mose importantly, I found few such value in iris data too.
#same Scaling on both test and train data (centering the data scaling)
scaler = preprocessing.StandardSc
Hi Shalu.
Can you give your code. The prediction is just the argmax of
predict_proba, so I'd be very surprised if they are not consistent.
Cheers,
Andy
On 02/25/2015 08:33 AM, shalu jhanwar wrote:
Hi all,
I'm facing the same problem with predict_proba for Random_forest
classifier. I want to
Hi all,
I'm facing the same problem with predict_proba for Random_forest
classifier. I want to get a confidence value for each class and each
prediction. But as shown here, that probability values are not consistent
with prediction always so I was looking for decision_function method for
random fo
2014-06-26 9:15 GMT+02:00 Andy :
> Maybe the calibration is not used for prediction? That would be a bit
> odd, though...
That's exactly what's going on. Prediction is consistent with
decision_function, but not predict_proba.
---
These are not different runs, though
Maybe the calibration is not used for prediction? That would be a bit
odd, though...
On 06/26/2014 09:07 AM, Alexandre Gramfort wrote:
> hi,
>
> proba calibration with libsvm (using Platt's method) involves data resampling.
> So between runs the result ca
hi,
proba calibration with libsvm (using Platt's method) involves data resampling.
So between runs the result can change.
HTH
Alex
On Thu, Jun 26, 2014 at 12:51 AM, Stelios wrote:
> Hello all,
>
> I have the following code:
>
> . . . .
> # 'train' is a (M,N) numpy array (input) and 'traint' is
Hello all,
I have the following code:
. . . .
# 'train' is a (M,N) numpy array (input) and 'traint' is a (M,) numpy array
(target/label)
clf = SVC(kernel="rbf", C=1.74, gamma=0.0023, probability=True)
clf.fit(train, traint)
print clf.classes_# Ensure our classes are [0,1]
t1 = clf.predict_pr