Machine learning framework for Python.

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

How to tune hyperparameters for LLE?

I'm running LLE using Scikit-Learn (with the LocallyLinearEmbedding class), but there are a few hyperparameters and I would like to use grid search with cross-...
1
vote
2answers
23 views

Interpreting multinomial logistic regression in scikit-learn

I am running a multinomial logistic regression for a classification problem involving 6 classes and four features. Here is the code: ...
0
votes
1answer
10 views

Combining two or more (SVC) models in Python/scikit.learn

I have some data which I use SVC models with 10 fold cross validation and a parameter grid search on (scikit.learn). I observed that the predictions of some folds have low accuracy, whereas remained ...
1
vote
1answer
27 views

Score for classification of dataset composed by different class with class imbalance

I am searching for a classification score, preferably provided by Python scikit-learn, to evaluate classification in a cross-validation routine. This classification score must be suitable for: ...
0
votes
0answers
12 views

How to convert a Scikit-learn dataset to a Pandas dataset? [migrated]

How do I convert data from a Scikit-learn Bunch object to a Pandas DataFrame? ...
0
votes
0answers
11 views

How to run a nested LabelKFold with scikit-learn? [closed]

I have a dataset with ~300 points and 32 distinct labels and I want to evaluate a LinearSVR model by plotting its learning curve using grid search and LabelKFold validation. The code I have looks ...
2
votes
0answers
23 views

Model score vs error function value

The model is trained with respect to custom error function. For example: ...
0
votes
0answers
34 views

What is maximum likelihood estimation in logistic regression? [duplicate]

Can you please explain in simple way. Is it so important in logistic regression?
0
votes
0answers
12 views

Problem with syntetic data generating for Probabilistic PCA and Factor Analysis (FA) comparison - methodology

I am trying to understand a short example related to dimension reduction from python scikit-learn.org official documentation for long time and unfortunately I am not successful. I don't have problems ...
1
vote
0answers
41 views

Cheminformatics in R v Python [closed]

I have a process that will produce Cheminformatics models"CM" in R. The process is designed to produce the optimal subspace for a given dataset. It looks like Python will run faster with large ...
0
votes
0answers
11 views

Moving Data From Scikit-Learn to Elki for Clustering [migrated]

I have 100,000 sentences that I've processed into TF-IDF vectors using scikit-learn's TfidfVectorizer with highly customized stopwords and nlp stemming. My goal is ...
0
votes
0answers
15 views

The same input and different output form one-class SVM

I have applied scikit-learn OneClass SVM classifier to isolate the noisy tweets as outliers using one class training set. We use TfidfVectorizer class from sklearn to convert a collection of raw ...
0
votes
0answers
13 views

How can I enforce a cost matrix to a random forest in scikit-learn?

I am reading this paper on using cost-matrix for learning algorithms. I have used a random forest in scikit-learn for a binary classification of fraud/ no fraud events. Once I have fitted a random ...
1
vote
0answers
15 views

Using SKlearn SelectKBest f_classif for categorical values [closed]

I am trying to use SelectKBest f_classif on my data, which is of the following format: each observation is composed of a d-dimensional vector(d different features) and is associated with a label ...
19
votes
5answers
1k views

Overfitting: No silver bullet?

My understanding is that even when following proper cross validation and model selection procedures, overfitting will happen if one searches for a model hard enough, unless one imposes restrictions on ...
0
votes
0answers
15 views

Suspicious value of ks value in text classification problem

I am working on a text classification problem where the data set is highly imbalanced, with only 5 percent positive samples. Total size of the data set is also small at 1300 records. I tried ...
0
votes
0answers
6 views

When should the Pasting ensemble method be used instead of Bagging?

Pasting and Bagging are very similar, the main difference being that Bagging samples with replacement (which is called "bootstrapping") while Pasting samples without replacement. I am guessing that ...
0
votes
0answers
11 views

What is the use of BaggingClassifier's bootstrap_features parameter in Scikit-Learn?

Scikit-Learn's BaggingClassifier class has a hyperparameter called bootstrap_features. If I understand correctly, when it is ...
2
votes
0answers
16 views

Can I optimize for specificity using GridSearchCV in sklearn?

