Machine learning framework for Python.

learn more… | top users | synonyms

0
votes
0answers
6 views

svm svc specs for support_, dual_coef_ [on hold]

Do the indices returned in support_ correspond correctly to the values in dual_coef_? Or are the indices just returned in some random order? From experimentation, it seems that if I sort support_ ...
0
votes
1answer
19 views

Scikit-learn Scaled Data - Means Not Zero

I tried to scale the data by referring to the link as follow: http://scikit-learn.org/stable/modules/preprocessing.html However, when I checked the data distribution, the mean returned is NOT ZERO. ...
1
vote
2answers
119 views

How to standardize the variables in R for regression analysis

I have been looking at some tutorials and articles and couldn't get a scenario where two variables are in different scales and used in modeling. So, firstly lets assume I have one metric of numeric ...
0
votes
0answers
9 views

How does one call external datasets into scikit-learn? [migrated]

For example consider this dataset : (1) https://archive.ics.uci.edu/ml/machine-learning-databases/annealing/anneal.data or (2) http://data.worldbank.org/topic How does one call such external ...
0
votes
0answers
9 views

understanding accuracy assessment of classification

I want to classify an image and I want to know how well I did, but I am not sure if I understand the workflow properly. I use scikit-learn. I first use cross_validate and GridSearchCV to find the ...
0
votes
0answers
16 views

How to add cluster centers to the already transformed arrays with T-SNE Scikit Learn?

let's get this scikit original code, which is basically the one I'm using. My X is 2000x100 and in order to plot the clusters (plot on the right) I want to transform it with with the TSNE algorithm ...
1
vote
1answer
23 views

does sklearn rbm scale well with sparse high dimensional features

i am using scikit learn's RBM implementation. There are two problems: The running time is O(d^2) where d is the number of features. This becomes a problem in using high dimensionality sparse ...
2
votes
0answers
21 views

Feature selection of SVM

My question is three-fold In the context of "Kernelized" support vector machines Is variable/feature selection desirable - especially since we regularize the parameter C to prevent overfitting and ...
0
votes
0answers
21 views

Pandas generating features vector with apply()

I have a data set with two features: class (int) and content (text). Each row of content needs to be vectorized to a set of boolean features matching regexes. My vectorized function return a ...
0
votes
0answers
47 views

Did I use gradient descent correctly?

In an attempt to learn Gradient Descent. I've created my own dataset which is a the total bill of a meal with tips. As I created the perfect data so I make every meal with 10% tip. I purposely ...
0
votes
1answer
50 views

Can a Precision-Recall curve or a ROC curve be horizontal?

I am working on a binary classification task on imbalanced data. Since the accuracy is not so meaningful in this case. I use Scikit-Learn to compute the Precision-Recall curve and ROC curve in order ...
0
votes
0answers
19 views

What does it mean if the ROC scores are quite different when using the Stratified K fold with and without shuffling?

I'm currently building a random forest classification and trying to measure the model performance by the [mean ROC area]. With the same data set: When I use cross_validation.StratifiedKFold(y, ...
4
votes
1answer
57 views

How can 1 more feature disrupt a Random Forest's confusion matrix?

I'm trying to predict a binary variable with both random forests and logistic regression. I've got unbalanced classes (approx 1.5% of Y=1), so i'm calling ...
0
votes
0answers
20 views

scikit GBT terminal node updates

I am trying to understand scikit's gradient boosted tree implementation, i struggling to understand the terminal node update part ...
6
votes
1answer
157 views

What are the differences between Ridge regression using R's glmnet and Python's scikit-learn?

I am going through the LAB section ยง6.6 on Ridge Regression/Lasso in the book 'An Introduction to Statistical Learning with Applications in R' by James, Witten, Hastie, Tibshirani (2013). More ...
0
votes
0answers
14 views

Scikit Random forest pred_proba gives rounded off values

I am using random forest in scikit learn for classification and for getting the class probabilities , I used pred_proba function. But strangely it outputs probabilities rounded to first decimal place ...
1
vote
1answer
32 views

