Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 11097

scikit-learn is a popular machine learning package for Python that has simple and efficient tools for predictive data analysis. Topics include classification, regression, clustering, dimensionality reduction, model selection, and preprocessing.

2 votes

Extremely dominant feature?

You seem to be using the Random Forest model. I don't see how that feature would influence the model. It actually doesn't make a difference, as random forest divides the sample space iteratively, an …
Dawny33's user avatar
  • 8,416
34 votes

How to force weights to be non-negative in Linear regression

What you are looking for, is the Non-negative least square regression. It is a simple optimization problem in quadratic programming where your constraint is that all the coefficients(a.k.a weights) sh …
Dawny33's user avatar
  • 8,416
6 votes
Accepted

When does boosting overfit more than bagging?

I read your question as: 'Is boosting more vulnerable to overfitting than bagging?' Firstly, you need to understand that bagging decreases variance, while boosting decreases bias. Also, to be noted …
Dawny33's user avatar
  • 8,416
15 votes

Calculating KL Divergence in Python

I'm not sure with the scikit-learn implementation, but here is a quick implementation of the KL divergence in Python: import numpy as np def KL(a, b): a = np.asarray(a, dtype=np.float) b = np …
Dawny33's user avatar
  • 8,416
3 votes

How to prevent/tell if Decision Tree is overfitting?

Can you tell by an accuracy score? A general notion of gauging an overfit or an underfit is via validation curves. How can we do this? Not just a decision tree, (almost) every ML algorithm …
Dawny33's user avatar
  • 8,416
4 votes

Is there a way of performing stratified cross validation using xgboost module in python?

What you are doing is a typical example of k-fold cross validation. XGBoost is just used for boosting the performance and signifies "distributed gradient boosting". First, run the cross-validation s …
Dawny33's user avatar
  • 8,416
4 votes

How much time do scikit classifiers take to classify?

I don't see a huge problem here. So, I would try to answer all of your questions from the production-level point of view: How do I confirm that classification will not take much time? Take a su …
Dawny33's user avatar
  • 8,416
13 votes

How to calculate the fold number (k-fold) in cross validation?

Depends on how much CPU juice you are willing to afford for the same. Having a lower K means less variance and thus, more bias, while having a higher K means more variance and thus, and lower bias. …
Dawny33's user avatar
  • 8,416
2 votes

How to use Cohen's Kappa as the evaluation metric in GridSearchCV in Scikit Learn?

In addition to the link in the existing answer, there is also a Scikit-Learn laboratory, where methods and algorithms are being experimented. In case you are okay with working with bleeding edge code …
Dawny33's user avatar
  • 8,416