Machine learning framework for Python.

learn more… | top users | synonyms (1)

-3
votes
0answers
4 views

invoke pipeline functions in sklearn [on hold]

i want to invoke sklearn pipeline with a function to transform the sparse matrix output from feature extraction process to the guassianNB() classifier ...
0
votes
0answers
14 views

Random Forest: Strange Feature Importance Results for Constant Variables

I've been using the RandomForestClassifier in python's Sklearn package to assess the importance of the features in a large dataset with features that are both binary and continuous. I've done quite a ...
1
vote
1answer
32 views

Learning curves - Why does the training accuracy start so high, then suddenly drop?

I implemented a model in which I use Logistic Regression as classifier and I wanted to plot the learning curves for both training and test sets to decide what to do next in order to improve my model. ...
0
votes
1answer
11 views

Using centroids to find predictive cluster features

I clustered some data (rows: text documents, columns: word frequencies) using the KMeans implementation in Scikit Learn. This, like most other centroid-based clustering algorithms, returns a centroid ...
0
votes
0answers
9 views

converting feature from string to categorical reduces classification accuracy

I am working on San Francisco crime classification problem from kaggle. https://www.kaggle.com/c/sf-crime during the work I encountered something unexpected. I applied scikit learn's random forest ...
0
votes
1answer
33 views

Random Forest model good train and test performance but bad “real world” performance

I am working on a classification problem where I need to classify objects based on a visual data. There are a couple hundred different classifications to be made and I have around a million plus ...
-1
votes
0answers
11 views

How to pass custom Distance function to scikit-learn KMeans clustering [closed]

I m trying to use "Hamming Distance" as a metric for doing K-Means clustering. I couldn't find any example. Please help me with this. I checked the documentation. It doesn't tell any where, how we can ...
2
votes
1answer
35 views

Ensemble models perform worse than single one

In my model testing, I tried to use model ensembling (blending in this case) to get better results. However the ensemble cannot beat single RandomForrestClassifier. In first layer, I train ...
1
vote
1answer
30 views

Machine learning step order question

I have been working on this project for over a year now and I believe i finally have things figured out. Mainly i'm looking for any suggestions or things i'm doing wrong with my process, but i also ...
1
vote
0answers
77 views

Generate code for sklearn's GradientBoostingClassifier

I want to generate code (Python for now, but ultimately C) from a trained gradient boosted classifier (from sklearn). As far as I understand it, the model takes an initial predictor, and then adds ...
0
votes
0answers
13 views

Order of input data gives different results

The background I am predicting binary target, class 1 is undersampled in ratio 5% to 95%. I have about 120 dimensions. So first I took all samples of class 1 and then roughly same number of class 0 ...
2
votes
1answer
31 views

In a CART model, why is the average of the leaf proportions equal to the total proportion only when the classes are unweighted?

Suppose I want to do binary classification (the two classes are 0 and 1) and I choose to work with a CART model. I first fit this model on a training set. (Note that I am using Python, and ...
0
votes
0answers
11 views

Do you need to scale Vectorizers in sklearn?

I have a set of custom features and a set of features created with Vectorizers, in this case TfidfVectorizer. All of my custom features are simple np.arrays (e.g. [0, 5, 4, 22, 1]). I am using ...
1
vote
0answers
23 views

Why is my SVM multiclass classifier only correctly predicting a few classes?

I'm doing an online course to learn the basics of Machine Learning. This exercise is on how to use a SVM classifier with multiple classes. While the problem is specific to question 2 from this ...
1
vote
0answers
59 views

Linear SVM feature weights interpretation. Binary classification, only positive feature values

I'm using clf = svm.SVC(kernel='linear') on a data set with only two classes $y \in \{-1, +1\}$ and the feature values of all samples are normalized between 0 and ...
1
vote
1answer
75 views

Difference between ElasticNet in scikit-learn Python and Glmnet in R

Has anybody tried to verify whether fitting an Elastic Net model with ElasticNet in scikit-learn in Python and glmnet in R on ...
2
votes
0answers
29 views

Strategy for finding optimal bagging parameters

I am using a BaggingClassifier of SVMs in sklearn. What is the best strategy for finding optimal parameters, using my training/vaildation data? When using the full dataset, I can use grid search to ...
0
votes
1answer
37 views

Assigning weights to a multilabel SVM to balance classes

How is this done? I am using Sklearn to train an SVM. My classes are unbalanced. Note that my problem is multiclass, multilabel so I am using OneVsRestClassifier: ...
0
votes
0answers
28 views

Predicting of revenue. Penalized regression (Ridge regression)

I have data of sales. I've selected one point of sales to check a possibility of predicting revenue using regression method (I don't know what can I use in this task). First of all I've tried to find ...
1
vote
0answers
31 views

