Python is a general purpose programming language designed for ease of use. It is a commonly used platform for machine learning. Use this tag for any *on-topic* question that (a) involves `Python` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `...

learn more… | top users | synonyms

2
votes
0answers
7 views

Model score vs error function value

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

find groups given distance of each element with all the other ones

essentially, I have NxN matrices which contain the distance of each element of a a given matrix NxN against from all the other elements of such matrix. I want to find a way to comb through this ...
1
vote
0answers
28 views

Cheminformatics in R v Python [on hold]

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
86 views

Probability of Birthdays using Python [on hold]

I am very new to coding using python and seem to have hit a wall. This is the full problem I am attempting to answer: Birthdays Suppose you are teaching a freshman class populated with forty ...
0
votes
0answers
16 views

python tensorflow: run on GPU or off-the-shelf dev board [on hold]

Beginner question : Anywhere may find a source code or tutorial, regarding implementing Python & tensorflow codes onto either GPU or dev board such as RaspberryPi ? For example, maybe using a ...
0
votes
0answers
13 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
14 views

How to pre-process data & tune hyperparameters of Doc2Vec?

I am using doc2vec for getting document similarity (unsupervised learning). I read that we need to shuffle the input matrix to doc2vec & reduce the learning rate for better performance. But the ...
0
votes
0answers
46 views

What is the most effective way to get a baseline rating prediction from netflix rating data?

I am doing an assignment where I am working with some of the Netflix Challenge data. I have a database that maps movie ids to customer ratings of that movie and a database of customers mapped to ...
0
votes
0answers
8 views

Grouping target variable into bins of minimal variance for uniformly-observed, seasonal timeseries data

I am looking at a key performance indicator that is measured uniformly over time for which I strongly suspect seasonality. I would like to create groups to identify periods of time where observations ...
1
vote
0answers
29 views

build my own 'pickle' image dataset for CNN training

I am trying to use Python & Tensorflow to make Convolution Neural Network to classify images. I found some examples from the Udacity assignment4 for notMINST image set. Now my question is : I ...
1
vote
0answers
9 views

Theano: is it possible to define a function that takes different form based on the sign of the parameter [closed]

I need to define the following function. Is it possible to do in Theano?
0
votes
0answers
4 views

Cross-validation on XGBClassifier for multiclass classification in python [migrated]

I'm trying to perform cross-validation on a XGBClassifier for a multi-class classification problem using the following code adapted from http://www.analyticsvidhya.com/blog/2016/03/complete-guide-...
0
votes
0answers
18 views

ARFIMA/FARIMA model in Python [closed]

Is there any implementation of an ARFIMA or FARIMA model in Python? I could not find any code or package online yet.
0
votes
0answers
3 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
0
votes
0answers
6 views

Classifier with Feedback in R

In many research talks, I have seen people talking about classifiers that accept human feedback. For example, the classifier will show you an image marked as "forest" and you can give your feedback ...
1
vote
2answers
38 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 ...
1
vote
0answers
25 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 ...
1
vote
1answer
48 views

Different models with gensim Word2Vec on python

I am trying to apply the word2vec model implemented in the library gensim in python. I have a list of sentences (each sentences is a list of words). For instance let us have: ...
0
votes
0answers
34 views

Variable selection in logistic regression model

Imagine a data set with approximately 100 variables and 5000 cases. The outcome is a two-level factor. All variables are factors, most of them three levels (yes, no, or indifferent). After building a ...
1
vote
0answers
26 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
38 views

Doubt on Quantile Regressions in R (quantreg) x Python (statsmodel)

I'm performing some quantile regressions of a response variable (a ranking difference) over 14 predictors that describe each element of our ranking. Initially I succeeded in performing such ...
2
votes
0answers
14 views

Finding Markov Blanket for a dataset in R or Python [closed]

I want to find Markov blanket for a dataset in R or python. The cause- effect relationship for the dataset has not been given. Is there way in R or python such that I can input my dataset and get as ...
1
vote
0answers
21 views

How to implement SMC in Python as it in R? [closed]

Is there any function in Python similar to Squared Multiple Correlation (SMC) in R? What if I want to implement SMC in Python? Is the only way to do it just rewriting SMC into Python line by line? ...
0
votes
0answers
23 views

Implementing Recommender System Ranking Algorithm in Python

I am trying to do collaborative filtering for implicit feedback datasets by following the seminal paper: http://yifanhu.net/PUB/cf.pdf The section on ranking says: I have a matrix of 50K X 9K ...
-1
votes
1answer
54 views
2
votes
1answer
87 views

How to optimise an automatic ARIMA-model selection?

I've been using statsmodels.tsa.arima_model to fit the residual component of some data. I've written an algorithm to automatically select the ARIMA model. Results ...
0
votes
1answer
23 views

scipy.stats.poisson.interval - what confidence interval

What kind of confidence interval does scipy.stats.poisson.interval return? Is it normal approximation? I went on GitHub, but could not look it up in the code. How ...
0
votes
1answer
56 views

XGBoost: how to interpret these results?

I'm using XGBoost package (under Python) on a Kaggle set. I'm running the following code ...
1
vote
0answers
20 views

XGBoost on python : what is wrong with xgb.cv? [migrated]

I'm trying to use xgboost on python here is my code. xgb.train works but i get on error with xgb.cv although it seems i used it the correct way the following works for me ...
0
votes
0answers
13 views

Plotting with fixed effects models in python statsmodels

I've just calculated a fixed effects model in Python: ...
0
votes
0answers
20 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
1answer
34 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
19 views

Removing seasonality when timeseries includes negative or zero values

I am using an x13-arima-seats based solution to remove seasonality and detect data trends. However, many of the series I need to observe trends on contain zero and negative values, which my solution ...
0
votes
0answers
9 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
13 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 ...
0
votes
1answer
32 views

What are the best packages for HMM sequence analysis?

I have a sequence of events and I want to learn discrete probabilities of transitions between them and to predict next item in a sequence. Can you point me on good papers and Python or R package for ...
1
vote
0answers
29 views

Bayesian Data Analysis: Section 3.4 Sampling from the joint posterior distribution Example

For reference: $$ p(\sigma^{2}|y) \propto \tau_n N(\mu_n | \mu_0, \tau_0^{2}) \text{Inv}-\chi^{2}(\nu_0, \sigma^{2}_0) \prod_{i=1}^{n} N(y_i|\mu_n,\sigma^{2}) \tag{3.14} $$ The book states: As ...
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
votes
0answers
34 views

Unexpected result when determining polynomial degree

I'm trying to determinate the best polynomial degree fits my dataset so I coded the follow script using LinearRegression with sklearn ...
0
votes
0answers
23 views

kNN bad performance for iris data set

I've implemented kNN algorithm in Python and now I'am testing it on iris data set. I have two questions. The performance seems to be bad: if I run the program 100 times and then calculate the ...
0
votes
1answer
48 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
27 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
16 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 "...
3
votes
2answers
115 views

Optimize starting parameters for Bayesian Linear Regression?

I'm using PyMC3 in Python 3 and I'm not sure exactly how to optimize my starting parameters. The example uses the regression ...
0
votes
0answers
19 views

Neural Network - Learning accuracy drops heavily after a couple of epochs

I designed a neural network to classify some images into 28 classes. Here are the parameters : Weight Decay : 0.005 Momentum : 0.01 Learning Rate : 0.001 and 0.005 Learning Decay : 1 Input : 100x100 ...
0
votes
0answers
13 views

Critical point in time series and pattern comparison

I have some data from a recent experiment. Two factors, each had 2 levels, resulting in 4 conditions. In each condition there were 12 participants, so 48 participants in total. Each participant ...
1
vote
3answers
19 views

What statistical method should I use to filter out the correct point?

My project is in the field of image processing. The output of a certain program would print the x and y coordinates in the image. I calculate the arithmetic mean of the points to get the mean ...