Identifying filtered features after feature selection with scikit learn

Here is my Code for feature selection method in Python: ...
0
votes
0answers
16 views

Are there methods in scikit-learn package for classification of input data based on its sequential relation?

I am sorry if this turns out to be a trivial question, since i am still new in this machine learning field. My question is, are there methods in scikit-learn package for classification of input data ...
2
votes
1answer
78 views

Scikit Binomial Deviance Loss Function

This is scikit GradientBoosting's binomial deviance loss function, ...
0
votes
0answers
25 views

Sensitivity to scaling of multivariate data with HMM

I have some multivariate data, say 40 features. Some features are scaled between 0 and 1, and some are scaled between 0 and 1e8. For reference, I am using sci-kit learn's HMM implementation (yes, I ...
2
votes
1answer
69 views

Area under Precision-Recall Curve (AUC of PR-curve) and Average Precision (AP)

Is Average Precision (AP) the Area under Precision-Recall Curve (AUC of PR-curve) ? EDIT: here is some comment about difference in PR AUC and AP. The AUC is obtained by trapezoidal ...
1
vote
0answers
43 views

Affinity Propagation (sklearn) - strange behavior

Trying to use affinity propagation for a simple clustering task: ...
0
votes
1answer
27 views

How to preprocess a large sparse matrix and unbalanced classes in machine learning

I have a large very sparse matrix with 1000 columns and 15000 rows. It mainly contains zeros, the rest is integer values from 1-8. I'm limited to scikit-learn and ...
0
votes
1answer
107 views

Various methods for predicting multiple dependent variables (python)

I would like to model and predict multiple dependent variables depending on one or more independent variables. The most straightforward method appears to be multivariate regression. I was wondering ...
1
vote
2answers
117 views

regression with scikit-learn with multiple outputs, svr or gbm possible?

I have been trying regression with scikit-learn with a problem with multiple outputs like this: ...
0
votes
2answers
52 views

What is “Verbose” in scikit-learn package of Python?

What is "Verbose" in scikit-learn package of Python? In some models like neural network and svm we can set it's value to true. This is the documentation: verbose ...
0
votes
0answers
105 views

Time series forecasting using SVM

I am trying to set up a Python code for forecasting a time series, using SVM libraries of scikit-learn. My data contains $X$ values at a day interval for the last one years, and I need to predict $y$ ...
1
vote
1answer
102 views

Best supervised neural network package for python

What is the best supervised neural network package for python? I found that sci-kit package only have unsupervised neural network.
0
votes
1answer
67 views

GridSearchCV Regression vs Linear Regression vs Stats.model OLS

I am trying to build multiple linear regression model with 3 different method and I am getting different results for each one. I think that I have to get the same results but ...
0
votes
0answers
39 views

Normalize time series data - Wikipedia article counts

I have: 3 wikipedia article access counts (weekly) (A-B-C) Ground truth data (weekly) Total wikipedia english article traffic counts (weekly) My purpose is, build a multiple linear regression ...
1
vote
1answer
114 views

Text analysis : What after term-document matrix?

