Questions tagged [logistic-regression]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

How to know if classification model is predicting 1 or 0

I have used logistic regression to predict whether customer is good(1) or bad(0). I got the accuracy .80 . How do i know whether model predicted 1 or 0 .Is it related to parameter of model1....
0
votes
1answer
25 views

How is vector A converted to single value scalar in Andrew Ng's course?

In Andrew Ng's deep learning course on Coursera, how is a single scalar value obtained from a flattened image (feature vector)? First there is $w.T$ of shape $(1, n_X)$ which is multiplied by $X$ of ...
0
votes
2answers
17 views

calculating the precision and recall for a specific threshhold

I have a logistic regression model in which I calculate the tpr, fpr and thresholds using the roc_curve. After looking at the accuracy rates for different thresholds, I found the most optimal ...
1
vote
1answer
20 views

How to use unigram and bigram as an feature on SVM or logistic regression [closed]

How to use unigram and bigram as an feature to build an Natural Language Inference model on SVM or logistic regression?on my dataset i have premise, hypotesis and label column. I'm planning to use the ...
0
votes
2answers
75 views

How to handle Overfitting

I am working on machine learning classification problem with two classes (0/1). I would like to build a prediction model. The problem is that I have a small dataSet of ...
0
votes
0answers
15 views

Confidence score over xgboost logistic regression

The probabilities of logistic regression indicate how the certain the model is over predictions. if its 0.93 it means the model is 93% confident the label is 1 and 7% to be 0. or if the probability is ...
1
vote
1answer
15 views

Output model from GLM in R

I had generate in Ra logistic model using glm using binomial as family, but each session that I started in R the variable that I used to store the glm output gives me another output. Why this happen? ...
0
votes
1answer
14 views

Logistic Regression Multi-level Independent variables

im trying to study logistic regression, when i did the target variable with all features, i had the summary showing the p-values as usual, but one for the features has 60 level, another feature has 13 ...
2
votes
1answer
20 views

What supervised machine learning model can be used to generate a scorecard-like result?

A scorecard is typically used in Credit Application. One very common model for developing a credit scorecard is logistic regression since it has well-defined probabilities. Apart from logistic ...
0
votes
0answers
11 views

Logistic loss increasing while training with minibatches using the adam algorithm

I am trying to write my own code to use the adam algorithm for logistic regression. I am pretty sure It is training correctly as when I run it I am able to accurately classify a bunch of toy data that ...
3
votes
4answers
69 views

ML: Classification Model Comparison

Given is a dataset that I need to use for a classification and I want to compare the performance of different classification models. Let's assume, I want to look at logistic regression (with ...
0
votes
0answers
22 views

Including spatial spillover for categorical data in R

I did a regression analysis with categorical data with a glm model approach, which worked fine. I have longitude and latitude coordinates for each observation and I ...
1
vote
1answer
56 views

PCA shows overlapping boundaries, then why SVM performs best

I am trying to understand which model might work for a given problem before trying the models, I find this case against my knowledge. Please guide what I am missing. I am new to Data Science. Here is ...
2
votes
1answer
59 views

How does scaling affect Logistic Regression?

I have searched a lot on the web for this question, but I never seem to find a consistent yet straight forward answer. Simply put, the question is: How exactly does scaling affect logistic regression? ...
0
votes
1answer
26 views

Deciding what type of model to use for predicting the bottom decile of student grades

I have a large dataset which includes 36 variables (in %iles) to describe a student, and then the output is the students grades as a %ile. I am trying to predict, using the 36 variables, whether a ...
1
vote
1answer
21 views

How does imblearn apply the transformations during prediction?

Let's say I have a sklearn pipeline that: Imputes the data Randomly oversamples the minority class ...
1
vote
1answer
22 views

Confusion matrix doesn't display properly

I am trying to plot a confusion matrix using the Logistic Regression for a multi-class ...
0
votes
0answers
15 views

Event modelling on aggregated data

