What are the inputs to a logistic regression? Probability or trial result?
$begingroup$
It is a very basic question, but cannot find a satisfactory answer to. When we do logistic regression, what are the inputs? Suppose we have a dataset of students giving number of hours each student spent studying, and the end result of whether they passed or failed. The wikipedia article on LR goes to do a fitting with the logistic curve based on probability as a function of number of hours. But how do I get the probabilities if all I have is whether they passed or failed?
machine-learning classification logistic-regression probability
$endgroup$
add a comment |
$begingroup$
It is a very basic question, but cannot find a satisfactory answer to. When we do logistic regression, what are the inputs? Suppose we have a dataset of students giving number of hours each student spent studying, and the end result of whether they passed or failed. The wikipedia article on LR goes to do a fitting with the logistic curve based on probability as a function of number of hours. But how do I get the probabilities if all I have is whether they passed or failed?
machine-learning classification logistic-regression probability
$endgroup$
2
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
1
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10
add a comment |
$begingroup$
It is a very basic question, but cannot find a satisfactory answer to. When we do logistic regression, what are the inputs? Suppose we have a dataset of students giving number of hours each student spent studying, and the end result of whether they passed or failed. The wikipedia article on LR goes to do a fitting with the logistic curve based on probability as a function of number of hours. But how do I get the probabilities if all I have is whether they passed or failed?
machine-learning classification logistic-regression probability
$endgroup$
It is a very basic question, but cannot find a satisfactory answer to. When we do logistic regression, what are the inputs? Suppose we have a dataset of students giving number of hours each student spent studying, and the end result of whether they passed or failed. The wikipedia article on LR goes to do a fitting with the logistic curve based on probability as a function of number of hours. But how do I get the probabilities if all I have is whether they passed or failed?
machine-learning classification logistic-regression probability
machine-learning classification logistic-regression probability
edited Jul 26 '17 at 10:19
Kshitiz
2191211
2191211
asked Jul 26 '17 at 4:14
DellaDella
1245
1245
2
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
1
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10
add a comment |
2
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
1
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10
2
2
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
1
1
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.
The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
$endgroup$
add a comment |
$begingroup$
I think this is your question:
Q1: What to give to logistic regression?
and
Q2: I just want to predict whether a student pass or not, I don't care about anything else?
Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis
and many others.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "557"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f21701%2fwhat-are-the-inputs-to-a-logistic-regression-probability-or-trial-result%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.
The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
$endgroup$
add a comment |
$begingroup$
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.
The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
$endgroup$
add a comment |
$begingroup$
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.
The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
$endgroup$
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.
The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
edited 7 mins ago
answered Jul 26 '17 at 7:27
terenceflowterenceflow
11116
11116
add a comment |
add a comment |
$begingroup$
I think this is your question:
Q1: What to give to logistic regression?
and
Q2: I just want to predict whether a student pass or not, I don't care about anything else?
Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis
and many others.
$endgroup$
add a comment |
$begingroup$
I think this is your question:
Q1: What to give to logistic regression?
and
Q2: I just want to predict whether a student pass or not, I don't care about anything else?
Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis
and many others.
$endgroup$
add a comment |
$begingroup$
I think this is your question:
Q1: What to give to logistic regression?
and
Q2: I just want to predict whether a student pass or not, I don't care about anything else?
Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis
and many others.
$endgroup$
I think this is your question:
Q1: What to give to logistic regression?
and
Q2: I just want to predict whether a student pass or not, I don't care about anything else?
Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis
and many others.
answered Jul 26 '17 at 4:57
SmallChessSmallChess
2,31221122
2,31221122
add a comment |
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f21701%2fwhat-are-the-inputs-to-a-logistic-regression-probability-or-trial-result%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
$endgroup$
– Kshitiz
Jul 26 '17 at 4:59
$begingroup$
@Kshitiz I think you're talking about neural networks.
$endgroup$
– SmallChess
Jul 26 '17 at 8:06
1
$begingroup$
@SmallChess No I am not. Neural Networks make use of the same sigmoid function.
$endgroup$
– Kshitiz
Jul 26 '17 at 8:10