Learn R Programming

FeaLect (version 1.20)

compute.logistic.score: Fits a logistic regression model using the linear scores

Description

A logistic regression model is fitted to the linear scores using lrm() function and the logistic scores are computed using the formula: 1/(1+exp(-(a+bX))) where a and b are the logistic coefficients.

Usage

compute.logistic.score(F_, L_, considered.features, training.samples, validating.samples,
			   linear.scores, report.fitting.failure = TRUE)

Arguments

F_

The feature matrix, each column is a feature.

L_

The vector of labels named according to the rows of F.

training.samples

The names of rows of F that should be considered as training samples.

validating.samples

The names of rows of F that should be considered as validating samples.

considered.features

The names of columns of F that determine the features of interest.

linear.scores

A vector that contains for each training or validating sample, a linear score predicted by the linear method.

report.fitting.failure

If TRUE, any failure in fitting the linear of logistic models will be printed.

Value

Returns a list of:

logistic.scores

A vector of predicted logistic values for all samples.

logistic.cofs

The coefficients that are computed by logistic regression.

Details

The logistic regression will be fitted to all training and validating samples.

References

"Statistical Analysis of Overfitting Features", manuscript in preparation.

See Also

FeaLect, train.doctor, doctor.validate, random.subset, compute.balanced,compute.logistic.score, ignore.redundant, input.check.FeaLect

Examples

Run this code
# NOT RUN {
library(FeaLect)
data(mcl_sll)
F <- as.matrix(mcl_sll[ ,-1])	# The Feature matrix
L <- as.numeric(mcl_sll[ ,1])	# The labels
names(L) <- rownames(F)
all.samples <- rownames(F); ts <- all.samples[5:10]; vs <- all.samples[c(1,22)]
L <- L[c(ts,vs)]
L

asymptotic.scores <- c(1,0.9,0.8,0.2,0.1,0.1,0.7,0.2)

compute.logistic.score(F_=F, L_=L, training.samples=ts, validating.samples=vs, 
			     considered.features=colnames(F),linear.scores= asymptotic.scores)

# }

Run the code above in your browser using DataLab