scala - How to extract the values from ParamMap in spark -
i'm using pipeline , crossvalidator parameter tuning in spark using scala. parammap
containing best set of parameters, don't know how extract values parammap. let's parammap called params, try:
params(new param(????, "maxdepth", "description")
however first argument param
must of type identifiable
, don't know pass. help?
you can first check values in parammap :
params.toseq.foreach(pair => { println(s"${pair.param.parent} ${pair.param.name} ${pair.param.doc}") println(pair.value) })
then retrieve 1 value :
params(new param(parent, name, doc))
actually parent can string (not mandatorily identifiable)
Comments
Post a Comment