Search Results
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 |
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.
1
vote
1
answer
671
views
Choosing your own initialisation points for kmeans
Kmeans clustering will randomly select the initialisation points and then run the algorithm until convergence is reached. Is there a way I can choose my own initialisation points and pass them into th …
0
votes
1
answer
7k
views
Max depth for a decision tree in sklearn
I know there is a partial answer here but my question is slightly different.
I have implemented a decision tree in sklearn. Say I have $2^n$ different values for a feature, with just one feature. I wa …
2
votes
1
answer
1k
views
Giving more weight to a particular feature in scikit-learn decision trees
I have a model that I train on same data, but i want a feature to have a stronger weight.
Say I have three features:
Car manufacturer's name
Price
Top speed
and I want to classify my cars as "Spo …
46
votes
5
answers
51k
views
How to force weights to be non-negative in Linear regression
I am using a standard linear regression using scikit-learn in python.
However, I would like to force the weights to be all non-negative for every feature. is there any way I can accomplish that? I was …
5
votes
2
answers
19k
views
Learning rate in logistic regression with sklearn
In sklearn, for logistic regression, you can define the penalty, the regularization rate and other variables. Is there a way to set the learning rate?
1
vote
3
answers
3k
views
What should I use if I have millions of possible values for a feature in a sklearn predictiv...
I am trying to create a large model. One of the features is categorical, and it has almost 100 million entries.
I have looked at sklearn LabelEncoder, but I am concerned that it will still create an …
4
votes
2
answers
1k
views
Performance difference between decision trees and logistic regression when one of the featur...
I have a set of features, one of which is a string. I convert the string to an integer by treating the string as a base 36 number (I only use the first 13 characters). Then I can use DecisionTrees sin …
0
votes
2
answers
677
views
Contrasting logistic regression vs decision tree performance in specific example
I have a set of 10,000 integers, and another set of 100.
The integers in the first set are mapped to integers in the second set according to some rules (not mathematical rules, think of these values a …
19
votes
2
answers
86k
views
How does SelectKBest work?
I am looking at this tutorial: https://www.dataquest.io/mission/75/improving-your-submission
At section 8, finding the best features, it shows the following code.
import numpy as np
from sklearn.f …
0
votes
1
answer
354
views
Why logistic regression example code does not port to linear regression example?
I am looking at this tutorial: https://www.dataquest.io/mission/74/getting-started-with-kaggle
Following is the code for linear regression to predict, based on some variables, the survival of the tit …