Skip to content

Commit

Permalink
Increase number of training images in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Nov 29, 2018
1 parent d870e8e commit 6654cac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
" .setOutputCol(\"images\")) \\\n",
" .mlTransform(BingImageSearch.getUrlTransformer(\"images\", \"urls\")) \\\n",
" .withColumn(\"labels\", lit(name)) \\\n",
" .limit(200)\n"
" .limit(400)\n"
]
},
{
Expand Down Expand Up @@ -169,7 +169,7 @@
" .setOutputCol(\"images\")) \\\n",
" .mlTransform(BingImageSearch.getUrlTransformer(\"images\", \"urls\")) \\\n",
" .withColumn(\"label\", lit(\"other\")) \\\n",
" .limit(200)\n",
" .limit(400)\n",
" \n",
"displayDF(randomLinks)"
]
Expand Down Expand Up @@ -209,7 +209,7 @@
"model = Pipeline(stages=[\n",
" StringIndexer(inputCol = \"labels\", outputCol=\"index\"),\n",
" ImageFeaturizer(inputCol=\"image\", outputCol=\"features\", cutOutputLayers=2).setModel(network),\n",
" LogisticRegression(maxIter=5, labelCol=\"index\", regParam=0.3),\n",
" LogisticRegression(maxIter=5, labelCol=\"index\", regParam=5.0),\n",
" UDFTransformer()\\\n",
" .setUDF(udf(getIndex, DoubleType()))\\\n",
" .setInputCol(\"probability\")\\\n",
Expand Down Expand Up @@ -266,7 +266,7 @@
" .setModelPartitions(50)\\\n",
" .setCellSize(100.0)\\\n",
" .setModifier(50.0)\\\n",
" .setNSamples(200)\n",
" .setNSamples(300)\n",
"\n",
"result = lime.transform(test_subsample)"
]
Expand Down

0 comments on commit 6654cac

Please sign in to comment.