Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [logistic-regression]

Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression

2
votes
1answer
155 views

Data prepration for logistic regression : Value either “not available” or a “year”

I have some data of houses that have been renovated. In my data there is one column (among others) that captures this information. It is either "-1" if there has not been yet any renovation, or the ...
2
votes
3answers
38 views

Are support vector machines and logistic regression equivalent if data is linearly separable?

I understand that SVMs separate data drawing an hyperplane with the biggest margin, but doesn't logistic regression do the same thing if data is linearly separable?
1
vote
1answer
12 views

Logitic Regression cost function - what if ln(0)?

I am building logistic regression from scrap. The simplified cost function I am using is (from machine learning course on coursera): in specific case during learning, one observation in training ...
0
votes
1answer
15 views

Train, test and submission files - what am I supposed to do with all of them?

this might be very beginner's question. I'm working on Kaggle's HomeCredit Default Risk problem which has among others dataset train, test and submission files as can be seen in the link provided. The ...
1
vote
1answer
19 views

Do I need to encode the target variable for sklearn logistic regression

I'm trying to get familiar with the sklearn library, and now I'm trying to implement logistic regression for a dataframe containing numerical and categorical values to predict a binary target variable....
0
votes
0answers
7 views

Different time duration (block) for a classification model [closed]

Suppose there are 1-5 set of activities that one can complete and #activities that one complete is a predictor variable for event(1 or 0).This set of activities can be completed during any time of ...
0
votes
1answer
25 views

Deriving new continuous variable out of logistic regression coefficients

I have a set of independent variables X and set of values of dependent variable Y. The task at hand is binary classification, i.e. predict whether debtor will default on his debt (1) or not (0). After ...
0
votes
0answers
32 views

Is this an overfitting?

I'm trying to learn a binary classifier (keras, fully connected NN with 1-4 hidden layers, 16-1024 neurons in each) on pretty skewed dataset of ~130 thousands examples with only ~6% of positives. ...
0
votes
0answers
8 views

Logit Model Gradient Descent for Back Propagation

How can I implement Back Propagation with Logit Model getting an accuracy of 90% need to propagate backward for future predictions. This is my Python Code:: ...
1
vote
1answer
29 views

Metrics for Evaluating Performance of Logistic Regression

I built a Logistic Regression model and I would like to evaluate the performance of the model. I would like to understand its evaluation metrics. What do the metrics Sensitivity, Specificity, False ...
0
votes
1answer
17 views

Use output of K-Mean for Logistics regression

I've created a binary classifier using K Mean, which predicts fraud and legitimate accounts, 0 and 1. This uses two features, let's say, A and B. Now, I want to use other features like C and D, to ...
1
vote
3answers
40 views

Classifier for large number of labels

I have a merchants dataset with 800,000 samples and 18,000 labels. Each sample is associated with a single label and the labels are independent. An example sample looks like ...
0
votes
1answer
24 views

How to convert binary classifier to multiclass classifier?

I am a biggener student in Machine learning, and I want to ask if is it possible to convert a binary classifier label (y) by applying some condition on column1 to get a third situation. I.e. ...
1
vote
3answers
75 views

How do two perceptrons produce different linear decision boundaries?

I'm trying to visualize how two perceptrons converge to two different decision boundaries (which is ultimately used to create the classifier for the non-linearly separable data). Source: https://tdb-...
2
votes
1answer
27 views

Why is my training accuracy decreasing higher degrees of polynomial features?

I am new to Machine Learning and started solving the Titanic Survivor problem on Kaggle. While solving the problem using Logistic Regression I used various models having polynomial features with ...
0
votes
0answers
17 views

logistic like curve fitting using machine learning

I have a set of points of a function k(x). I am trying to do some curve fitting to find the exact k(x) function. It seems that the data points fit to a logistic like curve only a little shifted and ...
2
votes
1answer
12 views

Predicting Intent to do X with a confidence score or intent percentage score?

I have a data set like: did_purchase action_1_30d action_2_20d action_2_10d .... False 10 20 100 True ....etc ...
1
vote
1answer
33 views

How to turn linear regression into logistical regression

I followed these articles to implement logistic regression. I'm confused however because after training the model and getting the weights for my variables I don't now how to use the one-hot vector ...
2
votes
1answer
49 views

Loss Function for Probability Regression

I'm trying to predict a probability with a neural network, but having trouble figuring out which loss function is best. Cross entropy was my first thought, but other resources always talk about it in ...
0
votes
0answers
28 views

Why am I getting such a low precision after performing oversampling and undersampling?

I am performing fraud analysis on credit card fraud committed dataset. I am performing oversampling by .sample(oversampled_class_size) and undersampling by .sample(undersampled_class_size). I am ...
2
votes
1answer
36 views

How to start building a statistical regression analysis model with multiple categorical/discrete input variables of high dimension in Python

I'm fairly new to data science and ML. I have data of an item going through a release process. I have collected data on various variables such as "product category", "product line", "design country", "...
3
votes
1answer
44 views

How many coefficients does the Logistic regression model has as a function of the number of features?

I have built a logistic regression model using Python anaconda and was surprised to see that the number of model coefficients turned out to be proportional to the training sample size i.e. My ...
0
votes
3answers
104 views

when can xgboost or catboost be better then Logistic regression?

