|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lens.client.LensMLClient
public class LensMLClient
Client side implementation of LensML
| Field Summary |
|---|
| Fields inherited from interface org.apache.lens.ml.LensML |
|---|
NAME |
| Constructor Summary | |
|---|---|
LensMLClient(LensConnectionParams clientConf,
LensSessionHandle sessionHandle)
Instantiates a new lens ml client. |
|
LensMLClient(LensConnectionParams clientConf,
String password)
Instantiates a new lens ml client. |
|
| Method Summary | |
|---|---|
void |
close()
Close connection |
void |
deleteModel(String algorithm,
String modelID)
Permanently delete a model instance. |
void |
deleteTestReport(String algorithm,
String reportID)
Permanently delete a test report instance. |
MLAlgo |
getAlgoForName(String algorithm)
Get a algo object instance which could be used to generate a model of the given algorithm. |
Map<String,String> |
getAlgoParamDescription(String algorithm)
Get user friendly information about parameters accepted by the algorithm. |
List<String> |
getAlgorithms()
Get list of available machine learning algorithms |
MLModel |
getModel(String algorithm,
String modelId)
Get a model instance given the algorithm name and model ID. |
String |
getModelPath(String algorithm,
String modelID)
Get the FS location where model instance is saved. |
List<String> |
getModels(String algorithm)
Get model IDs for the given algorithm. |
LensSessionHandle |
getSessionHandle()
|
MLTestReport |
getTestReport(String algorithm,
String reportID)
Get a test report by ID. |
List<String> |
getTestReports(String algorithm)
Get test reports for an algorithm. |
Object |
predict(String algorithm,
String modelID,
Object[] features)
Online predict call given a model ID, algorithm name and sample feature values. |
MLTestReport |
testModel(LensSessionHandle session,
String table,
String algorithm,
String modelID,
String outputTable)
Evaluate model by running it against test data contained in the given table. |
String |
train(String table,
String algorithm,
String[] args)
Create a model using the given HCatalog table as input. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LensMLClient(LensConnectionParams clientConf,
String password)
clientConf - the client conf
public LensMLClient(LensConnectionParams clientConf,
LensSessionHandle sessionHandle)
clientConf - the client conf| Method Detail |
|---|
public List<String> getAlgorithms()
getAlgorithms in interface LensMLpublic Map<String,String> getAlgoParamDescription(String algorithm)
getAlgoParamDescription in interface LensMLalgorithm - the algorithm
public MLAlgo getAlgoForName(String algorithm)
throws LensException
getAlgoForName in interface LensMLalgorithm - the algorithm
LensException - the lens exception
public String train(String table,
String algorithm,
String[] args)
throws LensException
train in interface LensMLtable - the tablealgorithm - the algorithmargs - the args
LensException - the lens exception
public List<String> getModels(String algorithm)
throws LensException
getModels in interface LensMLalgorithm - the algorithm
LensException - the lens exception
public MLModel getModel(String algorithm,
String modelId)
throws LensException
getModel in interface LensMLalgorithm - the algorithmmodelId - the model id
LensException - the lens exception
public String getModelPath(String algorithm,
String modelID)
getModelPath in interface LensMLalgorithm - the algorithmmodelID - the model id
public MLTestReport testModel(LensSessionHandle session,
String table,
String algorithm,
String modelID,
String outputTable)
throws LensException
testModel in interface LensMLsession - the sessiontable - the tablealgorithm - the algorithmmodelID - the model id
LensException - the lens exception
public List<String> getTestReports(String algorithm)
throws LensException
getTestReports in interface LensMLalgorithm - the algorithm
LensException - the lens exception
public MLTestReport getTestReport(String algorithm,
String reportID)
throws LensException
getTestReport in interface LensMLalgorithm - the algorithmreportID - the report id
LensException - the lens exception
public Object predict(String algorithm,
String modelID,
Object[] features)
throws LensException
predict in interface LensMLalgorithm - the algorithmmodelID - the model idfeatures - the features
LensException - the lens exception
public void deleteModel(String algorithm,
String modelID)
throws LensException
deleteModel in interface LensMLalgorithm - the algorithmmodelID - the model id
LensException - the lens exception
public void deleteTestReport(String algorithm,
String reportID)
throws LensException
deleteTestReport in interface LensMLalgorithm - the algorithmreportID - the report id
LensException - the lens exception
public void close()
throws IOException
close in interface CloseableIOExceptionpublic LensSessionHandle getSessionHandle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||