I have a data that I want to use in event occurrence modeling, however, data was prepared in a way that I have exposure (can be fractional, eg. half of period) and event occurrence in some groups. It ...
0
votes
1answer
48 views

Logistic regression based prediction model using flask(python) to predict if Student will pass or fail. Error [duplicate]

I am trying to create a web application on Python using Flask that predicts if a student is likely to pass or fail using a Kaggle dataset. I changed the dataset a little and want to predict if the ...
0
votes
1answer
23 views

Text classification analysis based on similarity

I have been reading a lot of literature regarding text classification and different approaches/models, especially using Python language, but probably I am still missing something on how to build the ...
0
votes
2answers
40 views

Logistic regression for classification?

I have a dataset with most columns having Boolean values and categorical values. A sample of it is: ...
1
vote
1answer
38 views

Logistic Regression: Is it viable to use data that is outdated?

TLDR: Want to predict who makes the playoffs (1,0), but there are more playoff spots now than there were in the past, is it okay to use that past data? I want to use binary logistic regression on MLB ...
2
votes
1answer
34 views

Regularization for intercept parameter

Why is the regularization parameter not applied to the intercept parameter? From what I have read about the cost functions for Linear and Logistic regression, the regularization parameter (λ) is ...
0
votes
1answer
13 views

Optimization function returns the same optimal parameters for two labels

