pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/visualpython/visualpython/commit/9fe0c6c0a9391605ec37d3e39a25b3de02100b24

Added RMSE for Statistics' Regression · visualpython/visualpython@9fe0c6c · GitHub
Skip to content

Commit 9fe0c6c

Browse files
author
minjk-bl
committed
Added RMSE for Statistics' Regression
1 parent f1ebe04 commit 9fe0c6c

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

visualpython/html/m_stats/regression.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<label><input type="checkbox" id="normTest" class="vp-state" checked><span>Residual Normality test</span></label>
7777
<label><input type="checkbox" id="histogram" class="vp-state" checked><span>Residual histogram</span></label>
7878
<label><input type="checkbox" id="scatterplot" class="vp-state" checked><span>Residual scatterplot</span></label>
79+
<label><input type="checkbox" id="rmse" class="vp-state" checked><span>RMSE</span></label>
7980
</div>
8081
</div>
8182
</div>

visualpython/js/m_stats/Regression.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ define([
5858
normTest: true,
5959
histogram: true,
6060
scatterplot: true,
61+
rmse: false,
6162
...this.state
6263
};
6364

@@ -259,7 +260,7 @@ define([
259260
// Multi-collinearity
260261
multiCollinearity,
261262
// Residual option
262-
statistics, normTest, histogram, scatterplot
263+
statistics, normTest, histogram, scatterplot, rmse,
263264
} = this.state;
264265
let codeList = [];
265266
let code = new com_String();
@@ -697,7 +698,7 @@ define([
697698
}
698699

699700
// Residual option
700-
if (statistics === true || normTest === true || histogram === true || scatterplot === true) {
701+
if (statistics === true || normTest === true || histogram === true || scatterplot === true || rmse === true) {
701702
let residualTitle = 'Residual'
702703
if (lastModelNum > 0) {
703704
residualTitle += ' - Model ' + lastModelNum;
@@ -768,6 +769,14 @@ define([
768769
code.appendLine(" plt.tight_layout()");
769770
code.append(" plt.show()");
770771
}
772+
if (rmse === true) {
773+
code.appendLine();
774+
code.appendLine();
775+
code.appendLine("# RMSE (Root Mean Squared Error)");
776+
code.appendLine("_rmse = np.sqrt(_result.mse_resid)");
777+
code.appendLine("display(Markdown('### RMSE (Root Mean Squared Error)'))");
778+
code.append("display(Markdown(f'RMSE: {_rmse}'))");
779+
}
771780
}
772781

773782
codeList.push(code.toString());

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy