public interface RelevancyModelApi extends ExposedApi
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RELEVANCY_MODEL_NAME
Name for default relevancy model.
|
static String |
NOOP_RELEVANCY_MODEL_NAME
Name for relevancy model that does nothing.
|
Modifier and Type | Method and Description |
---|---|
void |
addFeature(RelevancyFeatureDef feature)
Add a
RelevancyFeatureDef . |
long |
addRelevancyModel(RelevancyModel model)
Create a new relevancy model.
|
void |
deleteFeature(String name)
Delete a
RelevancyFeatureDef with the specified name. |
void |
deleteRelevancyModel(String name,
long version)
Delete a relevancy model.
|
RelevancyModel |
findRelevancyModel(String... query)
Find a relevancy model given a query.
|
RelevancyFeatureDef |
getFeature(String name)
Get a
RelevancyFeatureDef by name . |
Iterable<RelevancyFeatureDef> |
getFeatures()
Get all features.
|
RelevancyModel |
getRelevancyModel(String name,
long version)
Get a specified version of a relevancy model.
|
List<String> |
getRelevancyModelNames()
Returns the names for all available relevancy models.
|
long |
getRelevancyModelPublishTime(String name,
long version)
Returns the time the specified relevancy model was published.
|
List<RelevancyModel> |
getRelevancyModels(String name)
Get all versions available for a relevancy model.
|
boolean |
isFeatureStatic(String name)
Returns
true if feature is statically defined. |
void |
publishRelevancyModel(String name,
long version)
Publish a relevancy model.
|
RelevancyModel |
testRelevancyModel(RelevancyModel model)
Test a relevancy model's accuracy according to stored signal data's expected output.
|
long |
trainRelevancyModel(RelevancyModel model)
Train a relevancy model according to signal data as specified by
model |
void |
updateFeature(RelevancyFeatureDef feature)
Update a
RelevancyFeatureDef . |
void |
updateRelevancyModel(RelevancyModel model)
Update an existing relevancy model.
|
static final String DEFAULT_RELEVANCY_MODEL_NAME
static final String NOOP_RELEVANCY_MODEL_NAME
Iterable<RelevancyFeatureDef> getFeatures()
Order of returned features is undefined. Returned features should not be modified in any way.
RelevancyFeatureDef getFeature(String name)
void addFeature(RelevancyFeatureDef feature)
RelevancyFeatureDef
.IllegalArgumentException
- if feature
is null
.IllegalStateException
- if feature with the same name already exists.void updateFeature(RelevancyFeatureDef feature)
RelevancyFeatureDef
.IllegalArgumentException
- if feature
is null
.IllegalStateException
- if feature
does not exist.IllegalStateException
- if the feature is statically defined.void deleteFeature(String name)
RelevancyFeatureDef
with the specified name.IllegalArgumentException
- if name
is null.IllegalStateException
- if the feature does not exist.IllegalStateException
- if the feature is statically defined.boolean isFeatureStatic(String name)
true
if feature is statically defined.
Statically defined features cannot be updated or deleted.
List<String> getRelevancyModelNames()
RelevancyModel findRelevancyModel(String... query)
Relevancy model names are matched case insensitive.
Returns the first available model specified in query
.
Query strings may include a version component in the format modelName#versionNumber to request a specific version. When version is not specified, the relevancy model returned will be the active version for the requested name.
Returns null
if no matching relevancy model found.
RelevancyModel getRelevancyModel(String name, long version)
Returns null
if relevancy model does not exist.
List<RelevancyModel> getRelevancyModels(String name)
long addRelevancyModel(RelevancyModel model)
Returns the version number for the newly created relevancy model.
void updateRelevancyModel(RelevancyModel model)
Fails if relevancy model does not exist, or if the relevancy model is active.
void deleteRelevancyModel(String name, long version)
Fails if relevancy model does not exist, if the relevancy model's source is RelevancyModel.Source.STATIC
or if the model is active.
long trainRelevancyModel(RelevancyModel model)
model
Returns the version number for the newly created relevancy model.
Relevancy model created will initially have a source of RelevancyModel.Source.TRAINING
. Once training of the relevancy model is
complete, the source will be updated to be RelevancyModel.Source.TRAINED
.
RelevancyModel testRelevancyModel(RelevancyModel model) throws IOException
Computing accuracy may take some time, depending on the volume of signal data being used.
NOTE: model
does not need to be a saved relevancy model.
For instance, you can test the relevancy model prior to adding/updating a model with new weights.
model
- A model to evaluate.IOException
void publishRelevancyModel(String name, long version)
Published relevancy models will be used for matching partial relevancy model names in
getRelevancyModel(String, long)
.
Fails if relevancy model does not exist.
long getRelevancyModelPublishTime(String name, long version)
Returns 0
if the relevancy model is not the published model.
Returns -1
if the model is the published model, but no time is associated with the publication.
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.