Machine learning framework for Python.

learn more… | top users | synonyms

0
votes
0answers
9 views

Weekly data normalization - Python

I have a weekly dataset and I have to normalize this data. Data is something like this : ...
0
votes
1answer
16 views

Questions about weather prediction in scikit learn

Hello I am a high school student doing research on weather. I have a dataset that has four columns each labeled with time, pressure, and lat/long. I am confused on the cross validation process. What ...
0
votes
0answers
14 views

How to do ranking with scikit-learn random forest model

I have a training dataset that I've developed, that has the following format: ------------------------------ | User ID | Item | Label | ------------------------------ | 001 | umbrella | 0 ...
-1
votes
1answer
32 views

Prediction on multiple regression - Python

I have 3 list of value and 1 ground truth data. They all belongs to the same time series. My purpose is with 3 list try to forecast the ground truth data. For example : ...
0
votes
4answers
49 views

In practice, why do we convert categorical class labels to integers for classification

This might be a naive question, but I am wondering why we (or maybe it's just me) are converting categorical class labels to integers before we feed them to a classifier in a software package such as ...
0
votes
1answer
26 views

Regression with a kernel

I have a fixed kernel and a set of points. I do SVC with the flavor of SVM classification i'm working on (assume it's just a regular SVM) and i obtain a classifier represented by an explicit vector of ...
0
votes
0answers
30 views

PCA and cross-validation [duplicate]

I am fairly new to the machine learning, and I have been going over all the great posts about cross-validation today and I have a question regarding PCA and cross-validation, I don't have enough ...
0
votes
1answer
29 views

Can you add the probabilities of a classifier to better predict an outcome?

Say I am interested in predicting the TOTAL number of people that survive the titanic disaster, NOT each individual who died. Is it possible to run a probabilistic classifier on the data getting a ...
1
vote
1answer
63 views

Is a negative OOB score possible?

I'm currently implementing scikit-learn's RandomForestRegressor in Python and am scratching my head over why I have occasionally wound up with negative out-of-bag scores from it. As far as I can tell ...
0
votes
1answer
6 views

Anomaly classification probability on Machine Learning

I am using features to predict a dataset classification. I have use the Gradient Boosting Classifier of scikit-learn for the prediction and tune it to reduce the error classification. The error ...
0
votes
0answers
18 views

Normalization of Naive Bayes output

In Scikit-learn documentation it is possible to see that the MultinomialNB estimator has a method called predict-proba in which it has the following description: "Returns the probability of the ...
1
vote
0answers
19 views

A paper that proves using the latent features of RBM as input to logistic regression?

I'm looking for a paper that includes a proof that simply training a Restricted Boltzmann Machine and then using the latent features as input to a logistic regression classifier is a correct thing and ...
1
vote
0answers
18 views

RandomForest - why isn't it predicting well with manually-selected test sets?

I am using python sklearn.ensemble to do a RandomForestClassifier on about 800K rows of data, coupled with sklearn.cross_validation to generate the train/test sets. When it completes, it says on the ...
3
votes
1answer
52 views

Is it possible to seed RANSAC with a given line?

I am analyzing a stream of data and I want to seed every new instance with the best guess output (line) of the previous, so as to eventually converge. Given that Scikit Learn - RANSAC is an iterative ...
0
votes
1answer
20 views

sklearn.tree.export_graphviz values do not add up to samples

When I run tree.export_graphviz() after training a sklearn.ensemble.RandomForestClassifier() on my data, I get some leaf nodes where the samples count doesn't match the value array, like this: ...
1
vote
1answer
14 views

Recommendation Engine With Physical Distance Cutoff

I am looking to develop a recommendation engine for local stores to users. There are approximately 1 million stores in the database and around 1 million users. The 1Mx1M matrix for a user-based ...
0
votes
1answer
29 views

Plot that shows which attribute has the most effect on class?

I'm playing around with two datasets: Mushrooms and Breast Cancer. I'm trying to form a hypothesis of which attribute would have the most effect on the class when making predictions about the class. ...
0
votes
1answer
59 views

LogisticRegression - binary classification, “custom threshold”

I have a binary classification problem that I am trying to solve with sklearn's Logistic Regression. I am aware of the fact that the predict_proba() function is apparently only an approximation of the ...
0
votes
0answers
24 views

Decision function for BernoulliNB classifier. ( for use in plotting ROC and PR curves )

I would like to plot the PR curve using scikit-learn for the Bernoulli Naive Bayes estimator. However, attempting to do so give an error, ...
2
votes
0answers
38 views

Random Forest Probabilistic Prediction vs majority vote

Scikit learn seems to use probabilistic prediction instead of majority vote for the model aggregation technique without an explanation as to why (1.9.2.1. Random Forests). Is there a clear ...
0
votes
1answer
32 views

Tuning alpha parameter in LASSO linear model in scikitlearn

I'm using the LASSO method, in the problem of text classification (sentiment classification). The features I'm using are mainly Ngrams (every N consecutive words) and I'm using the LASSO specifically ...
0
votes
0answers
14 views

DecisionTreeClassifier scikit-learn : knowing the leaf to which an example belongs to

I am currently reading this paper http://quinonero.net/Publications/predicting-clicks-facebook.pdf , where they are using trees to generate feature that are afterwards fed to a linear classifier. My ...
2
votes
2answers
98 views

Output of Scikit SVM in multiclass classification always gives same label

I am currently using Scikit learn with the following code: ...
0
votes
0answers
7 views

Is there a way to get the p-values/standard errors via a function in scikit learn?

Can't seem to figure this out very easily. I am looking for a similar output as that of statsmodels; however, statsmodels doesn't support some of the regressions that I want to do. I basically want ...
0
votes
1answer
12 views

