Stack Exchange Network

Stack Exchange network consists of 174 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

0
votes
1answer
4 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
4 views

R package clogitL1 no longer available?

When I try to install clogitL1 on my work server I get ...
0
votes
0answers
5 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
6 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 ...
0
votes
2answers
41 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?
1
vote
2answers
41 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
13 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
12 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
23 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
11 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, ...
0
votes
0answers
10 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
20 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 ...
0
votes
0answers
18 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
23 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
20 views

GD for logistic regression isn't stable. Why?

Here's my (incomplete) implementation for linear regression using GD: ...
0
votes
0answers
7 views

Newton's method gradient and hessian formulation difficulties

Logistic regression Newton's Method Newton Method Lecture II In this picture the logistic regression cost function , Newtons Method and gradient and Hessian is defined. How to get this function that ...
1
vote
1answer
82 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 ...
1
vote
2answers
53 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
92 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
75 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
27 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
33 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
31 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
15 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
37 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 "...
2
votes
0answers
35 views

Sentiment Analysis Naive Bayes vs Logistic Regression [closed]

I am doing some sentiment analysis on Twitter data, and I wanted to compare a Naive Bayes Classifier and a Logistic Regression classifier as to if their performance is affected by spell checking the ...
0
votes
2answers
41 views

How to learn from time series with multiple values for each time points

A multivariate time-serie has more than one time-dependent variable and it is my case. Still for each time I have not one entrie of dependent variables but many entries, like: ...
0
votes
1answer
12 views

In handwritten digit recognition problem using logistic regression, what changes needed to add another class “Not a Digit”

In handwritten digit recognition problem using logistic regression, normal implementation would forcibly classify even a picture of dog or cat as a digit. To eliminate this, what changes are needed to ...
-1
votes
0answers
23 views

Perceptron on Logistic Regression

I have already did the training for the data but I am not sure how to do the rest. I just need someone to explain how I should proceed? Implement a perceptron for logistric regression. For your ...
3
votes
2answers
67 views

Logistic regression cost function

In Aurelien Geron's book I found this line ...
0
votes
1answer
70 views

Logistic regression from scratch in Python

Here is my logisticRegression class I developed to do gradient descent. There is this one line I marked as problematic ...
0
votes
1answer
41 views

logistic regression score is negative

I am trying to implement logistic regression algorithm. I am using sklearn for this purpose.When I am printing the accuracy its printing negative value. code: ...
0
votes
1answer
28 views

How does combining neurons create non-linear boundaries?

I have been working with NNs for a while, but haven't dug too deep into this unfortunately. By looking at the three neurons below, in each of their boxes we can see that they are really just making ...
1
vote
0answers
29 views

Logistic Regression with Tensorflow

Is this the correct Estimator for Logistic Regression in TF 1.10? There used to be a function called: LogisticRegressor which is deprecated In README.md file it ...
0
votes
2answers
61 views

C++ return array from function

I would like to implement machine learning algorithm in C++ without using any C++ machine learning library. So I'm writing this initializer function for generating zero matrices but can't figure out ...
0
votes
0answers
16 views

How to choose Elastic-Net parameters for feature selection?

I recently came across using elastic nets for feature selection which brings in regularization to temper the sparsity properties of L1 regressions. I would like to learn how to use elastic nets for ...
1
vote
0answers
43 views

comparison of linear Q-learning and DQN

I saw in DQN nature paper 2015 https://www.nature.com/articles/nature14236(Extended Data Table 4) some comparisons between DQN and linear Q-learning. The ratio ...
1
vote
1answer
67 views

Free parameters in logistic regression

When applying logistic regression, one is essentially applying the following function $1/(1 + e^{\beta x})$ to provide a decision boundary, where $\beta$ are a set of parameters that are learned by ...
0
votes
0answers
19 views

Comparing the performance (reward) of dqn and logistic q-learning?

I have tried to compare my DQN results (rewards) with logistci q-learning (omitting the hidden layer, just inputs and outputs with a sigmoid activation function) My rewards of logistic-Q-N is about 5-...
1
vote
2answers
121 views

Logistic Regression Cost Function: Gives mathematical error since its attempting to calculate log(0)

I am learning machine learning and after reading through materials on logistic regression i attempted to implement logistic regression with gradient descent in python from scratch. It works well for ...
1
vote
1answer
270 views

Dealing with NaN (missing) values for Logistic Regression- Best practices?

I am working with a data-set of patient information and trying to calculate the Propensity Score from the data using MATLAB. After removing features with many missing values, I am still left with ...
1
vote
1answer
28 views

best activation function for ensemble?

i have created some logistic regression model (different preprocessing) with softmax function. and i mix all model with an ensemble with a hierarchical method. so the output of all model (base) will ...
1
vote
1answer
38 views

Target data values are not evenly distributed

Data nature: I have features with 10 numeric type, and other 10 categorical, with a lot of values, at the end, using one-hot encoding I got a matrix of 600 columns. My problem is with accuracy ...
2
votes
1answer
334 views

TypeError: object of type 'int' has no len(), LogisticRegression()

I'm trying to fit my Logistic Regression model, but I'm running into an error that I don't understand. Looked around and haven't found a straight answer. Shape of independent features (X): (495,30) ...
1
vote
1answer
69 views

Capturing movement importance - logistic regression output

I'm studying some event for a set of objects that can be plotted on a square $[0, 100] ^ 2$. I have used logistic regression to calculate probabilities that event occur for different objects and the ...
1
vote
1answer
26 views

Why is the logistic regression decision boundary linear in X?

The logistic regression model, \begin{equation} \operatorname{p}(X) = \frac{\operatorname{e}^{\beta_0 + \beta_1 X}}{1 + \operatorname{e}^{\beta_0 + \beta_1 X}} \end{equation} is said to create a ...
1
vote
2answers
88 views

What are the differences between logistic and linear regression?

I know that linear regression does "regression" and logistic regression does "classification". When we implement these two methods, the only difference I could notice is the loss function: linear ...