Skip to content

Commit

Permalink
Updated tutorials for 4.1 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Craigacp authored and jhalexand committed May 26, 2021
1 parent 2f1969b commit a899b90
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 151 deletions.
6 changes: 3 additions & 3 deletions tutorials/anomaly-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"metadata": {},
"outputs": [],
"source": [
"%jars ./tribuo-anomaly-libsvm-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars ./tribuo-anomaly-libsvm-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -110,7 +110,7 @@
"obj = 293.8182352369252, rho = 3.201748862633537\n",
"nSV = 301, nBSV = 120\n",
"\n",
"Training took (00:00:00:115)\n"
"Training took (00:00:00:149)\n"
]
}
],
Expand Down Expand Up @@ -209,7 +209,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "16+14"
"version": "17-ea+22-1964"
}
},
"nbformat": 4,
Expand Down
20 changes: 10 additions & 10 deletions tutorials/clustering-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"metadata": {},
"outputs": [],
"source": [
"%jars ./tribuo-clustering-kmeans-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars ./tribuo-clustering-kmeans-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training with 5 clusters took (00:00:00:049)\n"
"Training with 5 clusters took (00:00:00:102)\n"
]
}
],
Expand Down Expand Up @@ -175,7 +175,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training with 5 clusters took (00:00:00:042)\n"
"Training with 5 clusters took (00:00:00:074)\n"
]
}
],
Expand Down Expand Up @@ -277,8 +277,8 @@
"data": {
"text/plain": [
"Clustering Evaluation\n",
"Normalized MI = 0.8154291916732409\n",
"Adjusted MI = 0.8139169342020223"
"Normalized MI = 0.8154291916732408\n",
"Adjusted MI = 0.8139169342020222"
]
},
"execution_count": 10,
Expand Down Expand Up @@ -347,7 +347,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training with 5 clusters on 4 threads took (00:00:00:038)\n"
"Training with 5 clusters on 4 threads took (00:00:00:062)\n"
]
}
],
Expand Down Expand Up @@ -376,7 +376,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training with 20 clusters on 4 threads took (00:00:00:038)\n"
"Training with 20 clusters on 4 threads took (00:00:00:080)\n"
]
}
],
Expand Down Expand Up @@ -404,8 +404,8 @@
"data": {
"text/plain": [
"Clustering Evaluation\n",
"Normalized MI = 0.8104463467727059\n",
"Adjusted MI = 0.8088941747451209"
"Normalized MI = 0.8104463467727057\n",
"Adjusted MI = 0.8088941747451207"
]
},
"execution_count": 14,
Expand Down Expand Up @@ -478,7 +478,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "16+14"
"version": "17-ea+22-1964"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions tutorials/columnar-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"metadata": {},
"outputs": [],
"source": [
"%jars ./tribuo-classification-experiments-4.1.0-SNAPSHOT-jar-with-dependencies.jar\n",
"%jars ./tribuo-json-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars ./tribuo-classification-experiments-4.1.0-jar-with-dependencies.jar\n",
"%jars ./tribuo-json-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -527,7 +527,7 @@
{
"data": {
"text/plain": [
"Prediction(maxLabel=(BAD,0.9679724514693198),outputScores={BAD=(BAD,0.9679724514693198)GOOD=(GOOD,0.03202754853068015})"
"Prediction(maxLabel=(BAD,0.96797245146932),outputScores={BAD=(BAD,0.96797245146932),GOOD=(GOOD,0.032027548530680135)})"
]
},
"execution_count": 20,
Expand Down Expand Up @@ -568,7 +568,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "16+14"
"version": "17-ea+22-1964"
}
},
"nbformat": 4,
Expand Down
41 changes: 23 additions & 18 deletions tutorials/configuration-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"metadata": {},
"outputs": [],
"source": [
"%jars ./tribuo-classification-experiments-4.1.0-SNAPSHOT-jar-with-dependencies.jar\n",
"%jars ./tribuo-json-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars ./tribuo-classification-experiments-4.1.0-jar-with-dependencies.jar\n",
"%jars ./tribuo-json-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -404,7 +404,7 @@
{
"data": {
"text/plain": [
"XGBoostTrainer(numTrees=10,parameters{colsample_bytree=1.0, silent=1, seed=1, max_depth=4, booster=gbtree, objective=multi:softprob, lambda=1.0, eta=0.5, nthread=6, alpha=1.0, subsample=1.0, gamma=0.1, min_child_weight=1.0})"
"XGBoostTrainer(numTrees=10,parameters{colsample_bytree=1.0, tree_method=auto, seed=1, max_depth=4, booster=gbtree, objective=multi:softprob, lambda=1.0, eta=0.5, nthread=6, alpha=1.0, subsample=1.0, gamma=0.1, min_child_weight=1.0, verbosity=0})"
]
},
"execution_count": 11,
Expand Down Expand Up @@ -487,7 +487,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training logistic regression took (00:00:05:071)\n"
"Training logistic regression took (00:00:03:669)\n"
]
}
],
Expand Down Expand Up @@ -569,8 +569,8 @@
" \"shuffle\" : \"true\",\n",
" \"epochs\" : \"2\",\n",
" \"optimiser\" : \"adagrad-2\",\n",
" \"objective\" : \"logmulticlass-3\",\n",
" \"loggingInterval\" : \"10000\"\n",
" \"loggingInterval\" : \"10000\",\n",
" \"objective\" : \"logmulticlass-3\"\n",
" }\n",
" }, {\n",
" \"name\" : \"adagrad-2\",\n",
Expand Down Expand Up @@ -805,7 +805,7 @@
"\t\t\t\t\t\t\tfeaturesPath = /Users/apocock/Development/Tribuo/tutorials/train-images-idx3-ubyte.gz\n",
"\t\t\t\t\t\t\tfeatures-file-modified-time = 2000-07-21T14:20:24-04:00\n",
"\t\t\t\t\t\t\toutput-resource-hash = 3552534A0A558BBED6AED32B30C495CCA23D567EC52CAC8BE1A0730E8010255C\n",
"\t\t\t\t\t\t\tdatasource-creation-time = 2020-11-02T16:58:33.387902-05:00\n",
"\t\t\t\t\t\t\tdatasource-creation-time = 2021-05-24T12:24:14.958637-04:00\n",
"\t\t\t\t\t\t\toutput-file-modified-time = 2000-07-21T14:20:27-04:00\n",
"\t\t\t\t\t\t\tidx-feature-type = UBYTE\n",
"\t\t\t\t\t\t\tfeatures-resource-hash = 440FCABF73CC546FA21475E81EA370265605F56BE210A4024D2CA8F203523609\n",
Expand All @@ -817,7 +817,7 @@
"\t\t\t\t\tnum-examples = 60000\n",
"\t\t\t\t\tnum-features = 717\n",
"\t\t\t\t\tnum-outputs = 10\n",
"\t\t\t\t\ttribuo-version = 4.1.0-SNAPSHOT\n",
"\t\t\t\t\ttribuo-version = 4.1.0\n",
"\t\t\t\t)\n",
"\t\t\ttrainer = LinearSGDTrainer(\n",
"\t\t\t\t\tclass-name = org.tribuo.classification.sgd.linear.LinearSGDTrainer\n",
Expand All @@ -832,20 +832,24 @@
"\t\t\t\t\t\t\tinitialValue = 0.0\n",
"\t\t\t\t\t\t\thost-short-name = StochasticGradientOptimiser\n",
"\t\t\t\t\t\t)\n",
"\t\t\t\t\tloggingInterval = 10000\n",
"\t\t\t\t\tobjective = LogMulticlass(\n",
"\t\t\t\t\t\t\tclass-name = org.tribuo.classification.sgd.objectives.LogMulticlass\n",
"\t\t\t\t\t\t\thost-short-name = LabelObjective\n",
"\t\t\t\t\t\t)\n",
"\t\t\t\t\tloggingInterval = 10000\n",
"\t\t\t\t\ttribuo-version = 4.1.0\n",
"\t\t\t\t\ttrain-invocation-count = 0\n",
"\t\t\t\t\tis-sequence = false\n",
"\t\t\t\t\thost-short-name = Trainer\n",
"\t\t\t\t)\n",
"\t\t\ttrained-at = 2020-11-02T16:58:40.405866-05:00\n",
"\t\t\ttrained-at = 2021-05-24T12:24:19.604718-04:00\n",
"\t\t\tinstance-values = Map{\n",
"\t\t\t\treconfigured-model=true\n",
"\t\t\t}\n",
"\t\t\ttribuo-version = 4.1.0-SNAPSHOT\n",
"\t\t\ttribuo-version = 4.1.0\n",
"\t\t\tjava-version = 17-ea\n",
"\t\t\tos-name = Mac OS X\n",
"\t\t\tos-arch = x86_64\n",
"\t\t)\n",
"\tdataset-provenance = MutableDataset(\n",
"\t\t\tclass-name = org.tribuo.MutableDataset\n",
Expand All @@ -858,7 +862,7 @@
"\t\t\t\t\tfeaturesPath = /Users/apocock/Development/Tribuo/tutorials/t10k-images-idx3-ubyte.gz\n",
"\t\t\t\t\tfeatures-file-modified-time = 2000-07-21T14:19:56-04:00\n",
"\t\t\t\t\toutput-resource-hash = F7AE60F92E00EC6DEBD23A6088C31DBD2371ECA3FFA0DEFAEFB259924204AEC6\n",
"\t\t\t\t\tdatasource-creation-time = 2020-11-02T16:58:20.304804-05:00\n",
"\t\t\t\t\tdatasource-creation-time = 2021-05-24T12:24:03.396403-04:00\n",
"\t\t\t\t\toutput-file-modified-time = 2000-07-21T14:20:05-04:00\n",
"\t\t\t\t\tidx-feature-type = UBYTE\n",
"\t\t\t\t\tfeatures-resource-hash = 8D422C7B0A1C1C79245A5BCF07FE86E33EEAFEE792B84584AEC276F5A2DBC4E6\n",
Expand All @@ -870,9 +874,9 @@
"\t\t\tnum-examples = 10000\n",
"\t\t\tnum-features = 668\n",
"\t\t\tnum-outputs = 10\n",
"\t\t\ttribuo-version = 4.1.0-SNAPSHOT\n",
"\t\t\ttribuo-version = 4.1.0\n",
"\t\t)\n",
"\ttribuo-version = 4.1.0-SNAPSHOT\n",
"\ttribuo-version = 4.1.0\n",
")\n"
]
}
Expand Down Expand Up @@ -900,7 +904,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training transformed logistic regression took (00:00:09:194)\n"
"Training transformed logistic regression took (00:00:05:252)\n"
]
}
],
Expand Down Expand Up @@ -1018,15 +1022,16 @@
" \"shuffle\" : \"true\",\n",
" \"epochs\" : \"2\",\n",
" \"optimiser\" : \"adagrad-5\",\n",
" \"objective\" : \"logmulticlass-6\",\n",
" \"loggingInterval\" : \"10000\"\n",
" \"loggingInterval\" : \"10000\",\n",
" \"objective\" : \"logmulticlass-6\"\n",
" }\n",
" }, {\n",
" \"name\" : \"transformtrainer-0\",\n",
" \"type\" : \"org.tribuo.transform.TransformTrainer\",\n",
" \"export\" : \"false\",\n",
" \"import\" : \"false\",\n",
" \"properties\" : {\n",
" \"includeImplicitZeroFeatures\" : \"false\",\n",
" \"transformations\" : \"transformationmap-1\",\n",
" \"densify\" : \"false\",\n",
" \"innerTrainer\" : \"linearsgdtrainer-2\"\n",
Expand Down Expand Up @@ -1106,7 +1111,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "16+14"
"version": "17-ea+22-1964"
}
},
"nbformat": 4,
Expand Down
22 changes: 11 additions & 11 deletions tutorials/document-classification-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"metadata": {},
"outputs": [],
"source": [
"%jars ./tribuo-classification-experiments-4.1.0-SNAPSHOT-jar-with-dependencies.jar\n",
"%jars ./tribuo-onnx-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars ./tribuo-classification-experiments-4.1.0-jar-with-dependencies.jar\n",
"%jars ./tribuo-onnx-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -198,7 +198,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on BoW features took (00:00:09:366)\n",
"Training the model on BoW features took (00:00:09:659)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 352 46 110 0.884 0.762 0.819\n",
Expand Down Expand Up @@ -291,7 +291,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on Unigram features took (00:00:09:556)\n",
"Training the model on Unigram features took (00:00:10:529)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 362 36 88 0.910 0.804 0.854\n",
Expand Down Expand Up @@ -381,7 +381,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on Bigram features took (00:00:46:003)\n",
"Training the model on Bigram features took (00:00:41:981)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 331 67 57 0.832 0.853 0.842\n",
Expand Down Expand Up @@ -480,7 +480,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on TF-IDF features took (00:00:41:742)\n",
"Training the model on TF-IDF features took (00:00:42:471)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 350 48 183 0.879 0.657 0.752\n",
Expand Down Expand Up @@ -570,7 +570,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on hashed features took (00:00:23:394)\n",
"Training the model on hashed features took (00:00:24:289)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 306 92 125 0.769 0.710 0.738\n",
Expand Down Expand Up @@ -662,7 +662,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training the model on trimmed TF-IDF features took (00:00:19:872)\n",
"Training the model on trimmed TF-IDF features took (00:00:19:049)\n",
"\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 337 61 93 0.847 0.784 0.814\n",
Expand Down Expand Up @@ -750,7 +750,7 @@
"text": [
"bert training data size = 11314, number of features = 768, number of classes = 20\n",
"bert testing data size = 7532, number of features = 768, number of classes = 20\n",
"Extracting features with BERT took (00:59:31:085)\n"
"Extracting features with BERT took (01:06:52:756)\n"
]
}
],
Expand Down Expand Up @@ -789,7 +789,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training a LR on BERT features took (00:00:06:870)\n",
"Training a LR on BERT features took (00:00:08:960)\n",
"Class n tp fn fp recall prec f1\n",
"soc.religion.christian 398 353 45 111 0.887 0.761 0.819\n",
"rec.autos 396 332 64 99 0.838 0.770 0.803\n",
Expand Down Expand Up @@ -880,7 +880,7 @@
"\t\t\tclass-name = org.tribuo.classification.LabelFactory\n",
"\t\t)\n",
"\tfile-modified-time = 2003-03-18T07:24:55-05:00\n",
"\tdatasource-creation-time = 2021-05-21T10:33:44.926193-04:00\n",
"\tdatasource-creation-time = 2021-05-24T12:46:58.801385-04:00\n",
")\n"
]
}
Expand Down
6 changes: 3 additions & 3 deletions tutorials/external-models-tribuo-v4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"metadata": {},
"outputs": [],
"source": [
"%jars tribuo-classification-experiments-4.1.0-SNAPSHOT-jar-with-dependencies.jar\n",
"%jars tribuo-onnx-4.1.0-SNAPSHOT-jar-with-dependencies.jar"
"%jars tribuo-classification-experiments-4.1.0-jar-with-dependencies.jar\n",
"%jars tribuo-onnx-4.1.0-jar-with-dependencies.jar"
]
},
{
Expand Down Expand Up @@ -469,7 +469,7 @@
"mimetype": "text/x-java-source",
"name": "Java",
"pygments_lexer": "java",
"version": "16+14"
"version": "17-ea+22-1964"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit a899b90

Please sign in to comment.