Why do two identical feature vectors (distance score 0) get different labels in DBSCAN?

I have two identical feature vectors. They have a distance score of 0. I perform DBSCAN Clustering (using sci-kit) and they get different labels. Is this expected behaviour?
0
votes
0answers
28 views

Regression Analysis with String values in column of DataFrame

I have a dataset which is having multiple columns where some column has string values with comma seperated ...
0
votes
1answer
21 views

Scikit-learn model representation

Suppose, i have some models created and fitted in scikit-learn. ...
0
votes
0answers
8 views

Grouping team features and comparing them to a single match outcome

I have two teams, and both teams have multiple features related to that team. For example: Players in the team. Players total points won. Team win percentage. Average player weight. Average player ...
0
votes
0answers
75 views

Random Forest Regressor - Incorporating Sample Weights in scikit-learn

I am running randomforestregressor in python. The target variable I am modeling is the frequency of an event occurring per unit of time. Each record in my data includes whether or not the event ...
0
votes
2answers
106 views

Predict interesting articles: increase accuracy

I'm trying to write a gui to display articles, and predict which articles I could like, based on the articles I previously liked. This post is the continuation of this one: ...
1
vote
0answers
40 views

How can I compare GBM feature importances to GBM partial dependence plots?

I am having trouble reconciling the difference between the indicated "importance" from a GBM that I am calculating with what is shown in the partial dependence plots. I would expect higher ...
0
votes
0answers
32 views

Factor Analysis in scikit learn: Many zero loadings

I am trying to apply Factor Analysis to a dataset with about 200 datapoints and 8 variables. When setting the n_components parameter to 8, I get a loading matrix with loadings for three factors that ...
0
votes
0answers
69 views

How to plot a precision-recall curve when doing cross-validation?

I'm using cross-validation to evaluate the performance of a classifier with scikit-learn and I want to plot the Precision-Recall curve. I found an example on ...
1
vote
0answers
54 views

Building a predictive model, regression with a long right tail

I am trying to build a, regressive, predictive model for a target time-series that is heavily skewed. You could think of the target as being like earthquake magnitudes or heavy rainfall. Most of the ...
0
votes
0answers
44 views

Which naive Bayes?

I am attempting to use a naïve Bayes classifier in python (using scikit-learn), with two examples. The first example has 6 classes and 2 hypotheses, the 2nd example has 2 classes and 6 hypotheses. ...
0
votes
0answers
53 views

Make a classification dataset with binary features using scikit-learn

I would like to illustrate a classification algorithm by using this algorithm on a 2-class dataset with binary n-dimensional features. In the past, I have used the scikit function make_classification ...
0
votes
1answer
161 views

How can you print the decision tree of a RandomForestClassifier

Recently, I have noticed that there is a method sklearn.tree.export_graphviz documented here. However, I do not know how I can apply it to a ...
0
votes
0answers
34 views

How do I get a classification report for my cross validated scores using sklean

I am running a logistic regression model using sklearn with 2 classes (1 and 0). Here is my code: ...
0
votes
0answers
34 views

How can I improve my sklearn logistic regression model

My objective is to classify sentences into useful (denote in boolean as 1) and not useful (denote in boolean as 0) categories. I have about 525 features where 300 features are the most frequent and ...
1
vote
1answer
176 views

scikit multi label classification

I am trying to classify data into four different labels. The training data looks something like: ...
3
votes
1answer
161 views

what does the numbers in the classification report of sklearn mean?

I have below an example i pulled from sklearn 's sklearn.metrics.classification_report documentation. What i dont understand is why there are f1-score, precision and recall values for each class ...
1
vote
1answer
39 views

Logistic-Regression: Prior correction at test time

Using sklean.linear_model.LogisticRegression for a binary classification problem. My classes are unbalanced. The positive class comprises about 20% of the training set. When fitting the model I use: ...
0
votes
0answers
53 views

How to scale data to train RBMs?

I know that when training Bernoulli Restricted Boltzmann Machines with real-valued data, then the input data should be scaled to the interval $[0,1]$ (last section from here). What I understood is ...
1
vote
1answer
127 views

Out-Of-Bag estimate in scikit-learn

I am using a bagging model from the Python Scikit-Learn module: ...
0
votes
0answers
174 views

More recognizable Python implementation of Linear Discriminant Analysis?

I have been using scikit-learn's LDA implementation to do some experiments, and recently wanted to test out some modifications to the LDA derivation. I was looking at the Python implementation that ...
1
vote
0answers
35 views

How do I filter insignificant modes from a kernel density estimation

How do I detect the number of significant modes in a set of data? I have a set of 1 dimensional data where the number of modes are unknown. I'm familiar with python and scikit learn so I use the ...
0
votes
0answers
15 views

Dealing with numbers-based categorial data in rf regression: to standardize, or encode?

I'm working with the SEER cancer dataset, and I'm trying to use regression to calculate the months a breast cancer patient can expect to survive given certain variables. Some of these variables are ...
5
votes
1answer
315 views

How to apply a Gaussian radial basis function kernel PCA to nonlinear data?

I have an assignment to implement a Gaussian radial basis function-kernel principal component analysis (RBF-kernel PCA) and have some challenges here. It would be great if someone could point me to ...
0
votes
1answer
41 views

Generating even-sized clusters in scikit-learn [duplicate]

I'm attempting to generate approximately even-sized clusters of a PCA'd feature set in Scikit-learn, but I'm not having any luck. I'm only familiar with KMeans clustering, and with that algorithm the ...
1
vote
0answers
131 views

Naive Bayes and text classification: which probability model and vectorizer combination makes sense?

I am wondering which combinations of Naive models can be paired with different vectorizing methods so that it makes sense. Let's say we have a simple binary spam-classification task. Multinomial ...