Skip to content

Commit

Permalink
Modified example jupyter notebooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayvinkumar committed Oct 17, 2018
1 parent 3ffb2ea commit 5812c15
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 198 deletions.
23 changes: 5 additions & 18 deletions examples/lgbm/1_lgbm.ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"# <font size = 30>LGBMClassifier → PMML (using Nyoka) </font>\n",
"# LGBMClassifier → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"### <font color=purple> Exporter: LGBMClassifier </font>\n",
"### <font color=purple> Data Set used: Iris, Auto-mpg </font>\n",
"### Exporter: LGBMClassifier \n",
"\n",
"### Data Set used: Iris, Auto-mpg\n",
"\n",
"### <font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**: \n",
"- Build the Pipeline with model using LGBMClassifier\n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### LGBMClassifier Model building (using pipeline) for Iris data set"
]
},
Expand Down Expand Up @@ -78,7 +75,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand All @@ -102,7 +98,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### LGBMRegressor Model building (using pipeline) for Auto-mpg data set"
]
},
Expand Down Expand Up @@ -147,7 +142,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand All @@ -159,13 +153,6 @@
"source": [
"lgb_to_pmml(pipeline_obj,feature_names,target_name,\"lgbmr_pmml.pmml\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
20 changes: 4 additions & 16 deletions examples/lgbm/2_lgbm_With_Scaling.ipynb
Expand Up @@ -4,16 +4,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"<font size = 30>LGBM → PMML (using Nyoka) </font>\n",
"# LGBM → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"<font color=purple> Exporter: LGBM Classifier </font>\n",
"<font color=purple> Data Set used: Iris </font>\n",
"### Exporter: LGBM Classifier\n",
"### Data Set used: Iris \n",
"\n",
"\n",
"<font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"### **STEPS**: \n",
"- Build the Pipeline with preprocessing \n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +19,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Pre-processing, Model building (using pipeline) for Iris data set"
]
},
Expand Down Expand Up @@ -79,7 +75,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand All @@ -97,13 +92,6 @@
"from nyoka import lgb_to_pmml\n",
"lgb_to_pmml(pipeline_obj,features,target,\"lgbmc_pmml_preprocess.pmml\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
21 changes: 5 additions & 16 deletions examples/lgbm/3_lgbm_With_PreProcess .ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"<font size = 30>LGBM → PMML (using Nyoka) </font>\n",
"# LGBM → PMML \n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"<font color=purple> Exporter: LGBMRegressor </font>\n",
"<font color=purple> Data Set used: Auto </font>\n",
"### Exporter: LGBMRegressor\n",
"\n",
"### Data Set used: Auto\n",
"\n",
"<font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**: \n",
"- Build the Pipeline with preprocessing \n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Pre-processing, Model building (using pipeline) for Auto data set"
]
},
Expand Down Expand Up @@ -84,7 +81,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand All @@ -102,13 +98,6 @@
"from nyoka import lgb_to_pmml\n",
"lgb_to_pmml(pipeline_obj,feature_names,target_name,\"lgbmr_pmml_preprocess.pmml\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
25 changes: 6 additions & 19 deletions examples/skl/1_SVM.ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"# <font size = 30>scikit-learn → PMML (using Nyoka) </font>\n",
"# scikit-learn → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"### <font color=purple> Exporter: Support Vector Classifier </font>\n",
"### <font color=purple> Data Set used: Iris </font>\n",
"### Exporter: Support Vector Classifier\n",
"\n",
"### Data Set used: Iris \n",
"\n",
"### <font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**: \n",
"- Build the Pipeline with model using sklearn SVC\n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Model building (using pipeline) for Iris data set"
]
},
Expand Down Expand Up @@ -76,7 +73,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand Down Expand Up @@ -125,15 +121,6 @@
"\n",
"skl_to_pmml(pipeline_obj,features,target,\"svc_pmml.pmml\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -152,7 +139,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.5"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
14 changes: 5 additions & 9 deletions examples/skl/3_RF_With_pre-processing.ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"# <font size = 30>scikit-learn → PMML (using Nyoka) </font>\n",
"# scikit-learn → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"### <font color=purple> Exporter: Random Forest </font>\n",
"### <font color=purple> Data Set used: Iris </font>\n",
"\n",
"### Exporter: Random Forest\n",
"### Data Set used: Iris\n",
"\n",
"### <font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**:\n",
"- Build the Pipeline with preprocessing (using DataFrameMapper)\n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Pre-processing, Model building (using pipeline) for Iris data set"
]
},
Expand Down Expand Up @@ -81,7 +78,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand Down
14 changes: 5 additions & 9 deletions examples/skl/4_GB_With_pre-processing.ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"# <font size = 30>scikit-learn → PMML (using Nyoka) </font>\n",
"# scikit-learn → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"### <font color=purple> Exporter: Gradient Boosting </font>\n",
"### <font color=purple> Data Set used: Titanic </font>\n",
"\n",
"### Exporter: Gradient Boosting\n",
"### Data Set used: Titanic\n",
"\n",
"### <font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**: \n",
"- Build the Pipeline with preprocessing (using DataFrameMapper)\n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Pre-processing, Model building (using pipeline) for Titanic data set"
]
},
Expand Down Expand Up @@ -104,7 +101,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand Down
14 changes: 5 additions & 9 deletions examples/skl/5_Decision_Tree_With_Tf-Idf.ipynb
Expand Up @@ -4,16 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"# <font size = 30>scikit-learn → PMML (using Nyoka) </font>\n",
"# scikit-learn → PMML\n",
"\n",
"<div class=\"alert alert-block alert-success\">\n",
"### <font color=purple> Exporter: Decision Tree Regressor</font>\n",
"### <font color=purple> Data Set used: auto_mpg </font>\n",
"\n",
"### Exporter: Decision Tree Regressor\n",
"### Data Set used: auto_mpg\n",
"\n",
"### <font color=purple>**STEPS**: </font>\n",
"<font color=brown>\n",
"\n",
"### **STEPS**:\n",
"- Build the Pipeline with model and pre-processing (tf-idf vectorizer) using sklearn Decision Tree Regressor\n",
"- Build PMML using Nyoka exporter"
]
Expand All @@ -22,7 +20,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Model building (using pipeline) for Iris data set"
]
},
Expand Down Expand Up @@ -81,7 +78,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"### Export the Pipeline object into PMML using the Nyoka package"
]
},
Expand Down

0 comments on commit 5812c15

Please sign in to comment.