Constructor and Description |
---|
LensMLClient(LensClient lensClient) |
LensMLClient(LensClientConfig conf,
String password) |
LensMLClient(LensClientConfig conf,
String username,
String password) |
LensMLClient(String password) |
LensMLClient(String username,
String password) |
Modifier and Type | Method and Description |
---|---|
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.
|
public LensMLClient(String password)
public LensMLClient(LensClientConfig conf, String password)
public LensMLClient(LensClientConfig conf, String username, String password)
public LensMLClient(LensClient lensClient)
public List<String> getAlgorithms()
getAlgorithms
in interface LensML
public Map<String,String> getAlgoParamDescription(String algorithm)
getAlgoParamDescription
in interface LensML
algorithm
- the algorithmpublic MLAlgo getAlgoForName(String algorithm) throws LensException
getAlgoForName
in interface LensML
algorithm
- the algorithmLensException
- the lens exceptionpublic String train(String table, String algorithm, String[] args) throws LensException
train
in interface LensML
table
- the tablealgorithm
- the algorithmargs
- the argsLensException
- the lens exceptionpublic List<String> getModels(String algorithm) throws LensException
getModels
in interface LensML
algorithm
- the algorithmLensException
- the lens exceptionpublic MLModel getModel(String algorithm, String modelId) throws LensException
getModel
in interface LensML
algorithm
- the algorithmmodelId
- the model idLensException
- the lens exceptionpublic String getModelPath(String algorithm, String modelID)
getModelPath
in interface LensML
algorithm
- the algorithmmodelID
- the model idpublic MLTestReport testModel(LensSessionHandle session, String table, String algorithm, String modelID, String outputTable) throws LensException
testModel
in interface LensML
session
- the sessiontable
- the tablealgorithm
- the algorithmmodelID
- the model idLensException
- the lens exceptionpublic List<String> getTestReports(String algorithm) throws LensException
getTestReports
in interface LensML
algorithm
- the algorithmLensException
- the lens exceptionpublic MLTestReport getTestReport(String algorithm, String reportID) throws LensException
getTestReport
in interface LensML
algorithm
- the algorithmreportID
- the report idLensException
- the lens exceptionpublic Object predict(String algorithm, String modelID, Object[] features) throws LensException
predict
in interface LensML
algorithm
- the algorithmmodelID
- the model idfeatures
- the featuresLensException
- the lens exceptionpublic void deleteModel(String algorithm, String modelID) throws LensException
deleteModel
in interface LensML
algorithm
- the algorithmmodelID
- the model idLensException
- the lens exceptionpublic void deleteTestReport(String algorithm, String reportID) throws LensException
deleteTestReport
in interface LensML
algorithm
- the algorithmreportID
- the report idLensException
- the lens exceptionpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public LensSessionHandle getSessionHandle()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.