Skip to content

Commit

Permalink
reconstruct automl framework
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesjjw committed Dec 6, 2018
1 parent 6262f2a commit 2744e62
Show file tree
Hide file tree
Showing 25 changed files with 78 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.tencent.angel.spark.ml.automl.feature

import org.apache.spark.ml.Transformer
import org.apache.spark.ml.param.ParamMap
import org.apache.spark.ml.util.DefaultParamsWritable
import org.apache.spark.sql.{DataFrame, Dataset}
import org.apache.spark.sql.types.StructType

class FeatureCross (override val uid: String)
extends Transformer with DefaultParamsWritable {

override def transform(dataset: Dataset[_]): DataFrame = ???

override def copy(extra: ParamMap): Transformer = ???

override def transformSchema(schema: StructType): StructType = ???

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.tencent.angel.spark.ml.automl.feature

import org.apache.spark.ml.Transformer
import org.apache.spark.ml.param.ParamMap
import org.apache.spark.ml.util.DefaultParamsWritable
import org.apache.spark.sql.{DataFrame, Dataset}
import org.apache.spark.sql.types.StructType

class FeatureSelector (override val uid: String)
extends Transformer with DefaultParamsWritable {

override def transform(dataset: Dataset[_]): DataFrame = ???

override def copy(extra: ParamMap): Transformer = ???

override def transformSchema(schema: StructType): StructType = ???

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.tencent.angel.spark.ml.automl.feature

import org.apache.spark.ml.Transformer
import org.apache.spark.ml.param.ParamMap
import org.apache.spark.ml.util.DefaultParamsWritable
import org.apache.spark.sql.{DataFrame, Dataset}
import org.apache.spark.sql.types.StructType

class PreProcessing (override val uid: String)
extends Transformer with DefaultParamsWritable {

override def transform(dataset: Dataset[_]): DataFrame = ???

override def copy(extra: ParamMap): Transformer = ???

override def transformSchema(schema: StructType): StructType = ???
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
/*
* Tencent is pleased to support the open source community by making Angel available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* https://opensource.org/licenses/Apache-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*
*/


package com.tencent.angel.ml.auto
package com.tencent.angel.spark.ml.automl.tuner

import com.tencent.angel.ml.auto.acquisition.optimizer.{AcqOptimizer, RandomSearch}
import com.tencent.angel.ml.auto.acquisition.{Acquisition, EI}
Expand Down Expand Up @@ -52,4 +34,4 @@ object Example extends App {
sur.stop()
println(s"Best configuration ${result._1.getStorage.getValues.mkString(",")}, best performance: ${result._2}")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.acquisition
package com.tencent.angel.spark.ml.automl.tuner.acquisition

import com.tencent.angel.ml.auto.surrogate.Surrogate
import com.tencent.angel.ml.math2.vector.IntFloatVector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.acquisition
package com.tencent.angel.spark.ml.automl.tuner.acquisition

import com.tencent.angel.ml.auto.surrogate.Surrogate
import com.tencent.angel.ml.math2.storage.IntFloatDenseVectorStorage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.acquisition.optimizer
package com.tencent.angel.spark.ml.automl.tuner.acquisition.optimizer

import com.tencent.angel.ml.auto.acquisition.Acquisition
import com.tencent.angel.ml.auto.config.{Configuration,ConfigurationSpace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.acquisition.optimizer
package com.tencent.angel.spark.ml.automl.tuner.acquisition.optimizer

import com.tencent.angel.ml.auto.acquisition.Acquisition
import com.tencent.angel.ml.auto.config.{Configuration, ConfigurationSpace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.acquisition.optimizer
package com.tencent.angel.spark.ml.automl.tuner.acquisition.optimizer

import com.tencent.angel.ml.auto.acquisition.Acquisition
import com.tencent.angel.ml.auto.config.{Configuration, ConfigurationSpace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.config
package com.tencent.angel.spark.ml.automl.tuner.config

import com.tencent.angel.ml.math2.vector.IntFloatVector

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.config
package com.tencent.angel.spark.ml.automl.tuner.config

import com.tencent.angel.ml.auto.parameter.ParamSpace
import com.tencent.angel.ml.math2.storage.IntFloatDenseVectorStorage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.parameter
package com.tencent.angel.spark.ml.automl.tuner.parameter

import com.tencent.angel.ml.auto.utils.Distribution
import org.apache.commons.logging.{Log, LogFactory}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.parameter
package com.tencent.angel.spark.ml.automl.tuner.parameter

import scala.util.Random

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*/


package com.tencent.angel.ml.auto.parameter

package com.tencent.angel.spark.ml.automl.tuner.parameter

/**
* Base class of a single parameter's search space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.setting
package com.tencent.angel.spark.ml.automl.tuner.setting

class Setting {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.solver
package com.tencent.angel.spark.ml.automl.tuner.solver

import com.tencent.angel.ml.auto.acquisition.Acquisition
import com.tencent.angel.ml.auto.acquisition.optimizer.AcqOptimizer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.solver
package com.tencent.angel.spark.ml.automl.tuner.solver

import com.tencent.angel.ml.auto.config.Configuration
import com.tencent.angel.ml.auto.trail.Trail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/


package com.tencent.angel.ml.auto.surrogate
package com.tencent.angel.spark.ml.automl.tuner.surrogate

import com.tencent.angel.ml.auto.utils.DataUtils
import com.tencent.angel.ml.math2.vector.IntFloatVector
import org.apache.commons.logging.{Log, LogFactory}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.surrogate
package com.tencent.angel.spark.ml.automl.tuner.surrogate

import com.tencent.angel.ml.math2.vector.IntFloatVector
import org.apache.commons.logging.{Log, LogFactory}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.trail
package com.tencent.angel.spark.ml.automl.tuner.trail

import com.tencent.angel.ml.auto.config.Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/


package com.tencent.angel.ml.auto.trail
package com.tencent.angel.spark.ml.automl.tuner.trail

import com.tencent.angel.ml.auto.config.Configuration

class TestTrail extends Trail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.trail
package com.tencent.angel.spark.ml.automl.tuner.trail

import com.tencent.angel.ml.auto.config.Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.trail
package com.tencent.angel.spark.ml.automl.tuner.trail

import java.util.concurrent.Callable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.utils
package com.tencent.angel.spark.ml.automl.utils

import com.tencent.angel.ml.math2.vector.IntFloatVector
import org.apache.spark.mllib.linalg.{Vector, Vectors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/


package com.tencent.angel.ml.auto.utils
package com.tencent.angel.spark.ml.automl.utils

object Distribution extends Enumeration {

Expand Down

0 comments on commit 2744e62

Please sign in to comment.