@@ -379,8 +379,8 @@ define([
379379 code : '${score_allocate} = ${model}.score(${score_featureData}, ${score_targetData})' ,
380380 description : '' ,
381381 options : [
382- { name : 'score_featureData' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X ' } ,
383- { name : 'score_targetData' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y ' } ,
382+ { name : 'score_featureData' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X_train ' } ,
383+ { name : 'score_targetData' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y_train ' } ,
384384 { name : 'score_allocate' , label : 'Allocate to' , component : [ 'input' ] , placeholder : 'New variable' , value : 'scores' }
385385 ]
386386 } ,
@@ -452,7 +452,8 @@ define([
452452 "def plot_feature_importances(model, X_train=None, sort=False):\
453453 \n df_i = create_feature_importances(model, X_train, sort)\
454454 \n\
455- \n df_i['Percentage'].sort_values().plot(kind='barh')\
455+ \n if sort: df_i['Percentage'].sort_values().plot(kind='barh')\
456+ \n else: df_i['Percentage'].plot(kind='barh')\
456457 \n plt.xlabel('Feature importance Percentage')\
457458 \n plt.ylabel('Features')\
458459 \n\
@@ -629,8 +630,8 @@ define([
629630 \nplt.show()" ,
630631 description : '' ,
631632 options : [
632- { name : 'roc_targetData ' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y_test ' } ,
633- { name : 'roc_featureData ' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X_test ' }
633+ { name : 'roc_featureData ' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X_test ' } ,
634+ { name : 'roc_targetData ' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y_test ' }
634635 ]
635636 } ,
636637 'auc' : {
@@ -640,8 +641,8 @@ define([
640641 code : 'metrics.roc_auc_score(${auc_targetData}, ${model}.predict_proba(${auc_featureData})[:, 1])' ,
641642 description : '' ,
642643 options : [
643- { name : 'auc_targetData ' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y_test ' } ,
644- { name : 'auc_featureData ' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X_test ' }
644+ { name : 'auc_featureData ' , label : 'Feature Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'X_test ' } ,
645+ { name : 'auc_targetData ' , label : 'Target Data' , component : [ 'var_select' ] , var_type : [ 'DataFrame' , 'Series' , 'ndarray' , 'list' , 'dict' ] , value : 'y_test ' }
645646 ]
646647 } ,
647648 'permutation_importance' : defaultInfos [ 'permutation_importance' ]
0 commit comments