Modelling house energy production using month as a variable

I'm attempting to model the energy production of a set of houses for which data on temperature and daylight over 22 months is available. The data is arranged such as such: ...
2
votes
1answer
42 views

Find max value of random forest regressor output

I was wondering, for scikit learns regressors (extra trees, random forest regressor etc), how can i find the combination of inputs that would give me the max value of the target variable? Other than ...
1
vote
0answers
39 views

Difference in partial dependence calculated by R and Python

I noticed there's a difference in partial dependence calculated by R package gbm and Python's scikit-learn. Here's ...
0
votes
1answer
17 views

random forest for density estimation using sklearn [closed]

I want to use or extend sklearn-randomForest for density estimation. I don't know to tackle it. I read A. Criminisi and his team work on random forest as a unified framework where they first ...
2
votes
1answer
41 views

Is it legitimate to modify the classification of an scikit-learn random forest classifier by changing its default threshold?

I am using a random forest binary classifier (in sklearn) in Python to detect anomalous events with an extremely unbalanced class dataset (1% are positive and 99% are negative). My recall score for ...
2
votes
1answer
140 views

Difference between selecting features based on “F regression” and based on $R^2$ values?

Is comparing features using F-regression the same as correlating features with the label individually and observing the $R^2$ value? I have often seen my ...
9
votes
2answers
231 views

Logistic Regression: Scikit Learn vs glmnet

I am trying to duplicate the results from sklearn logistic regression library using glmnet package in R. From the ...
1
vote
0answers
14 views

People detection in a supermarket zenital video

I am programming a people detector in a supermarket environment. I am using a dataset that I built from an example vídeo with 500 people and 500 background pictures which have 128x128 size with HOG ...
2
votes
1answer
105 views

Logistic Regression: Scikit Learn vs Statsmodels

I am trying to understand why the output from logistic regression of these two libraries gives different results. I am using the dataset from UCLA idre tutorial, predicting ...
0
votes
0answers
10 views

What do eps and tol do in LassoCV (scikit-learn)

Using scikit-learn: http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LassoCV.html Specifically, I am interested in: 1) If eps grows, does the accuracy(precision) increase or ...
1
vote
1answer
23 views

Designing a training set for regression on probabiltiy values given time , categorical and continous features

Assume we have following variables out of which "Probability of sale " needs to be predicted , and this is to be done for a portable business vendor whose location changes with time : Business ...
0
votes
0answers
37 views

measure overlap between data set samples

