Machine learning framework for Python.

learn more… | top users | synonyms

1
vote
1answer
33 views

How do we predict rare events?

I am working on developing an insurance risk predictive model. These models are of "rare events" like airline no-show prediction, hardware fault detection, etc. As I prepared my data set, I tried to ...
0
votes
2answers
33 views

Streaming k-means

I want to perform something like streaming/online/out-of-core kmeans clustering on large data. Here is simple idea: Break all data into N chunks. Read from disk 1st chunk and calculate centroids ...
1
vote
0answers
19 views

scikit learn: add lasso or ridge penalty only on subset of parameters

Is there a way of using the linear model api to add the lasso penalty for a subset of the parameters I am regressing? For example, consider a linear separable decomposition that I want to fit to some ...
0
votes
1answer
23 views

R's equivalente of scikit's KFold

I'm new to R and I'm trying to set up a basic k folds CV loop. In Python I'd use scikit's KFold. ...
1
vote
0answers
12 views

How Does a Disparity in Number of Documents (Training Data Points) Affect Text Classification?

I have collected a fairly clean set of data (5,410 documents) to train a text classifier. I am now attempting to improve my classification success. (Note: When I trained/tested the classifier from ...
0
votes
0answers
10 views

Training models for classification using different negative datasets

I'm working on a massively unbalanced binary classification task - Classification of given protein sequences as belonging to a certain (very small) class, or not. There are about 1,300 positive ...
1
vote
0answers
20 views

“Robust” normalization of features from multiple groups and unknown distributions prior to learning

I'm working on a machine learning project involving statistical analysis (and later discriminatory classification) of different proteins (samples) drawn from multiple, potentially overlapping classes ...
0
votes
0answers
20 views

Prediction with scikit and an precomputed kernel (SVM)

I am kind of a newbie in the MachineLearning area and evaluating some tools etc. to get a feeling for it. For a project I am using a tool that creates a precomputed kernel (gram matrix) and also is ...
5
votes
1answer
197 views

What is the right attitude toward open source machine learning toolkits?

There are lots of machine learning toolkits nowadays, such as weka, sklearn, R libs. If we choose to use these toolkits, besides that it is convenient, sometimes ...
0
votes
1answer
36 views

Regression Tree when target is a ratio

I am learning a regression tree for data of the form $(x_i,y_i)$: $x_i = (1, 0, 1, ...., 1 , 1)$ a multiple input vector and $y$ is a ratio of the number of observations divided by the number of ...
0
votes
0answers
10 views

Pandas dataset into an array for modelling in Scikit-Learn [migrated]

Can we not run scikit-learn models on pandas dataframe, do we need to always convert the dataset into an array, in order to run it properly.
1
vote
0answers
60 views

Using BIC to estimate the number of k in KMEANS

I am currently trying to compute the BIC for my toy data set (ofc iris (: ). I want to reproduce the results as shown here (Fig. 5). That paper is also my source for the BIC formulas. I have 2 ...
0
votes
0answers
20 views

building a feature set for scikit learn

Im using RandomForestClassifier for a probability prediction task. I have a featureset of around 50 features and two possible labels - ...
2
votes
2answers
103 views

How to compute the standard errors of a logistic regression's coefficients

I am using Python's scikit-learn to train and test a logistic regression. scikit-learn returns the regression's coefficients of the independent variables, but it does not provide the coefficients' ...
0
votes
0answers
14 views

Imputing categorical variables before binarization

I wish to replace the missing values with mode of that categorical variable. In scikit-learn, we can something like Imputer(strategy="most_frequent", axis=0) but ...
0
votes
0answers
27 views

How to normalize ranked data

I am doing some machine learning and need help with the stats aspect of my problem. I have a number of addresses of webpages and some features for these webpages. I am running TF-IDF on the webpage ...
2
votes
1answer
56 views

Name of algorithm (or paper) that scikit-learn cluster.estimate_bandwidth() function implements for meanshift bandwidth selection

Can someone tell me the name of the algorithm (or paper) that sklearn.cluster.estimate_bandwidth implements and is used by the meanshift algorithm implemented in Scikit-Learn to automatically select ...
0
votes
1answer
89 views

How to construct the feature weight vector (or Decision Boundry) from a linear SVM classifier from scikit?

I use the following code to train an svm classifier: clf = svm.SVC(kernel='linear') clf.fit(train_mat, train_labels) that fit the data and save the info in the ...
1
vote
0answers
61 views

Logistic Regression not quite working

I'm playing around with logistic regression (using scikit-learn, which uses liblinear) I created some example data sets, and it often works well. Since I created the data sets, I already know the ...
0
votes
0answers
51 views

what to do with 0.5 class probabilities ?

I am currently training a random forest regressor (scikit learn) on the Titanic dataset. My question is related to this issue ...
1
vote
0answers
39 views

Heuristic Feature Selection for Gradient Boosting

I originally posted on stackoverflow and was told to move it here: If I am trying to select from two different sets of features for a Gradient Boosting Machine but I do not want to run through ...
0
votes
0answers
34 views

Suitable model for predicting range-bound integer attribute?

I need to predict an integer variable in the scale (0-50). I am wondering how it should be modeled: Should zero be predicted as a 0/non-0 categorical classification separately, given that ...
1
vote
0answers
52 views

Dimension Reduction using PCA and Random Forests

I an using scikit-learn as a toolset. I have 1K features as candidates and am trying to reduce the feature set as I believe the majority is noise (but am not sure). I wanted to somehow automate ...
0
votes
0answers
40 views

equivalent of PCA explained variance ratio for SVD ?

i am wondering if there is an equivalent of PCA explained variance ratio for SVD. What are the measures I can get to monitor the number of columns I keep after the SVD ? Are any of these metrics ...
0
votes
0answers
11 views

scikit-learn SkewedChi2Sampler - meaning of skewedness parameter

I am trying to understand the meaning of the "skewedness" parameter for scikit-learn's SkewedChi2Sampler and figure out how this value affects the output of the sampler. I have looked at the docs ...
0
votes
0answers
314 views

Principal Component Analysis and Regression in Python

I'm trying to figure out how to reproduce in Python some work that I've done in SAS. Using this dataset, where multicollinearity is a problem, I would like to perform principal component analysis in ...
3
votes
2answers
129 views

Is it possible to train a one-class SVM to have zero training error?

I'm trying to work on an anomaly detection problem, so I am currently exploring my options on which algorithm is best to use for me. I've been looking at the one-class SVM in the scikit-learn library ...
0
votes
1answer
85 views

How to interpret scikit learn classification tree?

I'm currently trying to work with scikit-learn classification tree. I followed the example on iris dataset : http://scikit-learn.org/stable/modules/tree.html and everything is working fine. I do ...
1
vote
0answers
134 views

Features in sklearn logistic regression

I have some problem with adding own features to sklearn.linear_model.LogisticRegression. But anyway lets see some example code: ...
0
votes
0answers
75 views

scikit learn HMM training results in non-positive definite covariance matrix

I have a observation sequence of around 1000 samples, each observation is a 10 dim vector. I am trying to learn an HMM model based on this. Specifically I am using the GaussianHMM based on this ...
0
votes
1answer
78 views

Scikit-Learn GaussianHMM decode vs score [closed]

What Exactly is the difference between decode and score? The documentation seems pretty sparse regarding this. My guess is that: decode represents the probability of the best sequence of states for a ...
1
vote
1answer
40 views

Assigning tags to documents

I am dealing with a text classification problem. Where I need to assign tags to a document. The amount of tags I need to assign varies from 1 to 5. I am struggling somewhat on how I should tackle this ...
0
votes
1answer
107 views

Comparing different classifiers (using ski-kit cross validation values)

Thanks for taking the time to read this I'm new to Machine Learning and so am going through a Kaggle competition to help me improve but I have a question. How can I compare different classifiers?? My ...
1
vote
0answers
56 views

Proper splitting of data set for Ensemble methods

I have 10,000 documents. Each document has a label ($Y$) that is either $0$ or $1$ (the 0-1 split is pretty much 50/50 over my 10,000 documents). Each document has 10 fields. Each field can have any ...
1
vote
1answer
238 views

How to compare dbscan clusters / choose epsilon parameter

I am currently trying to make a DBSCAN clustering using scikit learn in python. I would like to compare the different outputs when varying the epsilon parameter in order to choose the right epsilon ...
0
votes
0answers
77 views

Simulate Multivariate Normal using Cholesky or Singular Value Decomposition

I have a question concerning simulating multivariate normal distributions: should we use Cholesky or SVD to compute matrix square root of the covariance? Which is computationally faster? Which is ...
3
votes
1answer
195 views

Can Random Forests do much better than the 2.8% test error on MNIST?

I haven't found any literature on the application of Random Forests to MNIST, CIFAR, STL-10, etc. so I thought I'd try them with the permutation-invariant MNIST myself. In R, I tried: ...
5
votes
1answer
219 views

Clustering inertia formula in scikit learn

I would like to code a kmeans clustering in python using pandas and scikit learn. In order to select the good k, I would like to code the Gap Statistic from Tibshirani and al 2001 (pdf). I would like ...
3
votes
1answer
85 views

scikit-learn score metric

I am using scikit-learn in Python and they define a quantity called score. It's defined in the middle of the documentation page. Reproduced here: Returns the ...
1
vote
1answer
74 views

How do I find co-occurring labels?

I have a matrix that is of the shape n_samples by n_features, where n_samples ~ 7000 and ...
0
votes
0answers
86 views

SciKit SGD Regressor RBF Kernel Approximation

I am using scikit-learn and would like to run SVR with RBF kernel. My dataset was quite large so from reading other posts, I was advised to use SGD regression and RBF approximation. Interestingly I ...
2
votes
1answer
310 views

Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function?

I'm using the scikit-learn's implementation of Gaussian processes. A simple thing to do is to combine multiple kernels as a linear combination to describe your time series properly. So I'd like to ...
0
votes
0answers
119 views

Using a nominal independent variable in scikit-learn

I am trying to understand how scikit-learn uses input data to train and build a classifier. Please note that i am both a Python and scikit-learn newbie. From what i understand so far, scikit-learn ...
3
votes
1answer
285 views

What is the objective Scikit-learn's Random Forest classifier is optimizing at each node?

I would like to ask what is the specific objective function that Scikit-learn's Random Forest classifier is optimizing at each node for the "Entropy" option. My understanding is that entropy is used ...
0
votes
1answer
41 views

Scikit linear model predictions not matching

I'm using scikits linear model for modelling two input variables and one output variable. I suspect that the two input variables have a quadratic relationship with the output variable. So I created ...
1
vote
2answers
360 views

Lasso cross validation

I want to perform cross validation to find the regularization parameter for Lasso. I am using scikit-learn library in python. I first generate the dataset and then perform k-fold cross-validation. ...
0
votes
0answers
57 views

Variance explained for PLS

Using sklearn in Python, I can calculate the explained variance for PCA (sklearn.decomposition.PCA) using: ...
1
vote
1answer
86 views

What is the min_density parameter in scikit-learn Random Forest/ExtraTrees for?

The ExtraTreesClassifier and Random Forest in Scikit learn library has a parameter "min_density". Its default value is set to 0.1. I cannot seem to figure out what this min_density parameter means ...
4
votes
2answers
2k views

Random forest is overfitting?

I'm experimenting with random forests with scikit-learn and I'm getting great results of my training set, but relatively poor results on my test set... Here is the problem (inspired from poker) which ...
4
votes
1answer
1k views

How to use scikit-learn's cross validation functions on multi-label classifiers

I'm testing different classifiers on a data set where there are 5 classes and each instance can belong to one or more of these classes, so I'm using scikit-learn's multi-label classifiers, ...