|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lens.ml.spark.algos.BaseSparkAlgo
public abstract class BaseSparkAlgo
The Class BaseSparkAlgo.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG. |
| Constructor Summary | |
|---|---|
BaseSparkAlgo(String name,
String description)
Instantiates a new base spark algo. |
|
| Method Summary | |
|---|---|
void |
configure(LensConf configuration)
Configure. |
Map<String,String> |
getArgUsage()
|
LensConf |
getConf()
|
String |
getDescription()
|
String |
getName()
|
double |
getParamValue(String param,
double defaultVal)
Gets the param value. |
int |
getParamValue(String param,
int defaultVal)
Gets the param value. |
abstract void |
parseAlgoParams(Map<String,String> params)
Parses the algo params. |
void |
parseParams(String[] args)
Parses the params. |
void |
setSparkContext(org.apache.spark.api.java.JavaSparkContext sparkContext)
|
MLModel<?> |
train(LensConf conf,
String db,
String table,
String modelId,
String... params)
Train. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public BaseSparkAlgo(String name,
String description)
name - the namedescription - the description| Method Detail |
|---|
public void setSparkContext(org.apache.spark.api.java.JavaSparkContext sparkContext)
public LensConf getConf()
getConf in interface MLAlgopublic void configure(LensConf configuration)
MLAlgo
configure in interface MLAlgoconfiguration - the configuration
public MLModel<?> train(LensConf conf,
String db,
String table,
String modelId,
String... params)
throws LensException
MLAlgo
train in interface MLAlgoconf - the confdb - the dbtable - the tablemodelId - the model idparams - the params
LensException - the lens exceptionpublic void parseParams(String[] args)
args - the args
public double getParamValue(String param,
double defaultVal)
param - the paramdefaultVal - the default val
public int getParamValue(String param,
int defaultVal)
param - the paramdefaultVal - the default val
public String getName()
getName in interface MLAlgopublic String getDescription()
getDescription in interface MLAlgopublic Map<String,String> getArgUsage()
public abstract void parseAlgoParams(Map<String,String> params)
params - the params
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||