I am developing a fraud detection system for online purchases using random forests. My first concern was to optimize for recall, as the dataset was originally unbalanced (98% no fraud events and 2% ...
0
votes
0answers
4 views

could assigning class_weight = “balanced” give bad performance ?

i used class_weight = "balanced" and it gave me bad result worse than class_weight = None, although the data is unbalanced 1:2, i used it in logistic regression
1
vote
1answer
11 views

Choosing cases for assisted supervised learning

I have a bag of words binary text classification task. The SGD algorithm performed well for a certain target where number of labeled cases for training reached tens of thousands. For another target ...
1
vote
2answers
39 views

Analysising the difference between k-means and spectral clustering algorithm

My target is to cluster the spatial area based on the location(X,Y) and pollutant concentration(Z). So there would be three different attributes along the spatial area(n_sample = grid point) I have ...
0
votes
1answer
33 views

Why is KDE output negative?

As far as I know, PDFs always have positive co-domains, but here is an example of one that outputs negative numbers: http://scikit-learn.org/stable/modules/density.html ...
1
vote
0answers
29 views

Can Random Forest regression handle non-stationary input variables?

I am working on a project where the explanatory variables include soil attributes, land use and land cover properties, stream flow and climate (precipitation, temperature etc) measurements recorded at ...
0
votes
0answers
43 views

Update rule for multi-task lasso used in scikit-learn

The document of scikit-learn said it use coordinate descent for training multi-task lasso. I have tried to derive the update rule but its too hard for me. Can you show me what is update rule for multi-...
1
vote
0answers
29 views

How to calculate the distance in KNN for mixed data types?

when the data is from different types (numerical and categorical) of course euclidean distance alone or hamming distance alone can't help. so i have 2 approaches: standardize all the data with ...
0
votes
0answers
12 views

How to use the dataset for leave-one-ut CV?

I would appreciate some feedback on my leave one out CV procedure, because I am not sure it works correctly. 1.Load the files I am using 26 binary classified articles. Files are shuffled when ...
0
votes
4answers
39 views

Common values used for hyperparameter grid search?

When performing a grid search for exploring optimal hyperparameters, what are the typical values, or ranges, that are commonly used for alpha, epsilon, gamma, lambda, C, etc? I'm not focused on a ...
0
votes
0answers
21 views

Unequal misclassification costs for SVC?

I wonder if there is a way to specify custom cost function in sklearn/python? (atm I use sklearn SVC) My real problem has 7 different classes, but to make it more clear lets assume that I want to ...
0
votes
0answers
14 views

SK Learn with a user defined metric (again)

Someone posted a similar question here but i couldn't get my job done see http://stackoverflow.com/questions/21052509/sklearn-knn-usage-with-a-user-defined-metrgammaic i want to define my ...
0
votes
1answer
31 views

How does alpha relate to C in Scikit-Learn's SGDClassifier?

I'm trying to get the same linear SVM classifier model by using Scikit-Learn's SVC, LinearSVC and ...
0
votes
1answer
40 views

How to cluster an 1-D array by K-means or any other algorithm using scikit-learn? [closed]

I have an one dimensional toy array X. I want to cluster the data into some numbers of clusters.But when I try to fit my data in scikit-learn K-Means function it shows ValueError: n_samples=1 ...
0
votes
0answers
8 views

Getting probability estimates for each observation from cross-fold validation in SKlearn?

Let's say I have a model that I want to retrieve cross-fold validated probability predictions from. I can divide my data set into n folds, leave one fold out, get probability predictions for each ...
0
votes
0answers
10 views

Labelled data labels are changing in sklearn Label Propagation

0 down vote favorite I have some words which have labels of '1' or '0' and '-1' for the words that I don't have labels. And when I run Label Propagation algorithm of sklearn,it is even changing my ...
0
votes
0answers
15 views

Creation of Labels for Label Spreading in skicit-learn

I am using Label Propagation in skicit-learn for finding labels for the unknown ones My Input is 'data_list' containing 400 000 sentences in sanskrit language like : ['tatra yad tad mahABAga SaMkara ...
1
vote
0answers
30 views

Counter intuitive behavior from scikit-learn's SGDClassifier

I am working with SGDClassifier from Python library scikit-learn, a function which implements linear classification with a ...
1
vote
0answers
14 views

Employing cross_validation to to develop a reasonable linear regression model using scikit learn

Situation: I have fifteen years worth of monthly observations of price of a chemical, roughly 190 data-points. I want to develop a simple linear model of this price based on the price of other ...
6
votes
3answers
144 views

Raw data outperforms Z-score transformed data in SVM classification

I've been trying to perform a binary classification using an SVM classifier (scikit-learn's SVC with RBF kernel). I have a sample size of about 100, with about 70 features each. The features are of ...
3
votes
2answers
54 views

Scikit-learn's SGDClassifier code question

I have a question regarding the code of function SGDClassifier, from library scikit-learn, which implements linear ...
1
vote
1answer
22 views

Parameter n_iter in scikit-learn's SGDClassifier

I have a doubt concerning parameter n_iter in function SGDClassifier from scikit-learn. Hereafter is the definition: n_iter :...
0
votes
1answer
49 views

Using Linear Regression on text data

Im trying to create a model that predicts an authors age. Im using (Nguyen et al,2011) as my basis. Using a Bag of Words Model I count the occurences of words per Document (which are Posts from ...
0
votes
1answer
34 views

how to classify short text sentences?

I have a very large dataset that looks like string x this-is-a-nice-sentence 1 hello-my-name-bird 0 yay-this-is-awesome 1 ...
0
votes
0answers
19 views

What does quantile parameter represent in estimate_bandwidth during Mean Shift Clustering?

I was doing Mean Shift clustering in a set of data with Python Scikit learn.We need to estimate bandwidth during Mean shift clustering.But what does the parameter quantile in the function "...
0
votes
0answers
41 views

Scaling the data in a decision tree changed my results?

I know that a decision tree doesn't get affected by scaling the data but when I scale the data within my decision tree it gives me a bad performance (bad recall, precision and accuracy) But when I ...
1
vote
0answers
19 views

Calculating the likehood from the coeficients of logistical regression

I am doing a logistical regression and need to calculate the likehood from the null model and from each feature model and to after that get the p-value.The problem states: a) Create a model that ...
0
votes
0answers
15 views

Swift Client with DecisionTreeRegressor

I am working with bluemix object storage container, What i want to do that i want to store my "RandomForestRegressor" into a pkl file with joblib. But when i run the code with the Swift client i ...
0
votes
0answers
41 views

Probabilistic Graphical Model - Modelling a Bayesian Network on Real Life Data

Recently, I have started studying about Probabilistic Graphical Models (PGMs). While the examples provided in the textbook essentially convey the message of what and how things are happening, I am ...
0
votes
0answers
27 views

Logistic regression - linearity and non linearity

Is logistic regression a linear model which separates the two classes with linear decision boundary? Can we use logistic regression for non linear problems as well? I looked at python sklearn and ...
0
votes
0answers
20 views

Need new strategy for single class classifier

I am attempting to create a single class classifier where the classes are fairly close to balanced (+/- 25). My dataset has ~2,800 samples and ~1,100 features. All of the features are binary except ...
0
votes
0answers
34 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 ...