File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1919| 5| 0.1| 0.5| 0.01| 0.5|| 400| 3.97 ~ 3.57| 3.789| na|
2020| 5| 0.1| 0.7| 0.01| 0.7| 0.8| 400| 3.97 ~ 3.57| 3.788| 3.937|
2121| 5| 0.01| 0.7| 0.01| 0.7| 0.8| 400| 3.99 ~ 3.80| 3.741| 3.884|
22- | 5| 0.03 | 0.5| 0.05| 0.7| | 400| 3.99 ~ 3.732 | 3.746 | |
23- | 5| 0.03| 0.5| 0.03 | 0.7| | 500 | | | |
22+ | 5| 0.01 | 0.5| 0.05| 0.7| | 400| 3.99 ~ 3.79 | 3.739 | 3.886 |
23+ | 5| 0.03| 0.5| 0.05 | 0.7| | 400 | 3.99 ~ 3.702 | 3.740 | 3.888 |
2424| 5| 0.1| 1| 0.05| 0.5| 1| 400| 3.97 ~ 3.57| 3.78| na|
2525| 5| 0.5| 1| 0.05| 0.5| 1| 400| 3.89 ~ 3.30| 4.19| na|
2626| 5| 0.05| 1| 0.01| 0.7| 1| 400| 3.98 ~ 3.67 | 3.754 | na|
Original file line number Diff line number Diff line change @@ -205,17 +205,17 @@ object ModelPrediction {
205205 } else if (goal == " Regression" ){
206206 val xgbParam = Map (
207207 " max_depth" -> 5 ,
208- " alpha" -> 0.03f ,
208+ " alpha" -> 0.05f ,
209209 " subsample" -> 0.7 ,
210210 // "colsample_bytree" -> 0.7,
211211 // "min_child_weight" -> 0.5,
212212 " objective" -> " reg:linear" ,
213213 // "top_k" -> "13",
214214 " booster" -> " gbtree" ,
215- " eta" -> 0.03f ,
215+ " eta" -> 0.01f ,
216216 " gamma" -> 0.5 ,
217217 " eval_metric" -> " rmse" ,
218- " num_round" -> 500 )
218+ " num_round" -> 400 )
219219 val xgbReg = new XGBoostRegressor (xgbParam)
220220 .setFeaturesCol(" features" ).setLabelCol(" label" )
221221
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ import org.scalatest.FunSuite
22
33import scala .annotation .tailrec
44import java .io ._
5+
56import com .hyzs .spark .ml .ModelEvaluation ._
67import com .hyzs .spark .utils .BaseUtil
78import com .hyzs .spark .utils .BaseUtil ._
89import org .apache .spark .sql .Row
910
11+ import scala .concurrent .Future
1012import scala .io .Source
1113import scala .util .Random
1214/**
@@ -260,7 +262,13 @@ class ScalaTest extends FunSuite{
260262 println(res)
261263 }
262264
265+ import concurrent .ExecutionContext .Implicits .global
263266 test(" actor test" ){
267+ var i,j = 0
268+ (0 to 10000 ).foreach(_ => Future {i = i + 1 })
269+ (0 to 10000 ).foreach(_ => j = j+ 1 )
270+ Thread .sleep(1000 )
271+ println(s " i: $i, j: $j" )
264272
265273 }
266274
You can’t perform that action at this time.
0 commit comments