Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fe0c6c

Browse files
author
minjk-bl
committed
Added RMSE for Statistics' Regression
1 parentf1ebe04 commit9fe0c6c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

‎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><inputtype="checkbox"id="normTest"class="vp-state"checked><span>Residual Normality test</span></label>
7777
<label><inputtype="checkbox"id="histogram"class="vp-state"checked><span>Residual histogram</span></label>
7878
<label><inputtype="checkbox"id="scatterplot"class="vp-state"checked><span>Residual scatterplot</span></label>
79+
<label><inputtype="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
letcodeList=[];
265266
letcode=newcom_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
letresidualTitle='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)

[8]ページ先頭

©2009-2025 Movatter.jp