[Scikit-learn-general] Combining multiple forests trained on different datasets

2015-04-14 Thread shalu jhanwar
Hi Scikit fans, I want to combine multiple forests with same no. of samples but different no. of features. For e.g. Here are two estimators of random forest with different no. of features: estimator = RandomForestClassifier(n_estimators=best_n_estimators,max_depth=best_max_depth,random_state=0)

[Scikit-learn-general] Regarding learning curve

2015-03-02 Thread shalu jhanwar
Hi guys, I want to check the overfitting/under-fitting of the RF model classifier. I have plotted learning curve to for this purpose. I have 2 classes in 1:1 ration in my training data and I have used StratifiedShuffleSplit for 10 iterations. Based on the scores, I found it as a good training dat

[Scikit-learn-general] Fwd: Regarding learning curve

2015-03-02 Thread shalu jhanwar
Hi guys, I want to check the overfitting/under-fitting of the RF model classifier. I have plotted learning curve to for this purpose. I have 2 classes in 1:1 ration in my training data and I have used StratifiedShuffleSplit for 10 iterations. Based on the scores, I found it as a good training dat

[Scikit-learn-general] import learning_curve: No module named learning_curve

2015-02-28 Thread shalu jhanwar
Hey Guys, Though I have scikit learn installed, but I am unable to import this module: from sklearn.learning_curve import learning_curve ImportError: No module named learning_curve I googled it and found that it has some incompatibility with python version: http://stackoverflow.com/questions/254

Re: [Scikit-learn-general] Desicion_function SVM returns one class score only

2015-02-26 Thread shalu jhanwar
2 classes there'd be one hyperplane. Iris dataset contains 3 classes, so > there are 3 possible pairs, and thus 3 columns in the result of > decision_function. > > On Thu, Feb 26, 2015 at 7:28 PM, shalu jhanwar > wrote: > >> Hi guys, >> >> I'm facing a

Re: [Scikit-learn-general] Query: Random forest

2015-02-26 Thread shalu jhanwar
hould be well > calibrated, too. > iv) Use k-fold cross validation. ( > http://scikit-learn.org/stable/modules/cross_validation.html) > > Best, > Sebastian > > > On Feb 26, 2015, at 8:00 AM, shalu jhanwar > wrote: > > Hey guys, > > Would you like to comment o

[Scikit-learn-general] Desicion_function SVM returns one class score only

2015-02-26 Thread shalu jhanwar
Hi guys, I'm facing a problem when I am using decision_function in svm classifier. I have *2 classes*, but decision function is returning an array with *one column* only. Decision_function is working fine with iris dataset. I'm afraid if I am doing something wrong while reading my files/data. Any

[Scikit-learn-general] Query: Random forest

2015-02-26 Thread shalu jhanwar
Hey guys, Would you like to comment on them according to your exp.? i) if both the classes are having same probability (0.5), then which class would be predicted by Random Forest? ii) In my classification, I have seen more false predictions corresponding to the positive class by my model. Can you

Re: [Scikit-learn-general] Confidence value for each sample: Random Forest

2015-02-25 Thread shalu jhanwar
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_prababili

Re: [Scikit-learn-general] SVC.predict_proba result inconsistent with SVC.predict result

2015-02-25 Thread shalu jhanwar
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

Re: [Scikit-learn-general] Confidence value for each sample: Random Forest

2015-02-25 Thread shalu jhanwar
0.57 0.42 Please let me know still am I missing something?? thanks! Shalu On Wed, Feb 25, 2015 at 9:53 PM, shalu jhanwar wrote: > Hi guys! > > Ahh, ok, I check it and will confirm you. > > thanks! > Shalu > > On Wed, Feb 25, 2015 at 9:32 PM, Andy

Re: [Scikit-learn-general] Confidence value for each sample: Random Forest

2015-02-25 Thread shalu jhanwar
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 classifier to perform binary classification on > my dataset. I wanted to have a confidence value of both the classes > co

Re: [Scikit-learn-general] SVC.predict_proba result inconsistent with SVC.predict result

2015-02-25 Thread shalu jhanwar
Thanks! Shalu On Wed, Feb 25, 2015 at 9:21 PM, Andy wrote: > 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

[Scikit-learn-general] Confidence value for each sample: Random Forest

