That looks fine.
in line 125, can you try
assert(np.all(np.argmax(y_score, axis=-1) == y_pred))
That should go through.
On 02/25/2015 05:38 PM, shalu jhanwar wrote:
Hi Andy,
please find this version of the code in which I changed the refit issue.
thanks!
Shalu
On Wed, Feb 25, 2015 at 11:35
Hi Andy,
please find this version of the code in which I changed the refit issue.
thanks!
Shalu
On Wed, Feb 25, 2015 at 11:35 PM, shalu jhanwar
wrote:
> Hi Andy,
>
> Please see the code. Hereby I am attaching following files:
> i) Code: RandomForest_IndependentDataset_prabability_values.py
> i
please show the code.
On 02/25/2015 04:51 PM, shalu jhanwar wrote:
Hi guys!
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
Hi guys!
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 0
Hi guys!
Ahh, ok, I check it and will confirm you.
thanks!
Shalu
On Wed, Feb 25, 2015 at 9:32 PM, Andy wrote:
> You fit the data again before calling predict_proba.
> You did not fix the random seed, so the outcome of the fit will be
> different and you can't expect it to be consistent.
> Ju
You fit the data again before calling predict_proba.
You did not fix the random seed, so the outcome of the fit will be
different and you can't expect it to be consistent.
Just remove the second call to fit.
On 02/25/2015 06:35 AM, shalu jhanwar wrote:
Hey Guys,
I am using Random forest clas
Hi, Shalu,
can you try to not refit the RandomForestClassifier between .predict() and
.predict_proba() or set the random_state and check whether there is still such
a discrepancy?
Best,
Sebastian
> On Feb 25, 2015, at 6:35 AM, shalu jhanwar wrote:
>
> Hey Guys,
>
> I am using Random forest
Hey Guys,
I am using Random forest classifier to perform binary classification on my
dataset. I wanted to have a confidence value of both the classes
corresponding to each sample. For that purpose, I used "predict_proba"
method to predict class probabilities for X samples.
I saw 2-3 strange observ