org.apache.lens.client
Class LensMLJerseyClient

java.lang.Object
  extended by org.apache.lens.client.LensMLJerseyClient

public class LensMLJerseyClient
extends Object

The Class LensMLJerseyClient.


Field Summary
static String DEFAULT_ML_RESOURCE_PATH
          The Constant DEFAULT_ML_RESOURCE_PATH.
static String LENS_ML_RESOURCE_PATH
          The Constant LENS_ML_RESOURCE_PATH.
static org.apache.commons.logging.Log LOG
          The Constant LOG.
 
Constructor Summary
LensMLJerseyClient(LensConnection connection, LensSessionHandle sessionHandle)
          Instantiates a new lens ml jersey client.
LensMLJerseyClient(LensConnection connection, String password)
          Instantiates a new lens ml jersey client.
 
Method Summary
 void close()
           
 void deleteModel(String algorithm, String modelID)
          Delete model.
 String deleteTestReport(String algorithm, String reportID)
          Delete test report.
 List<String> getAlgoNames()
           
 org.apache.hadoop.conf.Configuration getConf()
           
 ModelMetadata getModelMetadata(String algorithm, String modelID)
          Gets the model metadata.
 List<String> getModelsForAlgorithm(String algorithm)
          Gets the models for algorithm.
 List<String> getParamDescriptionOfAlgo(String algorithm)
          Gets the param description of algo.
 LensSessionHandle getSessionHandle()
           
 TestReport getTestReport(String algorithm, String reportID)
          Gets the test report.
 List<String> getTestReportsOfAlgorithm(String algorithm)
          Gets the test reports of algorithm.
 String predictSingle(String algorithm, String modelID, Map<String,String> features)
          Predict single.
 String testModel(String table, String algorithm, String modelID, String outputTable)
          Test model.
 String trainModel(String algorithm, javax.ws.rs.core.Form params)
          Train model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LENS_ML_RESOURCE_PATH

public static final String LENS_ML_RESOURCE_PATH
The Constant LENS_ML_RESOURCE_PATH.

See Also:
Constant Field Values

DEFAULT_ML_RESOURCE_PATH

public static final String DEFAULT_ML_RESOURCE_PATH
The Constant DEFAULT_ML_RESOURCE_PATH.

See Also:
Constant Field Values

LOG

public static final org.apache.commons.logging.Log LOG
The Constant LOG.

Constructor Detail

LensMLJerseyClient

public LensMLJerseyClient(LensConnection connection,
                          String password)
Instantiates a new lens ml jersey client.

Parameters:
connection - the connection

LensMLJerseyClient

public LensMLJerseyClient(LensConnection connection,
                          LensSessionHandle sessionHandle)
Instantiates a new lens ml jersey client.

Parameters:
connection - the connection
Method Detail

getModelMetadata

public ModelMetadata getModelMetadata(String algorithm,
                                      String modelID)
Gets the model metadata.

Parameters:
algorithm - the algorithm
modelID - the model id
Returns:
the model metadata

deleteModel

public void deleteModel(String algorithm,
                        String modelID)
Delete model.

Parameters:
algorithm - the algorithm
modelID - the model id

getModelsForAlgorithm

public List<String> getModelsForAlgorithm(String algorithm)
Gets the models for algorithm.

Parameters:
algorithm - the algorithm
Returns:
the models for algorithm

getAlgoNames

public List<String> getAlgoNames()

trainModel

public String trainModel(String algorithm,
                         javax.ws.rs.core.Form params)
Train model.

Parameters:
algorithm - the algorithm
params - the params
Returns:
the string

testModel

public String testModel(String table,
                        String algorithm,
                        String modelID,
                        String outputTable)
Test model.

Parameters:
table - the table
algorithm - the algorithm
modelID - the model id
outputTable - the output table name
Returns:
the string

getTestReportsOfAlgorithm

public List<String> getTestReportsOfAlgorithm(String algorithm)
Gets the test reports of algorithm.

Parameters:
algorithm - the algorithm
Returns:
the test reports of algorithm

getTestReport

public TestReport getTestReport(String algorithm,
                                String reportID)
Gets the test report.

Parameters:
algorithm - the algorithm
reportID - the report id
Returns:
the test report

deleteTestReport

public String deleteTestReport(String algorithm,
                               String reportID)
Delete test report.

Parameters:
algorithm - the algorithm
reportID - the report id
Returns:
the string

predictSingle

public String predictSingle(String algorithm,
                            String modelID,
                            Map<String,String> features)
Predict single.

Parameters:
algorithm - the algorithm
modelID - the model id
features - the features
Returns:
the string

getParamDescriptionOfAlgo

public List<String> getParamDescriptionOfAlgo(String algorithm)
Gets the param description of algo.

Parameters:
algorithm - the algorithm
Returns:
the param description of algo

getConf

public org.apache.hadoop.conf.Configuration getConf()

close

public void close()

getSessionHandle

public LensSessionHandle getSessionHandle()


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.