Skip to content

Commit c298a2d

Browse files
committed
Add info text
1 parent edcff6b commit c298a2d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/mlClassificationLogisticMultinomial.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ mlClassificationLogisticMultinomial <- function(jaspResults, dataset, options, .
8888
}
8989
if (nlevels(trainingSet[[options[["target"]]]]) == 2) {
9090
family = "binomial"
91-
trainingFit <- glm(formula, data = trainingSet, family = family)
91+
trainingFit <- glm(formula, data = trainingSet, family = stats::binomial(link = "logit"))
9292
# Use the specified model to make predictions for dataset
9393
testPredictions <- .mlClassificationLogisticPredictions(trainingSet, options, predict(trainingFit, newdata = testSet, type = "response"))
9494
dataPredictions <- .mlClassificationLogisticPredictions(trainingSet, options, predict(trainingFit, newdata = dataset, type = "response"))
9595
} else {
9696
family <- "multinomial"
97-
trainingFit <- VGAM::vglm(formula, data = trainingSet, family = family)
97+
trainingFit <- VGAM::vglm(formula, data = trainingSet, family = VGAM::multinomial())
9898
# Use the specified model to make predictions for dataset
9999
testPredictions <- .mlClassificationMultinomialPredictions(trainingSet, options, predict(trainingFit, newdata = testSet))
100100
dataPredictions <- .mlClassificationMultinomialPredictions(trainingSet, options, predict(trainingFit, newdata = dataset))

inst/qml/mlClassificationLogisticMultinomial.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import "./common/analyses/regularized" as REGU
2828

2929
Form
3030
{
31-
info: qsTr("Logistic regression.")
31+
info: qsTr("Logistic regression is a statistical method used to model the relationship between a binary target variable (with two possible outcomes) and one or more feature variables. It predicts the probability of a specific outcome by using a logistic function, which ensures that the predicted probabilities are between 0 and 1. Multinomial regression extends logistic regression to handle target variables with more than two categories. Instead of predicting binary outcomes, multinomial regression is used for scenarios where the target variable has three or more unordered categories.")
3232

3333
UI.VariablesFormClassification { id: vars }
3434

0 commit comments

Comments
 (0)