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

Commit540db83

Browse files
author
minjk-bl
committed
Fix datasets bug - linnerud has multiple targets
1 parentd6e3c8c commit540db83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎js/m_ml/DataSets.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ define([
138138
code.appendFormatLine('{0} = {1}',allocateTo,modelCode);
139139
code.appendLine("# Create DataFrame");
140140
code.appendFormatLine("df_{0} = pd.DataFrame(data={1}.data, columns={2}.feature_names)",allocateTo,allocateTo,allocateTo);
141-
code.appendFormat("df_{0}['target'] = {1}.target",allocateTo,allocateTo);
141+
if(loadType=='load_linnerud'){
142+
code.appendFormat("df_{0}[{1}.target_names] = {2}.target",allocateTo,allocateTo,allocateTo);
143+
}else{
144+
code.appendFormat("df_{0}['target'] = {1}.target",allocateTo,allocateTo);
145+
}
142146
allocateToVar='df_'+allocateTo;
143147
}else{
144148
code.appendFormatLine("_X, _y = {0}",modelCode);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp