-
Notifications
You must be signed in to change notification settings - Fork 30
/
DistADConfig.scala
35 lines (30 loc) · 1.34 KB
/
DistADConfig.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package net.sansa_stack.ml.spark.anomalydetection
import com.typesafe.config.Config
import net.sansa_stack.ml.spark.utils.ConfigResolver
/** This class gets a config file path and reads the values from the config file
* @param path the path of the config file
*/
class DistADConfig(path: String) {
val cfg: Config = new ConfigResolver(path).getConfig()
val silhouetteMethod: Boolean = cfg.getBoolean("silhouetteMethod")
val silhouetteMethodSamplingRate: Double =
cfg.getDouble("silhouetteMethodSamplingRate")
val verbose: Boolean = cfg.getBoolean("verbose")
val writeResultToFile: Boolean = cfg.getBoolean("writeResultToFile")
val clusteringType: String = cfg.getString("clusteringType")
val inputData: String = cfg.getString("inputData")
val resultFilePath: String = cfg.getString("resultFilePath")
val anomalyListSize: Int = cfg.getInt("anomalyListSize")
val anomalyDetectionType: String = cfg.getString("anomalyDetectionType")
val anomalyDetectionAlgorithm: String =
cfg.getString("anomalyDetectionAlgorithm")
val featureExtractor: String = cfg.getString("featureExtractor")
var numberOfClusters: Int = cfg.getInt("numberOfClusters")
/** CONOD
*/
val pairWiseDistanceThreshold: Double =
cfg.getDouble("pairWiseDistanceThreshold")
/** Isolation Forest
*/
var maxSampleForIF: Int = cfg.getInt("maxSampleForIF")
}