I'm learning machine learning from online sites and books that I bought on this, but I'm stuck with a question, which is about how to measure the overlap between data sets (test, trainning and ...
0
votes
0answers
39 views

Image Segmentation with a challenging background

[cross-posted from datascience, as no answers received] I'm working on an animal classification problem, with the data extracted from a video feed. The recording was made in a pen, so the problem is ...
0
votes
1answer
32 views

How to combine the results of several clustering with scikit-learn?

I am trying to fit several cluster algorithms on one or across several subsets of a data matrix X, of shape (n_samples, n_features). For example: ...
0
votes
0answers
9 views

Heuristically, to what extent do estimator's hyperparameter tunning influence results?

Let's supose that you: Want to take a first insight into a predictive problem (classification, regression, clustering etc.). Don't need the optimal solution, just get an idea of how good the ...
2
votes
1answer
16 views

Is it necessary to use warm_start when tracking oob_score in scikit RandomForestClassifier?

I'm planning on doing feature-selection with RandomForestClassifier by using the feature_importances and ...
1
vote
0answers
44 views

How to use sklearn Pipeline with custom Features? [closed]

I am doing text classification using Python and sklearn. I have some custom Features which I use in addition to vectorizers. I would like to know whether it is possible to use them with sklearn ...
0
votes
0answers
65 views

why gbm in r is better results in log loss than xgboost in r programming or gradient boosting in sklearn?

why gbm in r is better results in log loss than xgboost in r programming or gradient boosting in sklearn? My log loss is in gbm in r is around 0.537 on test sample, I done grid search using xgboost ...
0
votes
0answers
24 views

Different predictions on multiple run of the same algorithm scikit neural network

Since a MLP can implement any function. I have the following code, using which I am trying to implement the AND function. But what I find that on running the program multiple times, I end up getting ...
0
votes
1answer
28 views

Is there a way in sklearn to do multi-label classification that takes into account inter-label correlations?

As far as I understand sklearn's OneVsRestClassifier creates one independent classifier per label, but I'd think one would lose the potential benefit of taking into account other label predictions ...
0
votes
0answers
5 views

What does “Clamping factor” stands for in unsupervised label propogation?

see for example in sklearn package: http://scikit-learn.org/stable/modules/generated/sklearn.semi_supervised.LabelPropagation.html see reference http://pages.ucsd.edu/~ztu/publication/iccv13_dlp.pdf ...
0
votes
0answers
42 views

Predicting a complex response with regression trees, [duplicate]

I have a set of 8th order I-invariants which have been assigned three labels. I would like to predicting a complex response with regression trees using scikit Predicting a complex response with ...
1
vote
1answer
32 views

How to reduce dimensionality of audio data that comes in form of matrices and vectors?

I'm working on a project involved with identifying different types of sounds (such as screams, singing, and bangs) from each other. We've got our data a reasonable number of different transformations ...
0
votes
0answers
9 views

Is it possible to predict probabilities with Stochastic Gradient Descent with “hinge” loss?

I want to use SVMs to make predictions on a large dataset. I am using Stochastic gradient descent (Python SGDClassifier) with hinge loss. My problem is that I want to predict probabilities but the ...
0
votes
0answers
23 views

How do I judge low probability model quality?

I'm modeling loan defaults - an unlikely occurrence. My logistic regression model predicts probabilities ranging from 0.001% (squeaky clean) to 44% (hinky). Each specific prediction is "no, this ...
2
votes
2answers
59 views

Lasso with constraint on some coefficients (not all)

I would like to run a lasso regression (L1 penalisation) with a twist: there are different constraints on my problem. The coefficients for my features (predictors) are $\beta_i$. I want to find the ...
0
votes
1answer
44 views

Minimizing residual sum of squares formula

I recently saw a question on the scikit-learn mailing list that I had wondered about. This is the formula to minimize the residual sum of squares. ...
0
votes
0answers
41 views

Mixed Parameter Types for Regression

I wish to fit a logistic regression model with a set of parameters. The parameters that I have include three distinct types of data: Binary data [0,1] Categorical data which has been encoded to ...
2
votes
2answers
93 views

Predictive modeling with feature selection using a small sample size?

I am trying to build a predictive model for a binary classification problem. I have 200,000 features and 100 samples. I want to reduce the # of features and not over-fit the model, all while being ...
0
votes
0answers
57 views

Using sklearn.svm.SVC for binary classification and getting 0% accuracy!

I am using the default SVC with rbf kernel to do a leave one out procedure for training and predicting, i.e. I am leaving one sample out at a time for both X and y and using the rest of the samples to ...
0
votes
0answers
28 views

Force classifer to select a fixed number of targets

If I have an event date with 1000 possible items with only 100 being correct for each event. How do I force my classifier to select only 100 for each event? After I run it through my training model ...