I need to improve the prediction result of an algorithm that is already programmed based on logistic regression ( for binary classification). I tried to use XGBoost and CatBoost (with default ...
0
votes
1answer
49 views

Why is logistic regression not sigmoidal?

The blue dots are the raw data and the line is my logistic regression. The line is quite straight and not sigmoidal as I would have expected. I suspect there is something wrong in my gradient descent ...
0
votes
1answer
27 views

Am I justified in dropping this independent variable?

I'm currently doing churn prediction in R and during EDA, I discovered that a variable, say gender, has 1720 males who don't churn, and 280 males who do. Also, it has 864 females who don't churn, and ...
2
votes
1answer
7 views

R package clogitL1 no longer available? [closed]

When I try to install clogitL1 on my work server I get ...
0
votes
0answers
12 views

How to perform T-test and chi square test to my categorical variables like country, education and predict accuracy using logistic regression?

I'm new to Data science. I have been working on a classification project which has columns (Sex, Age, Occupation, Marital Status, education, country, relationship,capital gain, income). Here income('&...
0
votes
0answers
12 views

homogeneity of variance in logistic regression

One of the assumptions of logistic regression states that homogeneity of variance need not be satisfied. Can someone explain the reason for this? I know that homoscedasticity(constant variance around ...
1
vote
2answers
48 views

How do we solve this logistic regression question?

Can an exact answer for this question be found? By intuition, I think the answer is 0. But can someone explain the steps on how to solve this question?
2
votes
2answers
67 views

Logistic regression in python

I have done linear and multivariate regression so I understand what probability, cost and gradient descent functions are. I do not understand what the last 3 formulas mean and how they relate to each ...
0
votes
1answer
40 views

how exp(-z) is working in a sigmoid function in neural networks while z is a matrix?

function g = sigmoid(z) %SIGMOID Compute sigmoid function J = SIGMOID(z) computes the sigmoid of z.% g = 1.0 ./ (1.0 + exp(-z)); end i'm going through andrew ng coursera course i have a doubt ...
0
votes
1answer
26 views

C parameter error in pipeline

I'm trying to build a classifier for my dataset and I'm having an issue with using my gridsearchCV and pipeline together. Here is my code: ...
0
votes
0answers
24 views

Why the outputs of a machine learning model are not sampled at the prediction time?

Let's say there is a dataset D with input X and corresponding output y. Let's assume that <...
1
vote
0answers
19 views

Mini-batches with sequential data

I am a little bit confused. When using mini-batches, it is a good idea to shuffle. This will not work if the training examples are dependent on each other, e.g. 5 minute voltage measurement data, ...
-1
votes
0answers
12 views

Forward Feature Selection in classification generating same training error

Starting Notes - I am very beginner in data science so it may be possible that i will be doing the very basic things in an incorrect way. Preview - I am trying to predict the Survived label for the ...
0
votes
1answer
21 views

How can I use a class variable with many possible values in logistic regression?

I am attempting to build a logistic regression model that determines the probability of an outcome based on a set of independent variables. For context, the data is based on a project in which sales ...
1
vote
0answers
27 views

Multi-Class Classification With Logistic Regression On Binary Data

I am trying to implement a multi-class classifier with using logistic regression. In my dataset, attributes are words, for example first attribute is 1 if the data instance includes word "x" and it is ...
-1
votes
0answers
23 views

Multiple logistic regression curves resulted from ploting a 1-d X against binary y

I was trying to plot a continuous 'X' against a binary y using seaborn from python with the following parameters: ...
1
vote
1answer
25 views

Please help select an Algo based on Accuracy and Confusion Matrix

I am very new to Data Science would appreciate your advice big time. Got a task: predict if a trade will be profitable or not, based on a set of data. I have prepared, cleaned and tested data. ...
0
votes
1answer
27 views

GD for logistic regression isn't stable. Why?

Here's my (incomplete) implementation for linear regression using GD: ...
1
vote
1answer
84 views

A few questions to understand a random forest blog [closed]

I'm trying to understand a nice blog on the trade-off between sensitivity versus specificity with the random forest and logistic regression models. I have a few questions: 1) The blog used a 10 fold ...
2
votes
2answers
208 views

Multi Class Classification on large dataset with over 600 classes

I'm trying to train a text data for multi class classification which comprises of 1 Million rows. After cleaning the data, I'm using a sparse matrix of Word2Vec features (Feature size is 300) The ...
4
votes
2answers
176 views

Why Decision trees performs better than logistic regression [closed]

I'm working on a machine learning project, a classification of (100 x 100) Images (every pixel contains 0 or 255), my training set contains 10000 examples (which I split into 2 parts 80% training/20% ...
1
vote
2answers
98 views

What is the difference between SVM and logistic regression?

While reading the book by Aurelien Geron, I noticed that both logistic regression and SVM predict classes in exactly the same way, so I suspect there must be something that I am missing. In the ...
0
votes
1answer
29 views

classification of small group

I have a dataset with 106K rows, each row contains 391 features. 1K of the rows are labeled as group 1 and all the others as 0. I want to create a model to classify the small group. Is it possible? ...
0
votes
1answer
88 views

Prepare JSON data from sentiment analysis to perform Logistic Regression

I'm new to this field, so very sorry for this basic question. I'm working on a text analysis project using Google's NLP API along with some other APIS. After performing the sentiment analysis I have ...
0
votes
1answer
37 views

Difference between sklearn’s “log_loss” and “LogisticRegression”?

I am a newbie currently learning data science from scratch and I have a rather stupid question to ask. I’m currently learning about binary classification, and I understand that the logistic function ...
2
votes
1answer
16 views

P-value mining on large number of combinations of variables

I really don't know any machine learning, but have a problem that seems like one where I should use some ML algorithm. I am analyzing a medical study with one age-related condition, age, a treatment, ...
0
votes
1answer
61 views

What loss function avoids overconfidence?

In the case of a neural net with a relatively small training data set, doing simple classification with categorical cross entropy (log loss), it is very easy for the results of the network to be "...