Memuat
Memuat
Logistic Regression with fitglm for Electrical Engineering
0 views
Model insulation failure status as a function of cable age and operating voltage with Logistic Regression with fitglm. fitglm with a binomial distribution builds logistic regression to model the probability of a binary outcome. It suits two-class classification interpreted through odds ratios, such as pass/fail or failure/no failure.

Model insulation failure status as a function of cable age and operating voltage with Logistic Regression with fitglm.
| Role | Variable | Unit |
|---|---|---|
| Main | insulation failure status | - |
| Supporting 1 | cable age | tahun |
| Supporting 2 | operating voltage | kV |
Logistic regression predicts insulation failure status with accuracy 0.829 and AUC 0.909 (sensitivity 0.835, specificity 0.823); each one-unit rise in cable age multiplies the odds by 6.53.
Computed from illustrative synthetic data, not from a real study.
fitglm with a binomial distribution builds logistic regression to model the probability of a binary outcome. It suits two-class classification interpreted through odds ratios, such as pass/fail or failure/no failure.
Report coefficients, odds ratios with confidence intervals, test AUC, and confusion matrix. Choose the classification threshold with a clear reason, not automatically 0.5.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
rng(3);
n = 400;
cable_age = randn(n, 1);
operating_voltage = randn(n, 1);
logit = 1.5*cable_age - 1.0*operating_voltage + 0.2;
insulation_failure_status = double(rand(n, 1) < 1 ./ (1 + exp(-logit)));
tbl = table(cable_age, operating_voltage, insulation_failure_status, 'VariableNames', {'cable_age', 'operating_voltage', 'insulation_failure_status'});
cv = cvpartition(insulation_failure_status, 'HoldOut', 0.25);
trn = tbl(training(cv), :); tst = tbl(test(cv), :);
mdl = fitglm(trn, 'insulation_failure_status ~ cable_age + operating_voltage', 'Distribution', 'binomial');
disp(mdl);
ci = exp(coefCI(mdl));
fprintf('Odds ratios (est, lower, upper):\n');
disp([exp(mdl.Coefficients.Estimate), ci]);
prob = predict(mdl, tst);
pred = prob > 0.5;
cm = confusionmat(tst.insulation_failure_status, double(pred));
disp(cm);
[fpr, tpr, ~, auc] = perfcurve(tst.insulation_failure_status, prob, 1);
fprintf('Accuracy = %.3f, AUC = %.3f\n', mean(pred == tst.insulation_failure_status), auc);
figure; plot(fpr, tpr, 'LineWidth', 1.5); hold on; plot([0 1], [0 1], 'k--');
xlabel('False positive rate'); ylabel('True positive rate'); title(sprintf('ROC (AUC = %.3f)', auc));Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$28
excl. 11% VAT
Duration: 5 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$81
excl. 11% VAT
Duration: 9 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$178
excl. 11% VAT
Duration: 14-17 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Logistic Regression with fitglm is commonly used at this level in Electrical Engineering. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output MATLAB gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$28, Package 2 (your data analysis and interpretation) US$81 and Package 3 (full guidance) US$178, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. MATLAB is a trademark of The MathWorks, Inc.
Back to MATLAB portfolio