I've recently enrolled in the Coursera machine learning, and am working my way through making my own classifier for the Iris dataset problem using matlab. I'm training a classifier for each species (...
0
votes
0answers
11 views

Does Generalised Additive Models handle Multicollinearity out of the box while building a Regression Model in Python

While Building a Generalised Additive Model for Logistic Regression, will the multicollinearity between the predictor variables are taken care of out of the box by the algorithm or do we need to ...
0
votes
0answers
13 views

What is a right way to compare AUCROC between logreg and logregs on segments?

I built a logistic regression on the entire sample (first model), as well as regressions on separate pieces (disjoint) of same sample (set of models). What is the best way to compare the effectiveness ...
0
votes
0answers
7 views

Derivation and formalization of logistic regression

I have been following this tutorial (https://www.geeksforgeeks.org/understanding-logistic-regression/) on Logistic regression. At one point we have these two lines: Then we have the following ...
0
votes
1answer
29 views

Relationship between log-odds and weighted sums in Logistic Regression

I've read several articles/tutorials on Logistic Regression and I've come across this idea of log-odds being equal to the weighted sum of features. i.e. if $p$ is the probability of a sample ...
0
votes
1answer
26 views

Is there a machine learning model suited well for longitudinal data?

I have a fairly large (>100K rows) dataset with multiple (daily) measurements per individual, for a few thousand individuals. The number of measurements per individual vary, and there are many null ...
1
vote
1answer
29 views

Handling Numerical Categorical Column in ML models in Python

When I was exploring the titanic dataset to estimate the probability of a person of surviving using the Logistic Model, I realized there are two ways of handling numerical categorical variables : Use ...
1
vote
1answer
21 views

should we include or exclude a variable in a logistic regression based on the description below?

should we include or exclude a variable in a logit regr. model which will only obtain values if a certain event takes place otherwise will show N/A? this variable tells whether or not a product will ...
7
votes
3answers
167 views

Understanding Classifier performance on text data

I am working on a multi-label text classification problem(Total target labels 90). The data distribution has a long tail and class imbalance and around 1900k records. Currently, I am working on a ...
0
votes
1answer
24 views

Topic Similarity Measure | Multi-class Text Classification Model

I am trying to build a multi class text-classifier that classifies whether the tweet belongs to one of the categories ( Advise or Science or others ) let the input be any tweet like this , Input : <...
0
votes
0answers
7 views

mnlogit coefficient t value

I'm doing multinomial logistic regression with mnlogit in r. I am trying to judge the significance of each variable, but t-value is used in mnlogit. What I know is wald and likelihood ratio statistic,...
1
vote
0answers
13 views

Gradient calculation for proportional odds (logistic) model

I am trying to calculate a gradient for a proportional odds model. http://fa.bianp.net/blog/2013/logistic-ordinal-regression/ What steps are required to take the derivative with respect to w? $$\...
2
votes
2answers
65 views

On simple 1D dataset, LogisticRegressionCV selects terrible hyperparameters, resulting scores are nonsensical

I am trying to use LogisticRegressionCV to fit a logistic regression model to a simple 1D dataset. Very oddly, when given a choice, it seems to select a tiny C value, which forces my model to select a ...
1
vote
2answers
30 views

XGBoost Objective is Changed

I am trying to use XGBoost in python for logistic regression. I am calling it as follows ...
0
votes
0answers
37 views

Linear and logistic regression output with same neural network

it seems like this should be a very common task, but I have not found anything useful on my research: How can I do linear and logistic regression with the same neural network? By example, what I mean ...
1
vote
0answers
16 views

Do I need to adjust frequencies or weights of rows so the right weight is given to each sample (data mining)?

The general problem type is as follows. I have about 2,500 rows of data. Each row contains data about an individual sample with sizes from around 10,000 to 200,000 (a known attribute / column), and ...
1
vote
0answers
24 views

What to do when feature engineering and parameter tuning don't add to the base model performance

I've been working on using LogisticRegression from scikit to try the Titanic Kaggle comp. I've found something interesting, and that is that no amount of feature engineering and paramater tuning is ...
1
vote
0answers
13 views

Two questions on hyper-parameter tuning

Question 1: In the example of logistic regression, I often see the regularization constant and penalty methods being tuned by a grid search. However, it seems like there are a lot more options for ...
1
vote
2answers
31 views

I intend to do classification modelling, but my target variable has only one value

Currently I have a dataset and I am trying to predict whether someone will default on their bank loan. The dataset is quite tricky. It covers those who have defaulted in the past, but is also ...
1
vote
1answer
64 views

improving accuracy of logistic model

I am trying to reproduce results from one paper, where authors minimized the following loss function \begin{align} \min_{w \in R^d} \frac{1}{n} \sum_{i \in [n]} log(1 + exp(-y_ix_i^Tw))+\frac{\lambda}{...
1
vote
1answer
127 views

Recursive Feature Elimination (RFE) with Logistic Regression and little correlation between the features and the target (SKLearn)

I have little experience in the field of Machine Learning, so I apologise in advance for my ignorance and lack of intuitions. I'm trying to build a classifying algorithm to identify if a subject is ...
2
votes
1answer
32 views

Kohen Kappa Coefficient of Naive Bayes with 62% overall accuracy is better than Logistic Regression with 98% accuracy?

I have been trying to evaluate my models used on fire systems dataset with a huge imbalance in the dataset. Most models failed to predict any true positives correctly however naive Bayes managed to do ...
0
votes
2answers
30 views

Why ROC value area under curve of two models is different whereas accuracy, precision, recall, f1-score and confusion matrix is same

I am applying logistic regression and support vector machines on the extacly same dataset with 70% data for training and 30% for test. Both perform exactly the same have the same precision, recall, f1-...
0
votes
1answer
37 views

How to compute Hessian matrix for log-likelihood function for Logistic Regression

I am currently studying the Elements of Statistical Learning book. The following equation is in page 120. It calculates the Hessian matrix for the log-likelihood function as follows \begin{equation} ...
0
votes
0answers
14 views

scaling credit risk scorecard

I need to build a credit risk scorecard using logistic and linear regression. The variables using to predict are all dummies, where each dummy is a bin of some variable. Let's say the variable age, I ...
3
votes
2answers
221 views

What is the best way to find minima in Logistic regression?

In the Andrew NG's tutorial on Machine Learning, he takes the first derivative of the error function then takes small steps in direction of the derivative to find minima. (Gradient Descent basically) ...
0
votes
1answer
28 views

Use all available data to build Logistic Regression model [duplicate]

Using K-Fold, I chose to use Logistic Regression for a project of mine. I made it learn on my X_train (80% of data), and tested it on my X_test, with good results. My question is : now that I need ...

1
2 3 4 5
10