[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] 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

[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

[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:

[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.

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

2015-02-26 Thread shalu jhanwar
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 shalu.jhanwa...@gmail.com wrote: Hey guys, Would you like to comment on them according to your exp.? i) if both

[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

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

2015-02-26 Thread shalu jhanwar
. 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 shalu.jhanwa...@gmail.com wrote: Hi guys, I'm facing a problem when I am using decision_function in svm classifier. I have

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

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

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

2015-02-25 Thread shalu jhanwar
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 get a confidence value for each class and each prediction

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

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

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

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 shalu.jhanwa...@gmail.com wrote: Hi Andy, Please see the code. Hereby I am attaching following files: i) Code

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

2015-02-22 Thread shalu jhanwar
#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, shalu jhanwar shalu.jhanwa...@gmail.com wrote: Hi Sebastian, Thanks a lot for your reply. Here

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 t3k...@gmail.com 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, shalu jhanwar wrote

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 t3k...@gmail.com wrote: On 02/22/2015 01:21 PM, shalu jhanwar wrote: Hi guys, thanks a lot for all

[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

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

2015-02-20 Thread shalu jhanwar
On Feb 20, 2015, at 8:29 AM, shalu jhanwar shalu.jhanwa...@gmail.com 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 own training dataset so that I can have a feeling of the data

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:12PM +0100, shalu

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

2015-02-16 Thread shalu jhanwar
, 2015 at 4:01 PM, shalu jhanwar shalu.jhanwa...@gmail.com 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_train).score(X_test, y_test))* Traceback (most

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

2014-10-27 Thread shalu jhanwar
their values . *From:* shalu jhanwar [mailto:shalu.jhanwa...@gmail.com] *Sent:* Friday, October 24, 2014 11:36 AM *To:* Pagliari, Roberto *Subject:* Fwd: [Scikit-learn-general] Regarding TPR and FPR Hey Roberto, Could you please suggest something for my below query? thanks! S

[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