I am trying to build predictive models from text data. I built document-term matrix from the text data (unigram and bigram) and built different types of models on that (like svm, random forest, ...
0
votes
0answers
22 views

When used for feature selection, does the chi-squared test require the features to be nonnegative?

scikit-learn says chi squared test used for feature selection in classification problems and implemented by sklearn.feature_selection.chi2 requires the feature ...
0
votes
1answer
57 views

Extremly poor polynomial fitting with SVR in sklearn

I try to fit an obvious around degree 5 polynomial function. Much to my despair, sklearn bluntly refuses to match the polynomial, and instead output a 0-degree like ...
0
votes
0answers
21 views

Interpret F values of selected features

I have a dataset that contains wines and their ratings. An entry contains the name of the wine, the grapes used, the year and the rating: 'Chateau Pape', 'Pinot Gris', '1983', 93.4 I'm interested in ...
0
votes
2answers
42 views

Specify fake-numerical categorical feature to Random Forest?

Suppose I have a mixture of some categorical features and numerically continuous features. I would like to train a classifier based on the features by RandomForestClassifier() in SciKi Learn. Random ...
1
vote
0answers
33 views

Manually adjusting (stretching) a random forest regressor model

So I have a random forest model (sklearn) fitted to about 3000 data points. It has a poor OOB score (0.3) but it's not completely surprising due to the data set being social media based. The ...
0
votes
0answers
67 views

What kind of feature selection can Chi square test be used for?

Here I am asking about what others commonly do to use chi squared test for feature selection wrt outcome in supervised learning. If I understand correctly, do they test the independence between ...
3
votes
1answer
46 views

what's the implementation of SciKit-Learn K-Means for empty clusters?

SciKit-Learn's K-Means doesn't discard empty clusters (code of particular function here). Instead, it looks for the pattern that is furthest away from its assigned centroid (assigned cluster but I ...
0
votes
1answer
99 views

Why am I getting 100% accuracy for SVM and Decision Tree (scikit)

I have a dataset with 1175 examples and 21 features which are in the range of [-1, +1], and two class labels 1 and 0. As I read in the most of the resources, it is good to have data in the range of ...
1
vote
1answer
48 views

Choosing right range for data while using scikit-learn

I have a dataset with 1175 examples and 21 features which are in the range of [-1, +1], and two class labels 1 and 0. As I read in the most of the resources, it is good to have data in the range of ...
1
vote
2answers
67 views

Multiple regression/correlation analysis, large dataset:ways, tools [closed]

I've got a large "clean" dataset (800 MB), containing 210k rows and 320 columns. There is 2 discrete string-type columns, others are numeric. One of such numeric columns is selected as depended ...
1
vote
2answers
145 views

Classifer for unbalanced dataset?

Is there any classifer that can natively support unbalanced datasets? Or what best practices you can suggest to handle such datasets? For example I want to solve task called "pedestrian detection" ...
0
votes
0answers
130 views

Obtaining a HOG feature vector for implementation in SVM in Python

I am new to sci-kit learn. I have viewed the online tutorials but they all seem to leverage existing data (e.g., digits, iris, etc). I need the information on how to process images so that they can ...
1
vote
2answers
121 views

Treating missing data in voting pattern analysis

I'm trying to analyze voting patterns of Ukraine's parliament deputies. I scraped all the data on their voting during last session. Each data entry has following information: Deputy name, date, bill ...
0
votes
0answers
32 views

k-fold on dataset

I have been doing a specific check of k-fold technique to see the difference using different number of folds and the corresponding result on the score obtained. To perform this test I have made ...
0
votes
0answers
14 views

How to perform pattern identification using ML?

I have the following problem: An event, takes place at a determined day of the week, hour, and with a pre-defined format (movie, music concert, lecture (3 items). Based on exit polls we determine 3 ...
0
votes
0answers
28 views

What will be the simple interpretation for the coefficients for features obtained in any Machine learning models?

I am working with a data that consists of two classes. I have used scikit learn, to craete models using SVM, Randomforest etc.I used to r2_score and I sorted the scores for features I am having and I ...
2
votes
0answers
28 views

Why does scikit-learn limit the regularization values for its SGD implementation?

The change was made by Olivier Grisel back in 2014 and can be seen here. The first change limits the loss derivatives when they become too big, which makes sense to avoid divergence and numerical ...
2
votes
3answers
119 views

Compare performance of 2 models

I have a dataset which I have split into 3 parts: a training set, a cross-validation set and a test set. I have used the training set and cross-validation set to train 2 models. For this, I have taken ...
0
votes
0answers
38 views

K-cross validation and Naive Bayes

I am doing an exercise of machine learning, and I have built a Gaussian Naive Bayes classifier (i.e., I have defined values of mean and standard deviation) using scikit-learn. Now I am supposed to ...