2015-02-25 Thread shalu jhanwar
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

Re: [Scikit-learn-general] SVC.predict_proba result inconsistent with SVC.predict result

2015-02-25 Thread shalu jhanwar
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

Re: [Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-22 Thread shalu jhanwar
Yeah ..it's here. thanks for the explanation. S. On Sun, Feb 22, 2015 at 10:57 PM, Andy wrote: > I think it is. The last character of my answer was "_". > That is the variable name to which you assign the thresholds in your code. > > > On 02/22/2015 01:54 PM, sh

Re: [Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-22 Thread shalu jhanwar
Hi Andy, thanks for the reply. I guess your second question's ans. is not completely displayed in the email. Could you please re-post it? thanks! S. On Sun, Feb 22, 2015 at 10:46 PM, Andy wrote: > > On 02/22/2015 01:21 PM, shalu jhanwar wrote: > > Hi guys, > > th

Re: [Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-22 Thread shalu jhanwar
g/stable/modules/generated/sklearn.metrics.auc.html#sklearn.metrics.auc>(fpr["micro"], tpr["micro"]) I'm just using this default code, but I would like to know about the threshold it uses to generate each point of ROC thanks! Shalu On Fri, Feb 20, 2015 at 5:27 PM,

Re: [Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-20 Thread shalu jhanwar
Generally I do PCA and can plot the reduced dimension of the data (PC1 and PC2). Here I'm interested in knowing the boundary decision of the classifier. S. On Fri, Feb 20, 2015 at 6:34 PM, Gael Varoquaux < gael.varoqu...@normalesup.org> wrote: > On Fri, Feb 20, 2015 at 05:27:12P

Re: [Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-20 Thread shalu jhanwar
in 2D/3D. > > Best, > Sebastian > > > On Feb 20, 2015, at 8:29 AM, shalu jhanwar > wrote: > > > > Hi guys, > > > > I am using SVM and Random forest classifiers from scikit learn. I wonder > is it possible to plot the decision boundary of the model on my

[Scikit-learn-general] Regarding viewing the decision boundaries of classifiers

2015-02-20 Thread shalu jhanwar
Hi guys, I am using SVM and Random forest classifiers from scikit learn. I wonder is it possible to plot the decision boundary of the model on my own training dataset so that I can have a feeling of the data? Is there any in-built example available in Scikit which I can refer to view " let's say m

Re: [Scikit-learn-general] Regarding classification with one variable only

2015-02-16 Thread shalu jhanwar
6, 2015 at 4:01 PM, shalu jhanwar > wrote: > >> Hi Scikit fans, >> >> I am facing following error while performing classification with *single >> feature* only: >> >> reg = linear_model.LogisticRegression() >> *scores.append(reg.fit(X_train, y_

[Scikit-learn-general] Regarding classification with one variable only

2015-02-16 Thread shalu jhanwar
Hi Scikit fans, I am facing following error while performing classification with *single feature* only: reg = linear_model.LogisticRegression() *scores.append(reg.fit(X_train, y_train).score(X_test, y_test))* Traceback (most recent call last): File "", line 1, in File "/software/so/el6.3/Pyt

Re: [Scikit-learn-general] Regarding TPR and FPR

2014-10-27 Thread shalu jhanwar
font = {'family': 'normal', 'weight': 'bold', 'size': 22} > plt.rc('font', **font) > plt.show() > > return > > > On Fri, Oct 24, 2014 at 5:10 PM, Pagliari, Roberto < > rpagli...@appcomsci.com> wr

[Scikit-learn-general] Regarding TPR and FPR

2014-10-24 Thread shalu jhanwar
Hi scikit users, Can anyone let me know that how can i get mean TPR and mean FPR to plot ROC using scikit? I'm referring to http://scikit-learn.org/stable/auto_examples/plot_roc.html link. Any idea would be appreciated? Thanks in advance. Shalu -

[Scikit-learn-general] Regarding ROC from multiple classifiers

2014-10-07 Thread shalu jhanwar
Hi Scikit Users, I want to make a ROC curve to compare various classifiers. Can anybody tell me how to plot it? I am already familiar of plotting ROC using cross-validation. But I am unable to plot a single ROC having all the classifiers to compare the performance. Many thanks! Shalu ---