The HUGIN Web Service API exposes a RESTful HTTP interface for interacting with the HUGIN decision engine. The common HUGIN objects Domains, Nodes, Tables etc. are exposed as resources each with a distinct URL.
All resources (the decision engine entry point, Domains, Nodes, Tables etc.) are exposed over HTTP as URLs formatted using the following convention:
/rest | this is the basic entry point for the HUGIN decision engine (see Rest). |
Resource instances are named using a /rest/{resource-class}/{ID} naming convention, where the class of the resource and its unique instance ID can be extracted from the URL.
/rest/domain/{ID} | DomainResource instances. |
/rest/domain/{ID}/node/{ID} | NodeResource instances (always belongs to a specific DomainResource instance). |
/rest/domain/{ID}/table/{ID} | TableResource instances (always belongs to a specific DomainResource instance). |
/rest/domain/{ID}/model/{ID} | ModelResource instances (always belongs to a specific DomainResource instance). |
/rest/domain/{ID}/clique/{ID} | CliqueResource instances (always belongs to a specific DomainResource instance). |
/rest/domain/{ID}/junctiontree/{ID} | JunctionTreeResource instances (always belongs to a specific DomainResource instance). |
A specific resources class provides a set of functions. To invoke a function one can construct the correct URL by appending the function name to the resource instance URL like this: /rest/{resource-class}/{ID}/function-name
/rest/newDomain | to construct a new domain (Rest -> /newDomain ). |
/rest/domain/{ID}/propagate | to propagate a domain (DomainResource -> /propagate). |
/rest/domain/{ID}/node/{ID}/getName | to get the name of a node (NodeResource -> /getName). |
Functions are invoked using a GET or a POST request. GET requests are used for idempotent functions, POST requests are used for functions that have side effects (that results in a change in the state of the decision engine). For performance considerations, the result of any GET requests should be cached until the next POST request.
Parameters passed to any function are formatted as an URL encoded querystring with a set of one or more anonymous fields and values. The number of fields depends on the number of parameters that the function requires.
GET /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/getNodeByName?=A Response: 200 OK Response Body: /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/node/25c0e5a9-16bd-423b-85a6-fd8e7cf67a45
GET /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/node/25c0e5a9-16bd-423b-85a6-fd8e7cf67a45/getBelief?=1 Response: 200 OK Response Body: 0.25
GET /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/table/7cc8452f-7049-40df-afbb-4760796d99e1/getData?=0&=10 Response: 200 OK Response Body: 0.2 0.5 0.1 0.4 0.6 0.2 0.2 0.3 0.9 0.1
POST /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/propagate Request body: =sum&=normal Response: 200 OK
POST /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/node/25c0e5a9-16bd-423b-85a6-fd8e7cf67a45/selectState Request Body: =0 Response: 200 OK
POST /rest/domain/67ddd8e9-0105-4323-8804-614ada1a7bf4/keepAlive Response: 200 OK
Due to the nature of HTTP based web services, the server may not be notified when a client no longer need a resource. Therefore, the Server Process performs garbage collection of untouched DomainResources at 5 minute intervals. Any DomainResource that has not been touched - that is have had any functions invoked on it or on any of the other resources that it owns - is deleted and the memory reclaimed.
To prevent a DomainResource from being garbage collected during extended periods of time where no functions are invoked, one should regularly invoke the DomainResource -> /keepAlive to inform the garbage collector that the DomainResource as still active.
Resources can be explicitly deleted using the /delete functions (<DomainResource -> /delete>, NodeResource -> /delete, TableResource -> /delete, ModelResource -> /delete).
Errors are communicated using the HTTP status codes.
200 | The operation was completed successfully! |
400 | An error occured, this may be due to a number of things, e.g., pre-conditions for invoking a function was not met, wrong parameters etc. More information about the particular error can be found by inspecting the HTTP response body. |
404 | This means that a resource is not found. Often this is because the URL is wrong or because the resource in question has already been deleted or garbage collected. |
500 | Denotes an internal error. These errors should ideally be impossible, but may happen. If you see a 500 error the HUGIN developers would appreciate a message with a description of the actions that led to the error, related output from the Server Process as well as the HTTP response produced. |
HUGIN Web Service API | The HUGIN Web Service API exposes a RESTful HTTP interface for interacting with the HUGIN decision engine. |
Rest | Main entry point for the HUGIN Web Service API. |
Functions | |
/loadDomain | Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. |
/loadCompileDomain | Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. |
/newDomain | Construct an empty domain. |
/newClassCollection | Construct an empty classcollection. |
/loadClassCollection | Construct a classcollection from a HUGIN Knowledge Base retrieved over HTTP. |
/loadDataSet | Construct a data set from a CSV file retrieved over HTTP. |
/newDataSet | Construct an empty data set. |
/runBatchJSON | Experimental JSON batch feature. |
ClassCollectionResource | ClassResources are grouped into ClassCollectionResources. |
Functions | |
/delete | Deletes this ClassCollectionResource, including all nested HUGIN resources belonging to it (e.g., ClassResources, NodeResources, TableResources etc.) |
/keepAlive | Touch the ClassCollectionResource to mark it as active in periods where no other functions are being called. |
/getClassByName | Returns a ClassResource by name. |
/getMembers | Get all ClassResources of this ClassCollectionResource. |
/save | Submits this ClassCollectionResource in the form of a HKB file to the service located at a target URL. |
/download | Get this ClassCollectionResource in the form of a HKB file. |
/getNewClass | Creates a new ClassResource. |
ClassResource | Instances of the ClassResource represent object-oriented Bayesian networks and LIMIDs. |
Functions | |
/createDBNDomain | Creates a DBN runtime DomainResource from this ClassResource. |
/createDomain | Creates a flat runtime DomainResource from this ClassResource. |
/getNewInstanceNode | Creates a new instance node NodeResource. |
/getClassCollection | Get the ClassCollectionResource to which this ClassResource belongs. |
/getInputs | Get all input NodeResources defined for this ClassResource. |
/getInstances | Get all instance NodeResources that are instances of this ClassResource. |
/getOutputs | Get all output NodeResources defined for this ClassResource. |
/getName | Returns the name of this ClassResource. |
/setName | Sets the name of this ClassResource. |
NetworkModelResource | NetworkModelResource interface is implemented by ClassResource and DomainResource. |
Functions | |
/delete | Deletes this NetworkModelResource, including all nested HUGIN resources belonging to it (e.g., NodeResources, TableResources etc.) |
/getNodeByName | Returns a NodeResource by name. |
/getNewNode | Creates a new NodeResource. |
/getNodes | Get all NodeResources in this NetworkModelResource. |
/generateTables | Generates the conditional probability tables for all nodes of this NetworkModelResource. |
/getAttribute | Returns an attribute value. |
/parseNodes | Parses the file retrieved from an URL and returns a white-space separated list of URI references to NodeResources. |
/setAttribute | Inserts the key/value pair in the attribute list for this NetworkModelResource. |
DomainResource | Instances of the DomainResource represent Bayesian networks and LIMIDs in which you can propagate evidence and calculate updated beliefs and expected utilities. |
Functions | |
/keepAlive | Touch the DomainResource to mark it as active in periods where no other functions are being called. |
/parseCase | Parses a case retrieved from an URL and enters the associated findings into this DomainResource. |
/saveCase | Submits all evidence entered in this DomainResource to the service located at a target URL. |
/save | Submits this DomainResource in the form of a HKB file to the service located at a target URL. |
/download | Get this DomainResource in the form of a HKB file. |
/parseCases | Parses the cases retrieved form an URL and enters the cases into this DomainResource. |
/saveCases | Submits all cases in this DomainResource to the service located at a target URL. |
/propagate | Establishes the specified equilibrium using the evidence mode indicated for incorporation of evidence on all JunctionTrees of this DomainResource. |
/compile | Compiles this DomainResource. |
/adapt | Adapts this DomainResource according to the evidence entered. |
/adaptClassTablesUsingFractionalUpdate | For each discrete node of this DomainResource (which must be a runtime domain) such that both the node and its source node have experience tables, the conditional probability and experience tables of both nodes are learned/updated, and the tables of the domain node will be identical to those of its source node. |
/adaptClassTablesUsingOnlineEM | This function updates (adapts), for all discrete chance nodes of this DomainResource, the experience count (retrieval of experience) and the conditional probability distribution (dissemination of experience) for all parent configurations having a valid experience count. |
/approximate | Removes “near-zero” probabilities from the clique probability tables. |
/cgEvidenceIsPropagated | Check if evidence on CG nodes has been propagated. |
/evidenceIsPropagated | Tests if evidence has been propagated for this DomainResource. |
/evidenceToPropagate | Tests if evidence has been entered since the last propagation. |
/retractFindings | Retracts (all) evidence for all nodes in this DomainResource. |
/getNewModel | Constructs a ModelResource over a NodeResource given a list of NodeResources. |
/getExpectedUtility | Gets the total expected utility associated with this DomainResource. |
/isCompiled | Tests whether this DomainResource is compiled. |
/isTriangulated | Tests whether this DomainResource is triangulated. |
/isTriangulatedForBK | Tests whether this DomainResource has been triangulated for Boyen-Koller approximate inference. |
/initialize | Establishes the initial values for all tables of this DomainResource (which must be compiled). |
/getJunctionTrees | Gets all JunctionTreeResources of this DomainResource. |
/compress | Removes the zero entries from the clique and separator tables of the junction trees in this DomainResource. |
/computeSensitivityData | Computes the constants of the sensitivity functions for the specified output probabilities and all CPT parameters in the network. |
/getLogLikelihood | Computes the log-likelihood of the case data. |
/getLogLikelihoodTolerance | Returns the log-likelihood tolerance for this DomainResource. |
/getLogNormalizationConstant | Returns the log of the normalization constant. |
/getMAPConfiguration | Returns a MAP configuration. |
/getMarginal | Computes the marginal distribution for the nodes provided as argument with respect to the (imaginary) joint potential, determined by the current potentials on the junction tree(s) of this DomainResource. |
/getMaxNumberOfEMIterations | Returns the maximum number of iterations allowed for the EM algorithm. |
/getMaxNumberOfSeparators | Returns the maximum number of separators allowed when using the total weight triangulation method. |
/getNormalDeviate | Use the pseudo-random number generator for this DomainResource to sample a real number from a normal (aka Gaussian) distribution. |
/getNormalizationConstant | Retrieves the normalization constant for the most recent propagation. |
/getNumberOfCases | Returns the number of data cases. |
/getNumberOfMAPConfigurations | Returns the number of MAP configurations. |
/getProbabilityOfMAPConfiguration | Returns the probability of a MAP configuration. |
/getSensitivitySet | Returns the sensitivity set computed by the most recent call to DomainResource -> /computeSensitivityData. |
/getSignificanceLevel | Returns the significance level of the dependency tests performed during structure learning using the PC-algorithm. |
/getUniformDeviate | Use the pseudo-random number generator for this DomainResource to sample a real number from the uniform distribution over the interval [0,1). |
/enterCase | Enters a case as evidence. |
/equilibriumIs | Tests the Equilibrium type. |
/isCompressed | Tests whether this DomainResource is compressed. |
/evidenceModeIs | Tests for evidence mode. |
/learnStructure | Learns the structure (graph) of the Bayesian network from data using the PC algorithm. |
/learnTables | Learns the conditional probability tables from data using the EM algorithm. |
/likelihoodIsPropagated | Returns true if likelihood has been propagated for this DomainResource; otherwise, returns false. |
/newCase | Creates a new case. |
/findMAPConfigurations | Finds all configurations of nodes with probability at least {minprobability}. |
/getAIC | Computes the AIC score (Akaike’s Information Criterion) of the case data. |
/getApproximationConstant | Returns the approximation constant. |
/getBIC | Computes the BIC score (Bayesian Information Criterion) of the case data. |
/getCaseCount | Returns case count for a case. |
/getConflict | Returns the conflict value. |
/getDConnectedNodes | Performs a d-separation test and returns a list of d-connected nodes. |
/getDSeparatedNodes | Performs a d-separation test and returns a list of d-separated nodes. |
/getEliminationOrder | Returns the triangulation order. |
/resetInferenceEngine | Establishes the initial state of the inference engine, which is sum-equilibrium with no evidence incorporated. |
/saveToMemory | Creates a copy in memory of the belief and junction tree tables of this DomainResource. |
/seedRandom | Seeds the pseudo-random number generator for this DomainResource. |
/setCaseCount | Sets case count for a case. |
/setLogLikelihoodTolerance | Sets the log-likelihood tolerance for this DomainResource. |
/setMaxNumberOfEMIterations | Sets the maximum number of iterations allowed for the EM algorithm. |
/setMaxNumberOfSeparators | Sets the maximum number of separators allowed when using the total weight triangulation method. |
/setNumberOfCases | Sets the number of cases. |
/setSignificanceLevel | Sets the significance level of the dependency tests performed during structure learning using the PC-algorithm. |
/simulate | Generates a sample configuration from the joint distribution represented by this DomainResource. |
/batchSimulate | Generates a number of sample configurations by invoking DomainResource -> /simulate a number of times and for each iteration recording the results of NodeResource -> /getSampledValue , NodeResource -> /getSampledState or NodeResource -> /getSampledUtility for specified NodeResources. |
/tablesToPropagate | Tests for new node tables. |
/triangulate | Triangulates the graph of this DomainResource using the default triangulation method. |
/triangulateWithMethod | Triangulates the graph of this DomainResource using the specified triangulation method. |
/computeDBNPredictions | Computes predictions for {numberOfTimePoints} time slices beyond the current time window. |
/getDBNWindowOffset | Returns the total number of time steps that the time window of this DBN runtime domain has been moved. |
/initializeDBNWindow | Moves the time window of this DBN back to its initial position, and removes all evidence. |
/moveDBNWindow | Slides the time window of this DBN delta steps into the future. |
/triangulateDBN | Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used. |
/triangulateDBNForBK | Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used. |
/uncompile | Uncompiles this DomainResource. |
/updatePolicies | Updates the policy tables of the domain. |
/getExplanation | Returns the evidence subset associated with the explanation of rank index computed by the most recent call to NodeResource -> /computeExplanationData. |
/getExplanationScore | Returns the score of the specified explanation. |
/getNumberOfExplanations | Returns the number of explanations. |
/addCases | Adds the specified range of rows of the data set to this DomainResource as cases. |
NodeResource | Nodes are one of the fundamental objects used in the construction of Bayesian networks and LIMIDs. |
Functions | |
/delete | Deletes this NodeResource. |
/getModel | Gets the ModelResource for this NodeResource. |
/getName | Returns the name of this NodeResource. |
/setName | Sets the name of this NodeResource. |
/getPositionX | Returns the position of this NodeResource on the X-axis. |
/getPositionY | Returns the position of this NodeResource on the Y-axis. |
/setPosition | Sets the position of this NodeResource. |
/setNumberOfStates | Sets the number of states of this NodeResource. |
/getNumberOfStates | Get the number of states of this discrete node. |
/setStateLabel | Sets the label of the specified state. |
/getStateLabel | Gets the label of the specified state. |
/getTable | Gets the TableResource associated with this NodeResource. |
/getBelief | Gets the belief for the specified state of this NodeResource. |
/getPredictedBelief | Returns the predicted belief for the specified state of this discrete NodeResource at the specified time point. |
/getParents | Get list of parent nodes for this NodeResource. |
/getChildren | Get list of child nodes for this NodeResource. |
/addParent | Adds a NodeResource as a new parent of this NodeResource. |
/selectState | Selects the specified state of this NodeResource. |
/getSelectedState | Gets (the index of) the selected state of this node. |
/retractFindings | Retracts all findings for this NodeResource. |
/getExpectedUtility | Gets the expected utility associated with this utility node or specified action of this discrete decision node. |
/getSampledUtility | Returns the sampled utility associated with this utility node. |
/getValue | Gets the value of this FunctionNode. |
/getPredictedValue | Gets the predicted value of this FunctionNode at the specified time point. |
/setValue | Sets the function associated with this function node to a number value. |
/evidenceIsEntered | Test if the evidence potential, currently registered with this NodeResource, is non-vacuous. |
/getStateIndex | Get the index of the state matching the specified value. |
/getStateValue | Gets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. |
/setStateValue | Sets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. |
/enterValue | Enters evidence (observation of the value) for this continuous chance node. |
/getEnteredValue | Returns the evidence (value) entered for this continuous chance node. |
/evidenceIsPropagated | Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is non-vacuous; otherwise, returns false. |
/evidenceToPropagate | Returns true if the entered and the propagated evidence differ; otherwise, returns false. |
/getAttribute | Returns an attribute value. |
/getCategory | Returns the category of this NodeResource. |
/getEdgeConstraint | Returns the constraint between this and node. |
/getHomeDomain | Returns the DomainResource containing this NodeResource. |
/getJunctionTree | Returns the JunctionTreeResource to which this NodeResource belongs. |
/getKind | Returns the kind of this NodeResource. |
/getSubtype | Returns the subtype of this NodeResource. |
/getLabel | Returns the label of this NodeResource. |
/likelihoodIsPropagated | Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is a likelihood; otherwise, returns false. |
/likelihoodIsEntered | Returns true if the evidence potential, currently registered with this NodeResource, is a likelihood; otherwise, returns false. |
/removeParent | Removes the directed link between a parent and this NodeResource. |
/reverseEdge | Reverses the edge between this NodeResource and the specified neighbor. |
/setAttribute | Sets a value for a particular attribute in the attribute list for this NodeResource. |
/setEdgeConstraint | Sets a constraint between this NodeResource and another NodeResource. |
/setLabel | Sets the label of this NodeResource. |
/switchParent | Replace the given parent node with the new node. |
/caseIsSet | Returns true if a value has been set for this continuous chance or discrete node in case {caseindex}; otherwise, returns false. |
/getAlpha | Returns the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/getBeta | Returns the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}. |
/getCaseValue | Returns the value set for this continuous chance node in case {caseindex}. |
/getDistribution | Returns the distribution for this continuous node. |
/getExperienceTable | Returns the experience table of this continuous or discrete chance node. |
/getGamma | Returns the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/getMean | Returns the mean of the marginal distribution of this continuous chance node. |
/getPredictedMean | Returns the predicted mean of the marginal distribution of this continuous chance node at the specified time point. |
/getPropagatedValue | Retrieves the value that has been propagated for this continuous chance node. |
/getSampledValue | Returns the value of this function or continuous chance node for the configuration generated by the most recent call to DomainResource -> /simulate. |
/getVariance | Returns the variance of the marginal distribution of this continuous chance node. |
/getPredictedVariance | Returns the predicted variance of the marginal distribution of this continuous chance node at the specified time point. |
/hasExperienceTable | Returns true if this continuous or discrete chance node has an experience table; returns false otherwise. |
/setAlpha | Sets the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/setBeta | Sets the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}. |
/setCaseValue | Sets the value of this continuous chance node to {value} in case {c}. |
/setGamma | Sets the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/unsetCase | Specifies that the value of this continuous chance or discrete node is “unknown” for case {caseindex}. |
/computeSensitivityData | Computes the constants of the sensitivity functions for the specified output probability and all CPT/policy parameters in the network. |
/getFadingTable | Returns the fading table of this discrete chance node. |
/hasFadingTable | Returns true if this discrete chance node has a fading table; returns false otherwise. |
/getRequisiteAncestors | Returns a white-space separated list of URI references to the requisite ancestors of this decision node. |
/getRequisiteParents | Returns a white-space separated list of URI references to the requisite parents of this decision node. |
/enterFinding | Specifies a finding value for a given state with all other states unaffected. |
/generateTable | Generates the table of this discrete node from its model (a missing model will trigger an error). |
/getCaseState | Returns the state of this discrete node for case {c}. |
/getEnteredFinding | Returns the entered finding for the specified state of this node. |
/getEntropy | Computes the entropy of this node. |
/getMutualInformation | Computes the mutual information between this node and the specified node. |
/getPropagatedFinding | Returns the propagated finding. |
/getSampledState | Returns the state index of this discrete node for the configuration generated by the most recent call to DomainResource -> /simulate. |
/getSensitivityConstants | Returns the four constants of the specified sensitivity function. |
/getSensitivityConstantsByOutput | Returns the four constants of the specified sensitivity function. |
/setCaseState | Sets the state of this discrete node to {state} in case {c}. |
/getStateIndexFromLabel | Returns the index of the state matching the specified {label}. |
/computeExplanationData | Computes Bayes factor data for all (nonempty) subsets of evidence nodes up to the specified maximum size. |
/computeExplanationData2 | Computes “normalized likelihoods” for the specified hypothesis and all (nonempty) subsets of evidence nodes up to the specified maximum size. |
/addToInputs | Makes this <NodeResoruce> become an input node of its ClassResource. |
/addToOutputs | Makes this NodeResource become an output node of its ClassResource. |
/createTemporalClone | Constructs a temporal clone of this NodeResource. |
/getHome | Returns the ClassResource or DomainResource containing this NodeResource. |
/getHomeClass | Returns the ClassResource containing this NodeResource. |
/getInstance | Returns the instance NodeResource containing this (cloned) output node. |
/getMaster | Returns the “master” of this (cloned) output NodeResource of an instance node (i.e., the node cloned to get this output node). |
/getSource | Get a list of NodeResources of ClassResource nodes that identifies this DomainResource node. |
/getTemporalClone | Get the “temporal clone” of this NodeResource. |
/getTemporalMaster | Get the “temporal master” of this NodeResource. |
/removeFromInputs | Removes this NodeResource from the set of input nodes of its class. |
/removeFromOutputs | Removes this NodeResource from the set of output nodes of its class. |
TableResource | Hugin uses tables for representing the conditional probability and utility potentials of individual nodes, the probability and utility potentials on separators and cliques of junction trees, evidence potentials, etc. |
Functions | |
/delete | Deletes this TableResource. |
/getSize | Get the size of this TableResource. |
/getNodes | Get all NodeResources associated with this TableResource. |
/getDataItem | Get the data item at position {index} of the discrete data of this TableResource. |
/setDataItem | Sets a specific data item of the discrete data of this TableResource. |
/setData | Sets a region of the discrete data of this TableResource. |
/getData | Gets a region of the discrete data of this TableResource. |
/getMean | Returns the mean of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource. |
/getVariance | Returns the variance of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource. |
/getCovariance | Returns the covariance of a pair of continuous chance NodeResources given a configuration of the discrete chance NodeResources of this TableResource. |
/computeProbabilityOfInterval | Computes the probability of the given interval for the mixture distribution represented by this TableResource. |
/reorderNodes | Reorders the list of NodeResource of this TableResource. |
/getCGSize | Returns the CG size of this TableResource. |
/setAllDataItems | Sets all data items of the discrete data of this TableResource. |
ModelResource | A Model is a compact description of a table. |
Functions | |
/delete | Deletes this ModelResource. |
/setExpression | Associates an expression (specified as a string) with a specific configuration of the NodeResources of this ModelResource. |
/getExpression | Returns the expression (as a string) associated with a specific configuration of the NodeResources of this ModelResource. |
/setNumberOfSamplesPerInterval | Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents. |
/getNumberOfSamplesPerInterval | Gets the number of values per interval used when generating the conditional probability table for a node with interval parents. |
/getSize | Returns the number of configurations of the NodeResources of this ModelResource. |
/getNodes | Returns the list of NodeResources in this ModelResource. |
CliqueResource | CliqueResources represents the cliques in the junction tree. |
Functions | |
/getJunctionTree | Get the JunctionTreeResource to which this CliqueResource belongs. |
/getMembers | Get the list of NodeResources that are members of this CliqueResource. |
/getNeighbors | Returns a list of CliqueResources that are neighbors of this CliqueResource. |
JunctionTreeResource | JunctionTreeResources represents the junction trees in the compiled domain. |
Functions | |
/cgEvidenceIsPropagated | Returns true if CG evidence has been propagated in this junction tree; otherwise, returns false. |
/equilibriumIs | Tests the Equilibrium type. |
/evidenceIsPropagated | Tests if evidence has been propagated for this JunctionTreeResource. |
/evidenceModeIs | Tests if the EvidenceMode matches {mode}. |
/evidenceToPropagate | Tests if evidence has been entered since the last propagation. |
/getCliques | Returns the list of CliqueResources in this JunctionTreeResource. |
/getConflict | Returns the conflict measure of the data inserted in this JunctionTreeResource. |
/getRoot | Returns the root CliqueResource of this JunctionTreeResource. |
/getTotalCGSize | Returns the total number of CG table entries for this JunctionTreeResource. |
/getTotalSize | Returns the total number of discrete table configurations for this JunctionTreeResource. |
/likelihoodIsPropagated | Returns true if likelihoods have been propagated in this JunctionTreeResource; otherwise, returns false. |
/tablesToPropagate | Returns true if this JunctionTreeResource contains updated tables that have not been propagated; otherwise, returns false. |
/propagate | Propagates evidence in this JunctionTreeResource. |
DataSetResource | An instance of the DataSetResource represents a data set as a “matrix” with cases as rows and variables as columns. |
Functions | |
/delete | Deletes this DataSetResource. |
/keepAlive | Touch the DataSetResource to mark it as active in periods where no other functions are being called. |
/deleteColumn | Deletes the specified column from this DataSet. |
/deleteRow | Deletes the specified row from this DataSet. |
/getColumnName | Returns the name of the specified column of this DataSet. |
/getDataItem | Returns the data item at the specified location of this DataSet. |
/getNumberOfColumns | Returns the number of columns in this DataSet. |
/getNumberOfRows | Returns the number of rows in this DataSet. |
/moveColumn | Moves the specified column to a new position. |
/moveRow | Moves the specified row to a new position. |
/newColumn | Creates a new column in this DataSet. |
/newRow | Creates a new row in this DataSet. |
/setColumnName | Sets the name of the specified column of this DataSet. |
/setDataItem | Sets (or deletes) the data item at the specified location of this DataSet. |
/save | Submits this DataSetResource in the form of a CSV file to the service located at a target URL. |
/download | Get this DataSetResource in the form of a CSV file. |
Main entry point for the HUGIN Web Service API. This resource provides functionallity for creating and loading DomainResources.
/rest
Functions | |
/loadDomain | Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. |
/loadCompileDomain | Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. |
/newDomain | Construct an empty domain. |
/newClassCollection | Construct an empty classcollection. |
/loadClassCollection | Construct a classcollection from a HUGIN Knowledge Base retrieved over HTTP. |
/loadDataSet | Construct a data set from a CSV file retrieved over HTTP. |
/newDataSet | Construct an empty data set. |
/runBatchJSON | Experimental JSON batch feature. |
Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. If the contents constitutes a valid HKB file, a DomainResource is constructed and an URI reference is returned.
POST /rest/loadDomain
{URL} | URL to HKB file |
={URL}
200 OK
/rest/domain/{ID}
Construct a domain from a HUGIN Knowledge Base retrieved over HTTP. If the contents constitutes a valid HKB file, a DomainResource is constructed and an URI reference is returned. If the HKB file is a DomainResource stored in a compressed state, a sum,normal-propagation is performed, otherwise compile is invoked.
POST /rest/loadCompileDomain
{URL} | URL to HKB file |
={URL}
200 OK
/rest/domain/{ID}
Construct an empty domain. An URI reference to the DomainResource is returned.
POST /rest/newDomain
200 OK
/rest/domain/{ID}
Construct an empty classcollection. An URI reference to the ClassCollectionResource is returned.
POST /rest/newClassCollection
200 OK
/rest/cc/{ID}
Construct a classcollection from a HUGIN Knowledge Base retrieved over HTTP. If the contents constitutes a valid HKB file, a ClassCollectionResource is constructed and an URI reference is returned.
POST /rest/loadClassCollection
{URL} | URL to HKB file |
={URL}
200 OK
/rest/cc/{ID}
Construct an empty data set. An URI reference to the DataSetResource is returned.
POST /rest/newDataSet
200 OK
/rest/dataset/{ID}
Experimental JSON batch feature.
Invoke a series of HUGIN function calls using just a single HTTP request.
Notice: the Content-Type of the request must be application/json.
POST /rest/runBatchJSON
{JSON} | string; a JSON encoded list of HUGIN function calls. |
Each HUGIN function call is a JSON object mimicking the corresponding HTTP request that would be needed to invoke the function. The following two JSON objects are (strictly) accepted
POST
{ "method": "POST", "url": "/rest/....", "body": "...." }
GET
{ "method": "GET", "url": "/rest/...." }
={JSON}
Example request body
=[ { "method": "POST", "url": "/rest/domain/{ID}/compile", "body": "" }, { "method": "POST", "url": "/rest/domain/{ID}/node/{ID}/selectState", "body": "=0" }, { "method": "POST", "url": "/rest/domain/{ID}/propagate", "body": "=sum&=normal" }, { "method": "GET", "url": "/rest/domain/{ID}/node/{ID}/getBelief?=1" } ]
200 OK
{... JSON encoded list of results of HUGIN function calls ...}
Response is a JSON encoded list of results containing the response to each function call in the batch.
If the request body (the JSON code) cannot be fully parsed the status code returned is a 202 Accepted and the response is the result of all batched requests up until the point where the parsing failed.
Example response
=[ { "status": 200 }, { "status": 200 }, { "status": 200 }, { "status": 200, "body": "0.123" } ]
ClassResources are grouped into ClassCollectionResources. Each class must belong to exactly one ClassCollectionResource. A ClassCollectionResource can be considered a closed world of interdependent ClassResources (i.e., Bayesian networks and LIMIDs). That is, each ClassResource may contain instances of other ClassResources of the ClassCollectionResource, but not of ClassResources of other ClassCollectionResources.
A ClassCollectionResource is instantiated using the Rest -> /newClassCollection or Rest -> /loadClassCollection.
/rest/cc/{ID}
Functions | |
/delete | Deletes this ClassCollectionResource, including all nested HUGIN resources belonging to it (e.g., ClassResources, NodeResources, TableResources etc.) |
/keepAlive | Touch the ClassCollectionResource to mark it as active in periods where no other functions are being called. |
/getClassByName | Returns a ClassResource by name. |
/getMembers | Get all ClassResources of this ClassCollectionResource. |
/save | Submits this ClassCollectionResource in the form of a HKB file to the service located at a target URL. |
/download | Get this ClassCollectionResource in the form of a HKB file. |
/getNewClass | Creates a new ClassResource. |
Deletes this ClassCollectionResource, including all nested HUGIN resources belonging to it (e.g., ClassResources, NodeResources, TableResources etc.).
POST /rest/cc/{ID}/delete
200 OK
Touch the ClassCollectionResource to mark it as active in periods where no other functions are being called. This function must be invoked regularly in periods where no operations are being performed on the ClassCollectionResource or any of the objects belonging to it, in order to signal the remote decision engine that the ClassCollectionResource and any of its objects are still in use and not subject to garbage collection.
POST /rest/cc/{ID}/keepAlive
200 OK
Returns a ClassResource by name.
GET /rest/cc/{ID}/getClassByName?={className}
{className} | name of the class to get. |
200 OK
/rest/cc/{ID}/class/{ID}
Get all ClassResources of this ClassCollectionResource.
GET /rest/cc/{ID}/getMembers
200 OK
/rest/cc/{ID}/class/{ID} /rest/cc/{ID}/class/{ID} /rest/cc/{ID}/class/{ID} ...
Response is a white-space separated list of URI references to all ClassResources in this ClassCollectionResource.
Submits this ClassCollectionResource in the form of a HKB file to the service located at a target URL.
POST /rest/cc/{ID}/save
{URL} | the URL to submit HKB file |
{method} | the HTTP method to use: POST | PUT |
={URL}&={method}
200 OK
Get this ClassCollectionResource in the form of a HKB file.
{filename} | used for setting the Content-Disposition filename header of response. |
GET /rest/cc/{ID}/download?={filename}
200 OK
[ ... raw HKB file contents ... ]
Creates a new ClassResource.
POST /rest/cc/{ID}/getNewClass
{name} | the name of the new class. |
={name}
200 OK
/rest/cc/{ID}/class/{ID}
Instances of the ClassResource represent object-oriented Bayesian networks and LIMIDs. Such an instance can contain nodes representing instances of other network classes and so on. To use an instance (i.e., propagate evidence and calculate updated beliefs and expected utilities), it must first be unfolded to a plain Bayesian network or LIMID. The ClassResource -> /createDomain function handles this.
A ClassResource is instantiated using the ClassCollectionResource -> /getNewClass.
/rest/cc/{ID}/class/{ID}
Functions | |
/createDBNDomain | Creates a DBN runtime DomainResource from this ClassResource. |
/createDomain | Creates a flat runtime DomainResource from this ClassResource. |
/getNewInstanceNode | Creates a new instance node NodeResource. |
/getClassCollection | Get the ClassCollectionResource to which this ClassResource belongs. |
/getInputs | Get all input NodeResources defined for this ClassResource. |
/getInstances | Get all instance NodeResources that are instances of this ClassResource. |
/getOutputs | Get all output NodeResources defined for this ClassResource. |
/getName | Returns the name of this ClassResource. |
/setName | Sets the name of this ClassResource. |
Creates a DBN runtime DomainResource from this ClassResource. The domain is formed by linking (through temporal clones) the specified number of instances (called time slices) of the class.
POST /rest/cc/{ID}/class/{ID}/createDBNDomain
{numberOfSlices} | the number of time slices; an integer. |
={numberOfSlices}
200 OK
/rest/domain/{ID}
Creates a flat runtime DomainResource from this ClassResource. The domain can be compiled and used for inference, etc.
POST /rest/cc/{ID}/class/{ID}/createDomain
200 OK
/rest/domain/{ID}
Creates a new instance node NodeResource.
POST /rest/cc/{ID}/class/{ID}/getNewInstanceNode
{instanceOf} | URI to the ClassResource from which to instantiate the new instance node. |
={instanceOf}
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Get the ClassCollectionResource to which this ClassResource belongs.
GET /rest/cc/{ID}/class/{ID}/getClassCollection
200 OK
/rest/cc/{ID}
An URI reference to the ClassCollectionResource is returned.
Get all input NodeResources defined for this ClassResource.
GET /rest/cc/{ID}/class/{ID}/getInputs
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Get all instance NodeResources that are instances of this ClassResource.
GET /rest/cc/{ID}/class/{ID}/getInstances
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to instance NodeResources.
Get all output NodeResources defined for this ClassResource.
GET /rest/cc/{ID}/class/{ID}/getOutputs
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Returns the name of this ClassResource.
GET /rest/cc/{ID}/class/{ID}/getName
200 OK
{node name string}
Sets the name of this ClassResource. The name must be valid, i.e., it must follow the rules that govern the validity of C identifiers, and no other ClassResource in the ClassCollectionResource must have the same name.
POST /rest/cc/{ID}/class/{ID}/setName
{name} | a string containing the new name of the ClassResource |
={name}
200 OK
NetworkModelResource interface is implemented by ClassResource and DomainResource. A NetworkModelResource cannot be instantiated explicitly; use DomainResource and ClassResources.
/rest/domain/{ID}
/rest/cc/{ID}/class/{ID}
Functions | |
/delete | Deletes this NetworkModelResource, including all nested HUGIN resources belonging to it (e.g., NodeResources, TableResources etc.) |
/getNodeByName | Returns a NodeResource by name. |
/getNewNode | Creates a new NodeResource. |
/getNodes | Get all NodeResources in this NetworkModelResource. |
/generateTables | Generates the conditional probability tables for all nodes of this NetworkModelResource. |
/getAttribute | Returns an attribute value. |
/parseNodes | Parses the file retrieved from an URL and returns a white-space separated list of URI references to NodeResources. |
/setAttribute | Inserts the key/value pair in the attribute list for this NetworkModelResource. |
Deletes this NetworkModelResource, including all nested HUGIN resources belonging to it (e.g., NodeResources, TableResources etc.). For DomainResources this includes JunctionTreeResources and CliqueResources as well.
POST /rest/cc/{ID}/class/{ID}/delete
POST /rest/domain/{ID}/delete
200 OK
Returns a NodeResource by name.
GET /rest/cc/{ID}/class/{ID}/getNodeByName?={nodeName}
GET /rest/domain/{ID}/getNodeByName?={nodeName}
{nodeName} | name of the node to get. |
200 OK
/rest/domain/{ID}/node/{ID}
Creates a new NodeResource. The specifics of the node created depends on the category, kind and subtype specified.
POST /rest/cc/{ID}/class/{ID}/getNewNode
POST /rest/domain/{ID}/getNewNode
{category} | the node category. |
Possible values for {category} are
{kind} | the node kind. |
Possible values for {kind} are
{subtype} | the node subtype. |
Possible values for {subtype} are
={category}&={kind}&={subtype}
200 OK
/rest/domain/{ID}/node/{ID}
Get all NodeResources in this NetworkModelResource.
GET /rest/cc/{ID}/class/{ID}/getNodes
GET /rest/domain/{ID}/getNodes
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all NodeResources in this DomainResource.
Generates the conditional probability tables for all nodes of this NetworkModelResource. This is done by calling NodeResource -> /generateTable for all nodes having a model, so the descriptions of the NodeResource -> /generateTable function (for discrete and utility nodes) also apply here.
POST /rest/cc/{ID}/class/{ID}/generateTables
POST /rest/domain/{ID}/generateTables
200 OK
Returns an attribute value. That is, the value associated with a key in the attribute list for this NetworkModelResource.
GET /rest/cc/{ID}/class/{ID}/getAttribute?={key}
GET /rest/domain/{ID}/getAttribute?={key}
{key} | the key for which the attribute value is returned |
200 OK
...
The attribute value associated with the {key}.
Parses the file retrieved from an URL and returns a white-space separated list of URI references to NodeResources. This is used for reading an elimination order from an external URL.
POST /rest/cc/{ID}/class/{ID}/parseNodes
POST /rest/domain/{ID}/parseNodes
{URL} | URL to the file with node names |
={URL}
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Inserts the key/value pair in the attribute list for this NetworkModelResource. If the key is already defined, the value is updated. If no value is provided, the attribute is removed.
POST /rest/cc/{ID}/class/{ID}/setAttribute
POST /rest/domain/{ID}/setAttribute
{key} | The key identifying the attribute to be updated. |
{value} | The value of the attribute. |
={key}&={value}
200 OK
Instances of the DomainResource represent Bayesian networks and LIMIDs in which you can propagate evidence and calculate updated beliefs and expected utilities.
A DomainResource is instantiated using the Rest -> /loadDomain or Rest -> /newDomain functions.
/rest/domain/{ID}
Functions | |
/keepAlive | Touch the DomainResource to mark it as active in periods where no other functions are being called. |
/parseCase | Parses a case retrieved from an URL and enters the associated findings into this DomainResource. |
/saveCase | Submits all evidence entered in this DomainResource to the service located at a target URL. |
/save | Submits this DomainResource in the form of a HKB file to the service located at a target URL. |
/download | Get this DomainResource in the form of a HKB file. |
/parseCases | Parses the cases retrieved form an URL and enters the cases into this DomainResource. |
/saveCases | Submits all cases in this DomainResource to the service located at a target URL. |
/propagate | Establishes the specified equilibrium using the evidence mode indicated for incorporation of evidence on all JunctionTrees of this DomainResource. |
/compile | Compiles this DomainResource. |
/adapt | Adapts this DomainResource according to the evidence entered. |
/adaptClassTablesUsingFractionalUpdate | For each discrete node of this DomainResource (which must be a runtime domain) such that both the node and its source node have experience tables, the conditional probability and experience tables of both nodes are learned/updated, and the tables of the domain node will be identical to those of its source node. |
/adaptClassTablesUsingOnlineEM | This function updates (adapts), for all discrete chance nodes of this DomainResource, the experience count (retrieval of experience) and the conditional probability distribution (dissemination of experience) for all parent configurations having a valid experience count. |
/approximate | Removes “near-zero” probabilities from the clique probability tables. |
/cgEvidenceIsPropagated | Check if evidence on CG nodes has been propagated. |
/evidenceIsPropagated | Tests if evidence has been propagated for this DomainResource. |
/evidenceToPropagate | Tests if evidence has been entered since the last propagation. |
/retractFindings | Retracts (all) evidence for all nodes in this DomainResource. |
/getNewModel | Constructs a ModelResource over a NodeResource given a list of NodeResources. |
/getExpectedUtility | Gets the total expected utility associated with this DomainResource. |
/isCompiled | Tests whether this DomainResource is compiled. |
/isTriangulated | Tests whether this DomainResource is triangulated. |
/isTriangulatedForBK | Tests whether this DomainResource has been triangulated for Boyen-Koller approximate inference. |
/initialize | Establishes the initial values for all tables of this DomainResource (which must be compiled). |
/getJunctionTrees | Gets all JunctionTreeResources of this DomainResource. |
/compress | Removes the zero entries from the clique and separator tables of the junction trees in this DomainResource. |
/computeSensitivityData | Computes the constants of the sensitivity functions for the specified output probabilities and all CPT parameters in the network. |
/getLogLikelihood | Computes the log-likelihood of the case data. |
/getLogLikelihoodTolerance | Returns the log-likelihood tolerance for this DomainResource. |
/getLogNormalizationConstant | Returns the log of the normalization constant. |
/getMAPConfiguration | Returns a MAP configuration. |
/getMarginal | Computes the marginal distribution for the nodes provided as argument with respect to the (imaginary) joint potential, determined by the current potentials on the junction tree(s) of this DomainResource. |
/getMaxNumberOfEMIterations | Returns the maximum number of iterations allowed for the EM algorithm. |
/getMaxNumberOfSeparators | Returns the maximum number of separators allowed when using the total weight triangulation method. |
/getNormalDeviate | Use the pseudo-random number generator for this DomainResource to sample a real number from a normal (aka Gaussian) distribution. |
/getNormalizationConstant | Retrieves the normalization constant for the most recent propagation. |
/getNumberOfCases | Returns the number of data cases. |
/getNumberOfMAPConfigurations | Returns the number of MAP configurations. |
/getProbabilityOfMAPConfiguration | Returns the probability of a MAP configuration. |
/getSensitivitySet | Returns the sensitivity set computed by the most recent call to DomainResource -> /computeSensitivityData. |
/getSignificanceLevel | Returns the significance level of the dependency tests performed during structure learning using the PC-algorithm. |
/getUniformDeviate | Use the pseudo-random number generator for this DomainResource to sample a real number from the uniform distribution over the interval [0,1). |
/enterCase | Enters a case as evidence. |
/equilibriumIs | Tests the Equilibrium type. |
/isCompressed | Tests whether this DomainResource is compressed. |
/evidenceModeIs | Tests for evidence mode. |
/learnStructure | Learns the structure (graph) of the Bayesian network from data using the PC algorithm. |
/learnTables | Learns the conditional probability tables from data using the EM algorithm. |
/likelihoodIsPropagated | Returns true if likelihood has been propagated for this DomainResource; otherwise, returns false. |
/newCase | Creates a new case. |
/findMAPConfigurations | Finds all configurations of nodes with probability at least {minprobability}. |
/getAIC | Computes the AIC score (Akaike’s Information Criterion) of the case data. |
/getApproximationConstant | Returns the approximation constant. |
/getBIC | Computes the BIC score (Bayesian Information Criterion) of the case data. |
/getCaseCount | Returns case count for a case. |
/getConflict | Returns the conflict value. |
/getDConnectedNodes | Performs a d-separation test and returns a list of d-connected nodes. |
/getDSeparatedNodes | Performs a d-separation test and returns a list of d-separated nodes. |
/getEliminationOrder | Returns the triangulation order. |
/resetInferenceEngine | Establishes the initial state of the inference engine, which is sum-equilibrium with no evidence incorporated. |
/saveToMemory | Creates a copy in memory of the belief and junction tree tables of this DomainResource. |
/seedRandom | Seeds the pseudo-random number generator for this DomainResource. |
/setCaseCount | Sets case count for a case. |
/setLogLikelihoodTolerance | Sets the log-likelihood tolerance for this DomainResource. |
/setMaxNumberOfEMIterations | Sets the maximum number of iterations allowed for the EM algorithm. |
/setMaxNumberOfSeparators | Sets the maximum number of separators allowed when using the total weight triangulation method. |
/setNumberOfCases | Sets the number of cases. |
/setSignificanceLevel | Sets the significance level of the dependency tests performed during structure learning using the PC-algorithm. |
/simulate | Generates a sample configuration from the joint distribution represented by this DomainResource. |
/batchSimulate | Generates a number of sample configurations by invoking DomainResource -> /simulate a number of times and for each iteration recording the results of NodeResource -> /getSampledValue , NodeResource -> /getSampledState or NodeResource -> /getSampledUtility for specified NodeResources. |
/tablesToPropagate | Tests for new node tables. |
/triangulate | Triangulates the graph of this DomainResource using the default triangulation method. |
/triangulateWithMethod | Triangulates the graph of this DomainResource using the specified triangulation method. |
/computeDBNPredictions | Computes predictions for {numberOfTimePoints} time slices beyond the current time window. |
/getDBNWindowOffset | Returns the total number of time steps that the time window of this DBN runtime domain has been moved. |
/initializeDBNWindow | Moves the time window of this DBN back to its initial position, and removes all evidence. |
/moveDBNWindow | Slides the time window of this DBN delta steps into the future. |
/triangulateDBN | Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used. |
/triangulateDBNForBK | Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used. |
/uncompile | Uncompiles this DomainResource. |
/updatePolicies | Updates the policy tables of the domain. |
/getExplanation | Returns the evidence subset associated with the explanation of rank index computed by the most recent call to NodeResource -> /computeExplanationData. |
/getExplanationScore | Returns the score of the specified explanation. |
/getNumberOfExplanations | Returns the number of explanations. |
/addCases | Adds the specified range of rows of the data set to this DomainResource as cases. |
Touch the DomainResource to mark it as active in periods where no other functions are being called. This function must be invoked regularly in periods where no operations are being performed on the DomainResource or any of the objects belonging to it, in order to signal the remote decision engine that the DomainResource and any of its objects are still in use and not subject to garbage collection.
POST /rest/domain/{ID}/keepAlive
200 OK
Parses a case retrieved from an URL and enters the associated findings into this DomainResource. All existing evidence in the DomainResource is retracted before entering the case findings. Contents of the retrieved ressource must conform to the HUGIN case file grammar as defined in the HUGIN API manual (api-manual.pdf).
POST /rest/domain/{ID}/parseCase
{URL} | URL to case file |
={URL}
200 OK
Submits all evidence entered in this DomainResource to the service located at a target URL. Submittet contents conforms to the HUGIN case file grammar as defined in the HUGIN API manual (api-manual.pdf).
POST /rest/domain/{ID}/saveCase
{URL} | the URL to submit case file |
{method} | the HTTP method to use: POST | PUT |
={URL}&={method}
200 OK
Submits this DomainResource in the form of a HKB file to the service located at a target URL.
POST /rest/domain/{ID}/save
{URL} | the URL to submit HKB file |
{method} | the HTTP method to use: POST | PUT |
={URL}&={method}
200 OK
Get this DomainResource in the form of a HKB file.
{filename} | filename, used for setting the Content-Disposition filename header of response. |
GET /rest/domain/{ID}/download?={filename}
200 OK
[ ... raw HKB file contents ... ]
Parses the cases retrieved form an URL and enters the cases into this DomainResource. Contents of the retrieved ressource must conform to the HUGIN data file grammar as defined in the HUGIN API manual (api-manual.pdf).
POST /rest/domain/{ID}/parseCases
{URL} | URL to data file |
={URL}
200 OK
Submits all cases in this DomainResource to the service located at a target URL. Submittet contents uses specified {separator} between data items and {missingData} for missing data; and otherwise conforms to the HUGIN data file grammar as defined in the HUGIN API manual (api-manual.pdf)
POST /rest/domain/{ID}/saveCases
{URL} | the URL to submit data file |
{method} | the HTTP method to use: POST | PUT |
{nodes} | a list of all nodes which are to be included in the file; a white-space separated list of URI references to NodeResources. |
{cases} | a white-space separated list of case indexes specifying the cases to be included in the file. Note: passing an empty list for this parameter will include all cases. |
{caseCounts} | a string true or false. If true, include case counts in the data file. If false, only include case counts if they are present in the DomainResource. |
{separator} | the string used to seperate the items in the file |
{missingData} | the string used to represent missing data |
={URL}&={method}&={nodes}&={cases}&={caseCounts}&={separator}&={missingData}
200 OK
Establishes the specified equilibrium using the evidence mode indicated for incorporation of evidence on all JunctionTrees of this DomainResource. Also, revised beliefs will be computed for all nodes.
POST /rest/domain/{ID}/propagate
{equilibrium} | Equilibrium type. The normal Equilibrium type is sum. |
Possible values for {equilibrium} are
{evidenceMode} | EvidenceMode type. The normal EvidenceMode type is normal. |
Possible values for {evidenceMode} are
={equilibrium}&={evidenceMode}
200 OK
Compiles this DomainResource. The domain must not be compiled. The default triangulation method is used (unless the domain is already triangulated, in which case the existing triangulation is used).
POST /rest/domain/{ID}/compile
200 OK
Adapts this DomainResource according to the evidence entered.
POST /rest/domain/{ID}/adapt
200 OK
For each discrete node of this DomainResource (which must be a runtime domain) such that both the node and its source node have experience tables, the conditional probability and experience tables of both nodes are learned/updated, and the tables of the domain node will be identical to those of its source node.
Nodes (in this domain or in the object-oriented model) without experience tables will not be modified.
This function updates (adapts), for all discrete nodes.
POST /rest/domain/{ID}/adaptClassTablesUsingFractionalUpdate
200 OK
This function updates (adapts), for all discrete chance nodes of this DomainResource, the experience count (retrieval of experience) and the conditional probability distribution (dissemination of experience) for all parent configurations having a valid experience count. (Fading factors are ignored.)
The alpha argument and the total experience determine the learning rate of the update step.
POST /rest/domain/{ID}/adaptClassTablesUsingOnlineEM
{alpha} | the parameter to be used for online EM. |
={alpha}
200 OK
Removes “near-zero” probabilities from the clique probability tables. For each clique in this DomainResource, a value delta is computed such that the sum of all elements less than delta in the (discrete part) of the clique table is less than epsilon. These elements (less than delta) are then set to 0.
POST /rest/domain/{ID}/approximate
{epsilon} | the threshold value. Maximal probability mass to eradicate from each clique. |
={epsilon}
200 OK
{real number}
Returned {real number} is the probability mass remaining in the entire Domain, letting you know how much precision you have “lost”. Note that this is not the same as 1 - epsilon, as the epsilon value is relative to each clique. Typically, the amount of probability mass removed will be somewhat larger than epsilon.
Tests if evidence has been propagated for this DomainResource.
GET /rest/domain/{ID}/evidenceIsPropagated
200 OK
{true or false}
Returned {true or false} is true if evidence has been propagated; otherwise, false.
Retracts (all) evidence for all nodes in this DomainResource.
POST /rest/domain/{ID}/retractFindings
200 OK
Constructs a ModelResource over a NodeResource given a list of NodeResources.
{belongsTo} | URI reference to the NodeResource that the new ModelResource belongs to. |
{modelNodes} | a list of any model nodes for the new ModelResource; a white-space separated list of URI references to NodeResources. |
POST /rest/domain/{ID}/getNewModel
={belongsTo}&={modelNodes}
200 OK
/rest/domain/{ID}/model/{ID}
The returned URI is a reference to the newly created ModelResource.
Gets the total expected utility associated with this DomainResource.
GET /rest/domain/{ID}/getExpectedUtility
200 OK
{real number}
Returned {real number} is the total expected utility associated with this DomainResource.
Tests whether this DomainResource is compiled. A domain is “compiled” if it is triangulated and junction tree tables are created.
GET /rest/domain/{ID}/isCompiled
200 OK
{true or false}
Returned {true or false} is true if the domain is compiled; otherwise, false.
Tests whether this DomainResource is triangulated. Being “triangulated” means that the junction forest has been created, but not the associated tables.
GET /rest/domain/{ID}/isTriangulated
200 OK
{true or false}
Returned {true or false} is true if the domain is triangulated; otherwise, false.
Tests whether this DomainResource has been triangulated for Boyen-Koller approximate inference. That is, has this DomainResource been triangulated using DomainResource -> /triangulateDBNForBK.
GET /rest/domain/{ID}/isTriangulatedForBK
200 OK
{true or false}
Returned {true or false} is true if the domain is triangulated for Boyen-Koller; otherwise, false.
Establishes the initial values for all tables of this DomainResource (which must be compiled). This method erases all evidence previously entered.
POST /rest/domain/{ID}/initialize
200 OK
Gets all JunctionTreeResources of this DomainResource.
GET /rest/domain/{ID}/getJunctionTrees
200 OK
/rest/domain/{ID}/junctiontree/{ID} /rest/domain/{ID}/junctiontree/{ID} /rest/domain/{ID}/junctiontree/{ID} ...
Response is a white-space separated list of URI references to all JunctionTreeResources of this DomainResource.
Removes the zero entries from the clique and separator tables of the junction trees in this DomainResource. Compression can only be applied to (compiled) ordinary Bayesian networks. Continuous nodes are allowed, but compression only applies to configurations of states of the discrete nodes.
POST /rest/domain/{ID}/compress
200 OK
Computes the constants of the sensitivity functions for the specified output probabilities and all CPT parameters in the network. The output probabilities are specified using a list of nodes and a list of corresponding states.
{nodes} | the list of (output) nodes; a white-space separated list of URI references to NodeResources. |
{states} | a list of states of the nodes in the nodes list; a white-space separated list of state indices (integers). |
POST /rest/domain/{ID}/computeSensitivityData
={nodes}&={states}
200 OK
Returns the log-likelihood tolerance for this DomainResource.
GET /rest/domain/{ID}/getLogLikelihoodTolerance
200 OK
{real number}
Returned {real number} is the log-likelihood tolerance.
Returns a MAP configuration. This method returns the configuration identified by index among the configurations with probability at least minProbability - as specified in the most recent successful call to DomainResource -> /findMAPConfigurations.
The index argument must be a nonnegative integer less than DomainResource -> /getNumberOfMAPConfigurations: 0 requests the most probable configuration, 1 the second-most probable configuration, etc.
{index} | identifies the configuration; an integer. |
GET /rest/domain/{ID}/getMAPConfiguration?={index}
200 OK
{integer} {integer} {integer} ...
Response is a white-space separated list of state indexes forming the configuration of the nodes passsed to DomainResource -> /findMAPConfigurations.
Computes the marginal distribution for the nodes provided as argument with respect to the (imaginary) joint potential, determined by the current potentials on the junction tree(s) of this DomainResource. If nodes contains continuous nodes, they must be last in the list. This operation is not allowed on compressed domains.
{nodes} | a list of nodes over which to compute the marginal; a white-space separated list of URI references to NodeResources. |
GET /rest/domain/{ID}/getMarginal?={nodes}
200 OK
/rest/domain/{ID}/table/{ID}
An URI reference to the TableResource containing the marginal distribution over the nodes.
Returns the maximum number of separators allowed when using the total weight triangulation method.
GET /rest/domain/{ID}/getMaxNumberOfSeparators
200 OK
{integer}
Returned {integer} is the maximum number of separators allowed when using the total weight triangulation method.
Use the pseudo-random number generator for this DomainResource to sample a real number from a normal (aka Gaussian) distribution.
{mean} | the mean of the distribution; a real number. |
{variance} | the variance of the distribution ; a real number. |
GET /rest/domain/{ID}/getNormalDeviate?={mean}&={variance}
200 OK
{real number}
Response is a sampled {real number} from a normal distribution.
Retrieves the normalization constant for the most recent propagation. For sum-propagation, the normalization constant is equal to the probability of the evidence propagated. For max-propagation, the normalization constant is the probability of the most probable configuration with the evidence incorporated.
GET /rest/domain/{ID}/getNormalizationConstant
200 OK
{real number}
Returned {real number} is the normalization constant for the most recent propagation.
Returns the number of MAP configurations. This function returns the number of configurations found by the most recent successful call to DomainResource -> /findMAPConfigurations.
GET /rest/domain/{ID}/getNumberOfMAPConfigurations
200 OK
{integer}
Returned {integer} is the number of MAP configurations found by the most recent successful call to DomainResource -> /findMAPConfigurations.
Returns the probability of a MAP configuration. This method returns the probability of the configuration returned by DomainResource -> /getMAPConfiguration
{index} | identifies the configuration; an integer. |
GET /rest/domain/{ID}/getProbabilityOfMAPConfiguration?={index}
200 OK
{real number}
Returned {real number} is the probability of the configuration returned by DomainResource -> /getMAPConfiguration
Returns the sensitivity set computed by the most recent call to DomainResource -> /computeSensitivityData. If the results produced by that call have been invalidated, an error is returned.
GET /rest/domain/{ID}/getSensitivitySet
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Returns the significance level of the dependency tests performed during structure learning using the PC-algorithm. The default value is 0.05.
GET /rest/domain/{ID}/getSignificanceLevel
200 OK
{real number}
Returned {real number} is the significance level of the dependency tests performed during structure learning using the PC-algorithm.
Use the pseudo-random number generator for this DomainResource to sample a real number from the uniform distribution over the interval [0,1).
GET /rest/domain/{ID}/getUniformDeviate
200 OK
{real number}
Returned {real number} is sampled from the uniform distribution over the interval [0,1)
Tests the Equilibrium type. Returns true if the equilibrium states of all JunctionTreeResources of this DomainResource are identical to {equilibrium}; otherwise, returns false.
{equilibrium} | the type of Equilibrium to test for. |
GET /rest/domain/{ID}/equilibriumIs?={equilibrium}
200 OK
{true or false}
Returned {true or false} is true if the equilibrium states of all JunctionTreeResources of this DomainResource are identical to {equilibrium}; otherwise false.
Tests whether this DomainResource is compressed.
GET /rest/domain/{ID}/isCompressed
200 OK
{true or false}
Returned {true or false} is true if the domain is compressed; otherwise, false.
Tests for evidence mode. Returns true if the equilibrium states of all JunctionTreeResources of this DomainResource could have been obtained through a propagation using {mode} as the evidence incorporation mode. Otherwise, returns false.
{mode} | the type of EvidenceMode to test for. |
GET /rest/domain/{ID}/evidenceModeIs?={mode}
200 OK
{true or false}
Returned {true or false} is true the equilibrium states of all JunctionTreeResources of this DomainResource could have been obtained through a propagation using {evidencemode} as the evidence incorporation mode; otherwise false.
Returns true if likelihood has been propagated for this DomainResource; otherwise, returns false.
GET /rest/domain/{ID}/likelihoodIsPropagated
200 OK
{true or false}
Returned {true or false} is true if likelihood has been propagated for this DomainResource; otherwise, false.
Finds all configurations of nodes with probability at least {minprobability}. This function uses a Monte Carlo algorithm to solve a generalized form of the maximum a posteriori (MAP) configuration problem: The MAP configuration problem is the problem of finding the most probable configuration of a set of nodes given evidence on some of the remaining nodes.
The results of this function are provided by DomainResource -> /getNumberOfMAPConfigurations, DomainResource -> /getMAPConfiguration and DomainResource -> /getProbabilityOfMAPConfiguration.
{nodes} | the discrete nodes for which to find configurations; a white-space separated list of URI references to NodeResources. |
{minprobability} | configurations with a lower probability than {minprobability} are ignored; a real number. |
POST /rest/domain/{ID}/findMAPConfigurations
={nodes}&={minprobability}
200 OK
Returns the approximation constant. The number returned is based on the most recent (explicit or implicit) approximation operation. An implicit approximation takes place when you change some conditional probability tables of acompressed domain, and then perform a propagation operation. Since some (discrete) state configurations have been removed from a compressed domain, the probability mass of the remaining configurations will typically be less than 1. This probability mass is returned by DomainResource -> /getApproximationConstant.
GET /rest/domain/{ID}/getApproximationConstant
200 OK
{real number}
Returned {real number} express the probability mass remaining in the approximated domain.
Returns the conflict value. The conflict value is valid for this DomainResource computed during the most recent propagation. If no propagation has been performed, 1 is returned.
GET /rest/domain/{ID}/getConflict
200 OK
{real number}
Returned {real number} is the conflict value.
Performs a d-separation test and returns a list of d-connected nodes. Assuming evidence on the specified evidence nodes, this function returns the list of nodes that are d-connected to the specified list of source nodes.
{source} | list of source nodes; a white-space separated list of URI references to NodeResources. |
{hard} | list of nodes assumed to be instantiated; a white-space separated list of URI references to NodeResources. |
{soft} | list of nodes assumed to have multi-state or likelihood evidence; a white-space separated list of URI references to NodeResources. |
GET /rest/domain/{ID}/getDConnectedNodes?={source}&={hard}&={soft}
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Performs a d-separation test and returns a list of d-separated nodes. Assuming evidence on the specified evidence nodes, this function returns the list of nodes that are d-separated to the specified list of source nodes.
{source} | list of source nodes; a white-space separated list of URI references to NodeResources. |
{hard} | list of nodes assumed to be instantiated; a white-space separated list of URI references to NodeResources. |
{soft} | list of nodes assumed to have multi-state or likelihood evidence; a white-space separated list of URI references to NodeResources. |
GET /rest/domain/{ID}/getDSeparatedNodes?={source}&={hard}&={soft}
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Returns the triangulation order. A list of NodeResources in the order used to triangulate the network of this domain is returned.
GET /rest/domain/{ID}/getEliminationOrder
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Establishes the initial state of the inference engine, which is sum-equilibrium with no evidence incorporated. Any propagated evidence will thus be removed from the junction tree potentials, but entered evidence will still be “registered” (i.e., they will be incorporated in the next propagation).
POST /rest/domain/{ID}/resetInferenceEngine
200 OK
Creates a copy in memory of the belief and junction tree tables of this DomainResource. This operation can only be performed if the domain is compiled, the current equilibrium equals sum, and no evidence has been incorporated.
POST /rest/domain/{ID}/saveToMemory
200 OK
Seeds the pseudo-random number generator for this DomainResource. The configurations generated by simulate are not really random. They are generated using a pseudo-random number generator producing a sequence of numbers that although it appears random is actually completely deterministic. To change the starting point for the generator, use this method.
{seed} | the seed number; an integer. |
POST /rest/domain/{ID}/seedRandom
={seed}
200 OK
Sets the log-likelihood tolerance for this DomainResource.
{tolerance} | a real number. |
POST /rest/domain/{ID}/setLogLikelihoodTolerance
={tolerance}
200 OK
Sets the maximum number of separators allowed when using the total weight triangulation method. A value of 0 specifies an unbounded number of separators.
{maxnumber} | an integer. |
POST /rest/domain/{ID}/setMaxNumberOfSeparators
={maxnumber}
200 OK
Generates a sample configuration from the joint distribution represented by this DomainResource. Given evidence, we may be interested in generating (sampling) configurations (i.e., vectors of values over the set of variables in the network) with respect to the conditional distribution for the evidence. If the DomainResource is compiled, a configuration is sampled with respect to the current distribution represented by the junction tree(s). This distribution must be in sum-equilibrium with evidence incorporated in normal mode.
POST /rest/domain/{ID}/simulate
200 OK
Generates a number of sample configurations by invoking DomainResource -> /simulate a number of times and for each iteration recording the results of NodeResource -> /getSampledValue , NodeResource -> /getSampledState or NodeResource -> /getSampledUtility for specified NodeResources.
POST /rest/domain/{ID}/batchSimulate
{iterations} | the number of times to invoke DomainResource -> /simulate and record results. |
{nodes} | list of nodes to record the result of NodeResource -> /getSampledValue, NodeResource -> /getSampledState or NodeResource -> /getSampledUtility for each DomainResource -> /simulate iteration; a white-space separated list of URI references to NodeResources. |
={iterations}&={nodes}
200 OK
/rest/domain/{ID}/node/{ID} {number} ... {number} ...
response is a number of lines. Each line begins with a URI reference to a NodeResource, followed by a white-space separated list of numbers
Tests for new node tables. Returns true if there is a node in this DomainResource having a (conditional probability, policy, or utility) table that has changed since the most recent compilation or propagation; otherwise, returns false.
POST /rest/domain/{ID}/tablesToPropagate
200 OK
{true or false}
returned {true or false} is true if tables have changed since most recent compilation or propagation; otherwise false.
Triangulates the graph of this DomainResource using the default triangulation method.
POST /rest/domain/{ID}/triangulate
200 OK
Triangulates the graph of this DomainResource using the specified triangulation method.
{tm} | the triangulation method to use. |
POST /rest/domain/{ID}/triangulateWithMethod
={tm}
200 OK
Computes predictions for {numberOfTimePoints} time slices beyond the current time window. This DomainResource must have been produced by ClassResource -> /createDBNDomain, and it must have been triangulated using DomainResource -> /triangulateDBN. The predictions are accessed using NodeResource -> /getPredictedBelief.
{numberOfTimePoints} | the number of time slices to compute predictions for (this must be a positive number); an integer. |
POST /rest/domain/{ID}/computeDBNPredictions
={numberOfTimePoints}
200 OK
Returns the total number of time steps that the time window of this DBN runtime domain has been moved.
GET /rest/domain/{ID}/getDBNWindowOffset
200 OK
{offset}
The returned integer {offset} is the total number of time steps that the time window of this DBN runtime domain has been moved.
Moves the time window of this DBN back to its initial position, and removes all evidence. This DomainResource must have been produced by ClassResource -> /createDBNDomain, and it must have been triangulated using DomainResource -> /triangulateDBN.
POST /rest/domain/{ID}/initializeDBNWindow
200 OK
Slides the time window of this DBN delta steps into the future. This DomainResource must have been produced by ClassResource -> /createDBNDomain, and it must have been triangulated using DomainResource -> /triangulateDBN.
{delta} | the number of time steps to slide the time window (this must be a positive number); an integer. |
POST /rest/domain/{ID}/moveDBNWindow
={delta}
200 OK
Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used.
{tm} | the triangulation method to use. |
POST /rest/domain/{ID}/triangulateDBN
={tm}
200 OK
Triangulates a DomainResource produced by ClassResource -> /createDBNDomain such that DomainResource -> /moveDBNWindow can be used. Boyen-Koller approximations between time slices within the window are applied.
{tm} | the triangulation method to use. |
POST /rest/domain/{ID}/triangulateDBNForBK
={tm}
200 OK
Uncompiles this DomainResource. Removes the data structures of the domain produced by a triangulation or a compilation. Note that any references to objects within the compiled structure (e.g., CliqueResources and JunctionTreeResources) are invalidated (that is, any attempt to access the objects produce an error). Also note that many of the editing functions automatically performs an uncompile operation. When this happens, the domain must be compiled again before it can be used for inference.
POST /rest/domain/{ID}/uncompile
200 OK
Returns the evidence subset associated with the explanation of rank index computed by the most recent call to NodeResource -> /computeExplanationData.
{index} | specifies that the indexth best explanation should be retrieved (the best explanation has index 0, the second best has index 1, etc.) |
GET /rest/domain/{ID}/getExplanation?={index}
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources.
Returns the score of the specified explanation. This function returns the score associated with the explanation subset returned by DomainResource -> /getExplanation.
{index} | identifies the explanation. |
GET /rest/domain/{ID}/getExplanationScore?={index}
200 OK
{real number}
Returned {real number} is the score value of requested explanation.
Returns the number of explanations. This function returns the number of subsets found by the most recent successful call to NodeResource -> /computeExplanationData.
GET /rest/domain/{ID}/getNumberOfExplanations
200 OK
{integer}
Returned {integer} the number of explanations.
Adds the specified range of rows of the data set to this DomainResource as cases.
{data} | URI reference to a DataSetResource. |
{start} | the index of the first row to transfer. |
{count} | the number of rows to transfer. |
POST /rest/domain/{ID}/addCases
={data}&={start}&={count}
200 OK
Nodes are one of the fundamental objects used in the construction of Bayesian networks and LIMIDs. All NodeResources need a DomainResource; that is, the network must exist before its nodes can be created.
A NodeResource can be created using the <DomainResource -> /getNewNode> function.
/rest/domain/{ID}/node/{ID}
Functions | |
/delete | Deletes this NodeResource. |
/getModel | Gets the ModelResource for this NodeResource. |
/getName | Returns the name of this NodeResource. |
/setName | Sets the name of this NodeResource. |
/getPositionX | Returns the position of this NodeResource on the X-axis. |
/getPositionY | Returns the position of this NodeResource on the Y-axis. |
/setPosition | Sets the position of this NodeResource. |
/setNumberOfStates | Sets the number of states of this NodeResource. |
/getNumberOfStates | Get the number of states of this discrete node. |
/setStateLabel | Sets the label of the specified state. |
/getStateLabel | Gets the label of the specified state. |
/getTable | Gets the TableResource associated with this NodeResource. |
/getBelief | Gets the belief for the specified state of this NodeResource. |
/getPredictedBelief | Returns the predicted belief for the specified state of this discrete NodeResource at the specified time point. |
/getParents | Get list of parent nodes for this NodeResource. |
/getChildren | Get list of child nodes for this NodeResource. |
/addParent | Adds a NodeResource as a new parent of this NodeResource. |
/selectState | Selects the specified state of this NodeResource. |
/getSelectedState | Gets (the index of) the selected state of this node. |
/retractFindings | Retracts all findings for this NodeResource. |
/getExpectedUtility | Gets the expected utility associated with this utility node or specified action of this discrete decision node. |
/getSampledUtility | Returns the sampled utility associated with this utility node. |
/getValue | Gets the value of this FunctionNode. |
/getPredictedValue | Gets the predicted value of this FunctionNode at the specified time point. |
/setValue | Sets the function associated with this function node to a number value. |
/evidenceIsEntered | Test if the evidence potential, currently registered with this NodeResource, is non-vacuous. |
/getStateIndex | Get the index of the state matching the specified value. |
/getStateValue | Gets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. |
/setStateValue | Sets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. |
/enterValue | Enters evidence (observation of the value) for this continuous chance node. |
/getEnteredValue | Returns the evidence (value) entered for this continuous chance node. |
/evidenceIsPropagated | Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is non-vacuous; otherwise, returns false. |
/evidenceToPropagate | Returns true if the entered and the propagated evidence differ; otherwise, returns false. |
/getAttribute | Returns an attribute value. |
/getCategory | Returns the category of this NodeResource. |
/getEdgeConstraint | Returns the constraint between this and node. |
/getHomeDomain | Returns the DomainResource containing this NodeResource. |
/getJunctionTree | Returns the JunctionTreeResource to which this NodeResource belongs. |
/getKind | Returns the kind of this NodeResource. |
/getSubtype | Returns the subtype of this NodeResource. |
/getLabel | Returns the label of this NodeResource. |
/likelihoodIsPropagated | Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is a likelihood; otherwise, returns false. |
/likelihoodIsEntered | Returns true if the evidence potential, currently registered with this NodeResource, is a likelihood; otherwise, returns false. |
/removeParent | Removes the directed link between a parent and this NodeResource. |
/reverseEdge | Reverses the edge between this NodeResource and the specified neighbor. |
/setAttribute | Sets a value for a particular attribute in the attribute list for this NodeResource. |
/setEdgeConstraint | Sets a constraint between this NodeResource and another NodeResource. |
/setLabel | Sets the label of this NodeResource. |
/switchParent | Replace the given parent node with the new node. |
/caseIsSet | Returns true if a value has been set for this continuous chance or discrete node in case {caseindex}; otherwise, returns false. |
/getAlpha | Returns the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/getBeta | Returns the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}. |
/getCaseValue | Returns the value set for this continuous chance node in case {caseindex}. |
/getDistribution | Returns the distribution for this continuous node. |
/getExperienceTable | Returns the experience table of this continuous or discrete chance node. |
/getGamma | Returns the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/getMean | Returns the mean of the marginal distribution of this continuous chance node. |
/getPredictedMean | Returns the predicted mean of the marginal distribution of this continuous chance node at the specified time point. |
/getPropagatedValue | Retrieves the value that has been propagated for this continuous chance node. |
/getSampledValue | Returns the value of this function or continuous chance node for the configuration generated by the most recent call to DomainResource -> /simulate. |
/getVariance | Returns the variance of the marginal distribution of this continuous chance node. |
/getPredictedVariance | Returns the predicted variance of the marginal distribution of this continuous chance node at the specified time point. |
/hasExperienceTable | Returns true if this continuous or discrete chance node has an experience table; returns false otherwise. |
/setAlpha | Sets the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/setBeta | Sets the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}. |
/setCaseValue | Sets the value of this continuous chance node to {value} in case {c}. |
/setGamma | Sets the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}. |
/unsetCase | Specifies that the value of this continuous chance or discrete node is “unknown” for case {caseindex}. |
/computeSensitivityData | Computes the constants of the sensitivity functions for the specified output probability and all CPT/policy parameters in the network. |
/getFadingTable | Returns the fading table of this discrete chance node. |
/hasFadingTable | Returns true if this discrete chance node has a fading table; returns false otherwise. |
/getRequisiteAncestors | Returns a white-space separated list of URI references to the requisite ancestors of this decision node. |
/getRequisiteParents | Returns a white-space separated list of URI references to the requisite parents of this decision node. |
/enterFinding | Specifies a finding value for a given state with all other states unaffected. |
/generateTable | Generates the table of this discrete node from its model (a missing model will trigger an error). |
/getCaseState | Returns the state of this discrete node for case {c}. |
/getEnteredFinding | Returns the entered finding for the specified state of this node. |
/getEntropy | Computes the entropy of this node. |
/getMutualInformation | Computes the mutual information between this node and the specified node. |
/getPropagatedFinding | Returns the propagated finding. |
/getSampledState | Returns the state index of this discrete node for the configuration generated by the most recent call to DomainResource -> /simulate. |
/getSensitivityConstants | Returns the four constants of the specified sensitivity function. |
/getSensitivityConstantsByOutput | Returns the four constants of the specified sensitivity function. |
/setCaseState | Sets the state of this discrete node to {state} in case {c}. |
/getStateIndexFromLabel | Returns the index of the state matching the specified {label}. |
/computeExplanationData | Computes Bayes factor data for all (nonempty) subsets of evidence nodes up to the specified maximum size. |
/computeExplanationData2 | Computes “normalized likelihoods” for the specified hypothesis and all (nonempty) subsets of evidence nodes up to the specified maximum size. |
/addToInputs | Makes this <NodeResoruce> become an input node of its ClassResource. |
/addToOutputs | Makes this NodeResource become an output node of its ClassResource. |
/createTemporalClone | Constructs a temporal clone of this NodeResource. |
/getHome | Returns the ClassResource or DomainResource containing this NodeResource. |
/getHomeClass | Returns the ClassResource containing this NodeResource. |
/getInstance | Returns the instance NodeResource containing this (cloned) output node. |
/getMaster | Returns the “master” of this (cloned) output NodeResource of an instance node (i.e., the node cloned to get this output node). |
/getSource | Get a list of NodeResources of ClassResource nodes that identifies this DomainResource node. |
/getTemporalClone | Get the “temporal clone” of this NodeResource. |
/getTemporalMaster | Get the “temporal master” of this NodeResource. |
/removeFromInputs | Removes this NodeResource from the set of input nodes of its class. |
/removeFromOutputs | Removes this NodeResource from the set of output nodes of its class. |
Gets the ModelResource for this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getModel
200 OK
/rest/domain/{ID}/model/{ID}
Returns the name of this NodeResource. If this node has not previously been assigned a name, a valid name will automatically be assigned.
GET /rest/domain/{ID}/node/{ID}/getName
200 OK
{node name string}
Sets the name of this NodeResource. The name must be valid, i.e., it must follow the rules that govern the validity of C identifiers, and no other NodeResource in the DomainResource to which this node belongs must have the same name.
POST /rest/domain/{ID}/node/{ID}/setName
{name} | a string containing the new name of the NodeResource |
={name}
200 OK
Returns the position of this NodeResource on the X-axis.
GET /rest/domain/{ID}/node/{ID}/getPositionX
200 OK
{integer}
Returns the position of this NodeResource on the Y-axis.
GET /rest/domain/{ID}/node/{ID}/getPositionY
200 OK
{integer}
Sets the position of this NodeResource.
POST /rest/domain/{ID}/node/{ID}/setPosition
{X} | the position on the X-axis (an integer) |
{Y} | the position on the Y-axis (an integer) |
={X}&={Y}
200 OK
Sets the number of states of this NodeResource. Notice: Only possible for discrete nodes.
POST /rest/domain/{ID}/node/{ID}/setNumberOfStates
{stateCount} | the number of states. |
={stateCount}
200 OK
Get the number of states of this discrete node. The states are numbered from 0 to N-1, where N is the number of states of the node. Notice: Only possible for discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getNumberOfStates
200 OK
{number of states}
The returned integer {number of states} is the number of states of this discrete node.
Sets the label of the specified state. Notice: Only possible for discrete nodes.
POST /rest/domain/{ID}/node/{ID}/setStateLabel
{state} | the index (a nonnegative integer) of the state; must be less than the number of states of the node. |
{newLabel} | the desired state label. |
={state}&={newLabel}
200 OK
Gets the label of the specified state. Notice: Only possible for discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getStateLabel?={state}
{state} | the index (a nonnegative integer) of the state; must be less than the number of states of the node. |
200 OK
{state label}
The returned string {state label} is the state label for the specified state.
Gets the TableResource associated with this NodeResource. If the node is a discrete chance node, the table is the conditional probability table for the node given its parents. If the node is a utility node, the table represents a utility function of the parents of the node. An URI reference to the TableResource is returned.
GET /rest/domain/{ID}/node/{ID}/getTable
200 OK
/rest/domain/{ID}/table/{ID}
Gets the belief for the specified state of this NodeResource. Note that if findings have been entered since the most recent propagation, the beliefs returned may not be up-to-date. Notice: Only possible for discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getBelief?={state}
{state} | an integer value representing which state to examine. |
200 OK
{real number}
The returned {real number} is the belief for the examined state.
Returns the predicted belief for the specified state of this discrete NodeResource at the specified time point. This method accesses the predictions computed by a previous call to DomainResource -> /computeDBNPredictions.
GET /rest/domain/{ID}/node/{ID}/getPredictedBelief?={state}&={time}
{state} | an integer value representing which state to examine. |
{time} | time slice index (a nonnegative integer less than the number of predicted time slices) |
200 OK
{real number}
The returned {real number} is the predicted belief for the examined state at the target time slice.
Get list of parent nodes for this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getParents
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all parent NodeResources of this NodeResource.
Get list of child nodes for this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getChildren
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all child NodeResources of this NodeResource.
Adds a NodeResource as a new parent of this NodeResource. That is, it adds a directed link from the new parent to this node.
POST /rest/domain/{ID}/node/{ID}/addParent
{Node_URI} | URI reference to a NodeResource. |
={Node_URI}
200 OK
Selects the specified state of this NodeResource. This is equivalent to specifying the finding value 1 for the specified state and 0 for all other states. Notice: Only possible for discrete nodes.
POST /rest/domain/{ID}/node/{ID}/selectState
{state} | an integer value representing which state to select. |
={state}
200 OK
Gets (the index of) the selected state of this node. If no state is selected, a negative index is returned. Notice: Only possible for discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getSelectedState
200 OK
{integer}
Returned {integer} is index of selected state; {integer} is negative if no state is selected.
Retracts all findings for this NodeResource. For discrete nodes this is equivalent to setting the finding value to 1 for all states of this node.
Notice: Only possible for discrete and continuous nodes.
POST /rest/domain/{ID}/node/{ID}/retractFindings
200 OK
Gets the expected utility associated with this utility node or specified action of this discrete decision node. This is the utility value computed by the most recent inference operation. Notice: Only possible for utility and discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getExpectedUtility?=-1
GET /rest/domain/{ID}/node/{ID}/getExpectedUtility?={state}
{state} | an integer value designating which state of the discrete decision node to examine. Notice: provide a negative {state} when examining utility nodes. |
200 OK
{real number}
The returned {real number} is utility for the requested state {state} of this discrete node, or the utility associated with this utility node.
Returns the sampled utility associated with this utility node. This is the utility value sampled by the most recent call to DomainResource -> /simulate. Notice: Only possible for utility nodes.
GET /rest/domain/{ID}/node/{ID}/getSampledUtility
200 OK
{real number}
The returned {real number} is the sampled utility associated for this utility node.
Gets the value of this FunctionNode. The value is computed using the function associated with the node. If the function refers to other nodes, then the values of those nodes are derived from the results of the most recent inference operation. Notice: Only possible for function nodes.
GET /rest/domain/{ID}/node/{ID}/getValue
200 OK
{real number}
The returned {real number} is computed using the function associated with the node.
Gets the predicted value of this FunctionNode at the specified time point. This method accesses the predictions computed by a previous call to DomainResource -> /computeDBNPredictions. Notice: Only possible for function nodes.
{time} | time slice index (a nonnegative integer less than the number of predicted time slices) |
GET /rest/domain/{ID}/node/{ID}/getPredictedValue?={time}
200 OK
{real number}
The returned {real number} is predicted value at the specified time point.
Sets the function associated with this function node to a number value. This is equivalent to retrieving the model and modifying the expression manually. Notice: Only possible for function nodes that have no model nodes. Furthermore the domain MUST be in a compiled state and an equilibrium, and tables MUST be up to date.
POST /rest/domain/{ID}/node/{ID}/setValue
{real number} | a real number representing a fixed value function to use as the new function for this function node. |
={real number}
200 OK
Test if the evidence potential, currently registered with this NodeResource, is non-vacuous.
GET /rest/domain/{ID}/node/{ID}/evidenceIsEntered
200 OK
{true or false}
Returned {true or false} is true if the evidence potential, currently registered with this NodeResource, is non-vacuous; otherwise, false.
Get the index of the state matching the specified value. If there is no (unique) state with the specified state value, -1 is returned. Notice: Only possible for numbered and interval discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getStateIndex?={real number}
{real number} | a state containing this value will be searched for. |
200 OK
{integer}
Returned {integer} is index of the state matching the specified value.
Gets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. For interval nodes, to indicate the right endpoint of the rightmost interval, specify {state} equal to the number of states of this interval node. Notice: Only possible for numbered and interval discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getStateValue?={state}
{state} | the index (a nonnegative integer) of the state; must be less than the number of states of the node. |
200 OK
{real number}
Returned {real number} is the index of the state containing the specified value.
Sets the value associated with a particular state of this numbered node or the low value of the interval associated with a particular state of this interval node. For interval nodes, to indicate the right endpoint of the rightmost interval, specify {state} equal to the number of states of this interval node. Notice: Only possible for numbered and interval discrete nodes.
POST /rest/domain/{ID}/node/{ID}/setStateValue
{state} | the index (a nonnegative integer) of the state; must be less than the number of states of the node. |
{value} | the value to set (a real number). |
={state}&={value}
200 OK
Returns the evidence (value) entered for this continuous chance node. If no value has been entered, an error is returned. Notice: Only possible for continuous nodes.
GET /rest/domain/{ID}/node/{ID}/getEnteredValue
200 OK
{real number}
Returned {real number} express the value entered.
Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is non-vacuous; otherwise, returns false.
GET /rest/domain/{ID}/node/{ID}/evidenceIsPropagated
200 OK
{true or false}
Returned {true or false} is true if evidence for this NodeResource has been propagated; otherwise, false.
Returns true if the entered and the propagated evidence differ; otherwise, returns false.
GET /rest/domain/{ID}/node/{ID}/evidenceToPropagate
200 OK
{true or false}
Returned {true or false} is true if evidence has been entered since the last propagation; otherwise, false.
Returns an attribute value. That is, the value associated with a key in the attribute list for this NodeResource.
{key} | the key for which the attribute value is returned |
GET /rest/domain/{ID}/node/{ID}/getAttribute?={key}
200 OK
...
The attribute value associated with the {key}.
Returns the category of this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getCategory
200 OK
{category}
Returned {category} is the category of this NodeResource. Possible values for {category} are
Returns the constraint between this and node.
{Node_URI} | URI reference to a NodeResource. |
GET /rest/domain/{ID}/node/{ID}/getEdgeConstraint?={Node_URI}
200 OK
{constraint}
Possible values for {constraint} are
Returns the DomainResource containing this NodeResource. Returns null if the node belongs to a class.
GET /rest/domain/{ID}/node/{ID}/getHomeDomain
200 OK
/rest/domain/{ID}
An URI reference to the DomainResource is returned.
Returns the JunctionTreeResource to which this NodeResource belongs.
GET /rest/domain/{ID}/node/{ID}/getJunctionTree
200 OK
/rest/domain/{ID}/junctiontree/{ID}
An URI reference to a JunctionTreeResource is returned.
Returns the kind of this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getKind
200 OK
{kind}
Possible values for {kind} are
Returns the subtype of this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getSubtype
200 OK
{subtype}
Possible values for {subtype} are
Returns the label of this NodeResource.
GET /rest/domain/{ID}/node/{ID}/getLabel
200 OK
{label}
Returned {label} is the node label for this NodeResource.
Returns true if the evidence potential for this NodeResource, incorporated within the current junction tree potentials, is a likelihood; otherwise, returns false.
GET /rest/domain/{ID}/node/{ID}/likelihoodIsPropagated
200 OK
{true or false}
Returned {true or false} is true or false.
Returns true if the evidence potential, currently registered with this NodeResource, is a likelihood; otherwise, returns false.
GET /rest/domain/{ID}/node/{ID}/likelihoodIsEntered
200 OK
{true or false}
Returned {true or false} is true or false.
Removes the directed link between a parent and this NodeResource. The table (if any) of the NodeResource will be updated such that the updated table will be the portion of the old table that corresponds to the parent being in its first state.
{Node_URI} | URI reference to a NodeResource. |
POST /rest/domain/{ID}/node/{ID}/removeParent
={Node_URI}
200 OK
Reverses the edge between this NodeResource and the specified neighbor. Both nodes must be chance nodes, and they must be of the same kind (that is, both nodes are discrete or both nodes are continuous).
{Node_URI} | URI reference to a neighboring NodeResource. |
POST /rest/domain/{ID}/node/{ID}/reverseEdge
={Node_URI}
200 OK
Sets a value for a particular attribute in the attribute list for this NodeResource. If no value is provided, the attribute is removed.
{key} | The key identifying the attribute to be updated. |
{value} | The value of the attribute. |
POST /rest/domain/{ID}/node({ID}/setAttribute
={key}&={value}
200 OK
Sets a constraint between this NodeResource and another NodeResource.
{Node_URI} | URI reference to a NodeResource. |
{constraint} | the node constraint |
Possible values for {constraint} are
POST /rest/domain/{ID}/node/{ID}/setEdgeConstraint
={Node_URI}&={constraint}
200 OK
Sets the label of this NodeResource.
{label} | the label |
POST /rest/domain/{ID}/node({ID}/setLabel
={label}
200 OK
Replace the given parent node with the new node. The old and new parent must be compatible. That is, they must be of the same class, and have an identical state set.
{Old_Node_URI} | URI reference to NodeResource, (old parent). |
{New_Node_URI} | URI reference to NodeResource, (new parent). |
POST /rest/domain/{ID}/node/{ID}/reverseEdge
={Old_Node_URI}&={New_Node_URI}
200 OK
Returns true if a value has been set for this continuous chance or discrete node in case {caseindex}; otherwise, returns false.
Notice: Only possible for discrete and continuous nodes.
{caseindex} | the case index represented as an integer. |
GET /rest/domain/{ID}/node/{ID}/caseIsSet?={caseindex}
200 OK
{true or false}
Returned {true or false} is true or false.
Returns the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}.
{i} | the index of a discrete parent configuration. an integer. |
GET /rest/domain/{ID}/node/{ID}/getAlpha?={i}
200 OK
{real number}
Returned {real number} is the requested alpha component.
Returns the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}.
{parent} | URI reference to parent continuous chance NodeResource. |
{i} | the index of a discrete parent configuration. an integer. |
GET /rest/domain/{ID}/node/{ID}/getBeta?={parent}&={i}
200 OK
{real number}
Returned {real number} is the requested beta component.
Returns the value set for this continuous chance node in case {caseindex}.
{caseindex} | the case index. an integer. |
GET /rest/domain/{ID}/node/{ID}/getCaseValue?={caseindex}
200 OK
{real number}
Returned {real number} is the value set for case {caseindex}.
Returns the distribution for this continuous node. The distribution for a continuous chance node is in general a mixture of several Gaussian distributions. This method actually computes a joint distribution of this CG node and a set of discrete nodes. These discrete nodes are chosen such that the computed marginal is a strong marginal, but it is not necessarily minimal.
GET /rest/domain/{ID}/node/{ID}/getDistribution
200 OK
/rest/domain/{ID}/table/{ID}
An URI reference a TableResource.
Returns the experience table of this continuous or discrete chance node.
Notice: Only possible for discrete and continuous chance nodes.
GET /rest/domain/{ID}/node/{ID}/getExperienceTable
200 OK
/rest/domain/{ID}/table/{ID}
An URI reference a TableResource.
Returns the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}.
{i} | the index of a discrete parent configuration. an integer. |
GET /rest/domain/{ID}/node/{ID}/getGamma?={i}
200 OK
{real number}
Returned {real number} is the requested gamma component.
Returns the predicted mean of the marginal distribution of this continuous chance node at the specified time point. This method accesses the predictions computed by a previous call to DomainResource -> /computeDBNPredictions. Notice: Only possible for continuous nodes.
{time} | time slice index (a nonnegative integer less than the number of predicted time slices) |
GET /rest/domain/{ID}/node/{ID}/getPredictedMean?={time}
200 OK
{real number}
Returned {real number} is the predicted mean of the marginal distribution of this continuous chance node at the specified time point.
Retrieves the value that has been propagated for this continuous chance node. That is, the value incorporated in the current junction tree potentials as the state of this node.
GET /rest/domain/{ID}/node/{ID}/getPropagatedValue
200 OK
{real number}
Returned {real number} is the value that has been propagated for this continuous chance node.
Returns the value of this function or continuous chance node for the configuration generated by the most recent call to DomainResource -> /simulate.
Notice: Only possible for continuous and function nodes.
GET /rest/domain/{ID}/node/{ID}/getSampledValue
200 OK
{real number}
Returned {real number} the value of this function or continuous chance node for the configuration generated by the most recent call to DomainResource -> /simulate.
Returns the predicted variance of the marginal distribution of this continuous chance node at the specified time point. This method accesses the predictions computed by a previous call to DomainResource -> /computeDBNPredictions. Notice: Only possible for continuous nodes.
{time} | time slice index (a nonnegative integer less than the number of predicted time slices) |
GET /rest/domain/{ID}/node/{ID}/getPredictedVariance?=time
200 OK
{real number}
Returned {real number} the variance of the marginal distribution of this continuous chance node at specified time.
Returns true if this continuous or discrete chance node has an experience table; returns false otherwise.
Notice: Only possible for discrete and continuous chance nodes.
GET /rest/domain/{ID}/node/{ID}/hasExperienceTable
200 OK
{true or false}
Returned {true or false} is true or false.
Sets the alpha component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}.
{alpha} | the value of the alpha component. a real number. |
{i} | the index of a discrete parent configuration. an integer. |
POST /rest/domain/{ID}/node({ID}/setAlpha
={alpha}&={i}
200 OK
Sets the beta component of the CG distribution of this continuous chance node given a continuous parent and the discrete parent configuration corresponding to {i}.
{beta} | the value of the beta component. a real number. |
{parent} | URI reference to parent continuous chance NodeResource. |
{i} | the index of a discrete parent configuration. an integer. |
POST /rest/domain/{ID}/node({ID}/setBeta
={beta}&={parent}&={i}
200 OK
Sets the gamma component of the CG distribution of this continuous chance node given the discrete parent configuration corresponding to {i}.
{gamma} | the value of the gamma component. a real number. |
{i} | the index of a discrete parent configuration. an integer. |
POST /rest/domain/{ID}/node({ID}/setGamma
={gamma}&={i}
200 OK
Specifies that the value of this continuous chance or discrete node is “unknown” for case {caseindex}.
Notice: Only possible for discrete and continuous nodes.
{caseindex} | the case index represented as an integer. |
POST /rest/domain/{ID}/node/{ID}/unsetCase
={caseindex}
200 OK
Computes the constants of the sensitivity functions for the specified output probability and all CPT/policy parameters in the network.
This method simply calls NodeResource -> /computeSensitivityData with the specified output probability as argument.
Notice: Only possible for discrete chance nodes.
{state} | the index of a state of this node - the probability of this state is the desired output probability. |
POST /rest/domain/{ID}/node/{ID}/computeSensitivityData
={case}
200 OK
Returns the fading table of this discrete chance node.
Notice: Only possible for discrete chance nodes.
GET /rest/domain/{ID}/node/{ID}/getFadingTable
200 OK
/rest/domain/{ID}/table/{ID}
An URI reference a TableResource.
Returns a white-space separated list of URI references to the requisite ancestors of this decision node.
The requisite ancestors are found by augmenting the network with additional information links as prescribed by the “no-forgetting” rule (which states that past observations and decisions are taken into account by all future decisions) and applying the minimal reduction algorithm for LIMIDs.
Notice: Only possible for discrete decision nodes.
GET /rest/domain/{ID}/node/{ID}/getRequisiteAncestors
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to the set of requisite ancestor NodeResources.
Returns a white-space separated list of URI references to the requisite parents of this decision node.
Notice: Only possible for discrete decision nodes.
GET /rest/domain/{ID}/node/{ID}/getRequisiteParents
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to the set of requisite parent NodeResources.
Specifies a finding value for a given state with all other states unaffected.
Notice: Only possible for discrete nodes.
{state} | an integer representing the state to be selected. States are numbered consecutively from 0 and upwards. |
{finding} | A nonnegative real number as the finding value. |
POST /rest/domain/{ID}/node({ID}/enterFinding
={state}&={finding}
200 OK
Returns the state of this discrete node for case {c}.
Notice: Only possible for discrete nodes.
{c} | the case index (an integer in the range 0, ..., number of cases) |
GET /rest/domain/{ID}/node/{ID}/getCaseState?={c}
200 OK
{integer}
Returned {integer} is the state of this discrete node for case {c}.
Returns the entered finding for the specified state of this node.
Notice: Only possible for discrete nodes.
{state} | an integer value representing which state to examine. |
GET /rest/domain/{ID}/node/{ID}/getEnteredFinding?={state}
200 OK
{real number}
Returned {real number} is the entered finding for this discrete node in state {state}.
Computes the mutual information between this node and the specified node.
Notice: Only possible for discrete nodes.
{Node_URI} | URI reference to a NodeResource. |
GET /rest/domain/{ID}/node/{ID}/getMutualInformation?={Node_URI}
200 OK
{real number}
Returned {real number} is the mutual information.
Returns the propagated finding. That is, it returns the finding value incorporated within the current junction tree potentials for the specified {state} of this node.
Notice: Only possible for discrete nodes.
{state} | an integer representing the state to be examined. |
GET /rest/domain/{ID}/node/{ID}/getPropagatedFinding?={state}
200 OK
{real number}
Returned {real number} express the propagated finding.
Returns the state index of this discrete node for the configuration generated by the most recent call to DomainResource -> /simulate.
Notice: Only possible for discrete nodes.
GET /rest/domain/{ID}/node/{ID}/getSampledState
200 OK
{integer}
Returned {integer} is the state index.
Returns the four constants of the specified sensitivity function. The output probability of this function was specified in the preceding call to DomainResource -> /computeSensitivityData. If the results produced by that call have been invalidated, an error is returned.
Notice: Only possible for discrete nodes.
{input} | specifies a conditional probability (or policy) parameter of this node (i.e., input is the index of an entry in the CPT/policy of this node). An integer. |
GET /rest/domain/{ID}/node/{ID}/getSensitivityConstants?={input}
200 OK
{real number} {real number} {real number} {real number}
Response is a white-space separated list of four real numbers | the four constants of the specified sensitivity function. |
Returns the four constants of the specified sensitivity function. The output probability of this function must be one of the output probabilities specified in the preceding call to DomainResource -> /computeSensitivityData. If the results produced by that call have been invalidated, an error is returned.
Notice: Only possible for discrete nodes.
{input} | specifies a conditional probability (or policy) parameter of this node (i.e., input is the index of an entry in the CPT/policy of this node). An integer. |
{output} | identifies one of the output probabilities specified in the call to DomainResource -> /computeSensitivityData. An integer. |
GET /rest/domain/{ID}/node/{ID}/getSensitivityConstantsByOutput?={input}&={output}
200 OK
{real number} {real number} {real number} {real number}
Response is a white-space separated list of four real numbers | the four constants of the specified sensitivity function. |
Sets the state of this discrete node to {state} in case {c}.
Notice: Only possible for discrete nodes.
{c} | the case index represented as an integer. |
{state} | the state represented as an integer. |
POST /rest/domain/{ID}/node/{ID}/setCaseState
={c}&={state}
200 OK
Returns the index of the state matching the specified {label}. If there is no (unique) state with the specified state label, -1 is returned.
Notice: Only possible for discrete nodes.
{label} | the state label to search for |
GET /rest/domain/{ID}/node/{ID}/getStateIndexFromLabel?={label}
200 OK
{integer}
Returned {integer} is a state index.
Computes Bayes factor data for all (nonempty) subsets of evidence nodes up to the specified maximum size. Two hypotheses are compared: (this node)=x and Y=y. For each subset of evidence nodes (up to the specified maximum size), the Bayes factor (the support for the first hypothesis relative to the second hypothesis) is computed. The results of the computations can be accessed using DomainResource -> /getExplanation and DomainResource -> /getExplanationScore.
Notice: Only possible for discrete nodes.
{x} | state of the primary hypothesis node (this node) |
{Y} | the alternative hypothesis node |
{y} | state of the alternative hypothesis node |
{maxSubsetSize} | data for all subsets of evidence nodes up to this size are computed |
POST /rest/domain/{ID}/node/{ID}/computeExplanationData
={x}&={Y}&={y}&={maxSubsetSize}
200 OK
Computes “normalized likelihoods” for the specified hypothesis and all (nonempty) subsets of evidence nodes up to the specified maximum size. For each subset of evidence nodes (up to the specified maximum size), the normalized likelihood of the hypothesis is computed. The results of the computations can be accessed using DomainResource -> /getExplanation and DomainResource -> /getExplanationScore.
Notice: Only possible for discrete nodes.
{x} | state of the hypothesis node (this node) |
{maxSubsetSize} | data for all subsets of evidence nodes up to this size are computed |
POST /rest/domain/{ID}/node/{ID}/computeExplanationData2
={x}&={maxSubsetSize}
200 OK
Makes this <NodeResoruce> become an input node of its ClassResource. The node must not already be an input or output node of its class, it must not be an output clone associated with an instancenode, and, most importantly, it must not have parents.
Notice: Only possible for nodes of a ClassResource.
POST /rest/cc/{ID}/class/{ID}/node/{ID}/addToInputs
200 OK
Makes this NodeResource become an output node of its ClassResource. The node must not already be an output or input node of its class.
Notice: Only possible for nodes of a ClassResource.
POST /rest/cc/{ID}/class/{ID}/node/{ID}/addToOutputs
200 OK
Constructs a temporal clone of this NodeResource. This node (known as the “master” node) must not be an instance node, or a temporal or an output clone, and the node must belong to a class without input and output nodes. Moreover, this class must not be instantiated. Only one temporal clone can be created for each master node.
Notice: Only possible for nodes of a ClassResource.
POST /rest/cc/{ID}/class/{ID}/node/{ID}/createTemporalClone
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Returns the ClassResource or DomainResource containing this NodeResource.
POST /rest/cc/{ID}/class/{ID}/node/{ID}/getHome
POST /rest/domain/{ID}/node/{ID}/getHome
200 OK
{domain-or-class-URI}
Returned {domain-or-class-URI} is either a DomainResource URI or a ClassResource URI.
Returns the ClassResource containing this NodeResource. If node is not a class node an error is returned.
GET /rest/cc/{ID}/class/{ID}/node/{ID}/getHomeClass
GET /rest/domain/{ID}/node/{ID}/getHomeClass
200 OK
/rest/cc/{ID}/class/{ID}
Returns the instance NodeResource containing this (cloned) output node. Or an error if this is not an output node. Note that we clone all output nodes when we create an instance node. This is done in order to make it possible to specify conditional probability tables involving output nodes from instance nodes.
Notice: Only possible for nodes of a ClassResource.
GET /rest/cc/{ID}/class/{ID}/node/{ID}/getInstance
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Returns the “master” of this (cloned) output NodeResource of an instance node (i.e., the node cloned to get this output node). Or an error if node is not cloned output. Note that “master” belongs to another ClassResource. Note also that we clone all output nodes when we create an instance node. This is done in order to make it possible to specify conditional probability tables involving output nodes from instance nodes.
Notice: Only possible for nodes of a ClassResource.
GET /rest/cc/{ID}/class/{ID}/node/{ID}/getMaster
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Get a list of NodeResources of ClassResource nodes that identifies this DomainResource node.
The ClassResource -> /createDomain method of the ClassResource unfolds an object-oriented (nested) specification of a Bayesian network or a LIMID into a regular DomainResource.
NodeResources in this DomainResource which originates from nodes residing in nested sub-networks (via instance nodes) can be uniquely related to a sequence of instance node NodeResources and an ordinary NodeResource of the object-oriented network.
Notice: Only possible for nodes of a DomainResource.
GET /rest/domain/{ID}/node/{ID}/getSource
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} /rest/cc/{ID}/class/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to NodeResources. An ordered list with the instance nodes and the ordinary node identifying the source of this node that must belong to a domain.
Get the “temporal clone” of this NodeResource. Or an error if node if not temporal master.
Notice: Only possible for nodes of a ClassResource.
GET /rest/cc/{ID}/class/{ID}/node/{ID}/getTemporalClone
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Get the “temporal master” of this NodeResource. If this NodeResource is not a temporal clone an error is returned.
Notice: Only possible for nodes of a ClassResource.
GET /rest/cc/{ID}/class/{ID}/node/{ID}/getTemporalMaster
200 OK
/rest/cc/{ID}/class/{ID}/node/{ID}
Removes this NodeResource from the set of input nodes of its class.
Notice: Only possible for nodes of a ClassResource.
POST /rest/class/{ID}/node/{ID}/removeFromInputs
200 OK
Removes this NodeResource from the set of output nodes of its class.
Notice: Only possible for nodes of a ClassResource.
POST /rest/cc/{ID}/class/{ID}/node/{ID}/removeFromOutputs
200 OK
Hugin uses tables for representing the conditional probability and utility potentials of individual nodes, the probability and utility potentials on separators and cliques of junction trees, evidence potentials, etc. A potential is a function from the state space of a set of variables into the set of real numbers. A TableResource is a representation of a potential.
TableResources are acquired using the NodeResource -> /getTable function.
/rest/domain/{ID}/table/{ID}
Functions | |
/delete | Deletes this TableResource. |
/getSize | Get the size of this TableResource. |
/getNodes | Get all NodeResources associated with this TableResource. |
/getDataItem | Get the data item at position {index} of the discrete data of this TableResource. |
/setDataItem | Sets a specific data item of the discrete data of this TableResource. |
/setData | Sets a region of the discrete data of this TableResource. |
/getData | Gets a region of the discrete data of this TableResource. |
/getMean | Returns the mean of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource. |
/getVariance | Returns the variance of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource. |
/getCovariance | Returns the covariance of a pair of continuous chance NodeResources given a configuration of the discrete chance NodeResources of this TableResource. |
/computeProbabilityOfInterval | Computes the probability of the given interval for the mixture distribution represented by this TableResource. |
/reorderNodes | Reorders the list of NodeResource of this TableResource. |
/getCGSize | Returns the CG size of this TableResource. |
/setAllDataItems | Sets all data items of the discrete data of this TableResource. |
Get the size of this TableResource.
GET /rest/domain/{ID}/table/{ID}/getSize
200 OK
{integer}
Returned {integer} is the size of TableResource.
Get all NodeResources associated with this TableResource.
GET /rest/domain/{ID}/table/{ID}/getNodes
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all NodeResources associated with this this TableResource.
Get the data item at position {index} of the discrete data of this TableResource. The index is interpreted as the index of a one-dimensional row-major representation of the actual multi-dimensional data.
GET /rest/domain/{ID}/table/{ID}/getDataItem?={index}
{index} | the index of the data item |
200 OK
{real number}
Returned {real number} is the data item at index {index} of this table.
Sets a specific data item of the discrete data of this TableResource.
POST /rest/domain/{ID}/table/{ID}/setDataItem
{index} | index of the data item to set |
{value} | real number; the new value of the data item at the specified index. |
={index}&={value}
200 OK
Sets a region of the discrete data of this TableResource. The region is specified by a start position and a list of real number elements to set.
The indexes {startIndex}, ..., {startIndex}+(number of elements in {data}) must be valid indexes of this table.
POST /rest/domain/{ID}/table/{ID}/setData
{startIndex} | index of the first element to be set |
{data} | white-space separated list of {real numbers} to be written to this table. |
={startIndex}&={data}
200 OK
Gets a region of the discrete data of this TableResource. The region is specified by a start position and the number of elements to copy.
The indexes {startIndex}, ..., {startIndex}+{count}-1 must be valid indexes of this table.
GET /rest/domain/{ID}/table/{ID}/getData?={startIndex}&={count}
{startIndex} | index of the first element to get |
{count} | number of elemets to retrieve |
200 OK
{real number} {real number} {real number} ...
Response is a white-space separated list of real numbers representing the requested data items.
Returns the mean of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource.
GET /rest/domain/{ID}/table/{ID}/getMean?={index}&={node}
{index} | the index of the discrete configuration. |
{node} | URI reference to the continuous chance NodeResource in question. |
200 OK
{real number}
Returned {real number} is the requested mean value.
Returns the variance of a continuous chance NodeResource given a configuration of the discrete chance NodeResources of this TableResource.
GET /rest/domain/{ID}/table/{ID}/getVariance?={index}&={node}
{index} | the index of the discrete configuration. |
{node} | URI reference to the continuous chance NodeResource in question. |
200 OK
{real number}
Returned {real number} is the requested variance value.
Returns the covariance of a pair of continuous chance NodeResources given a configuration of the discrete chance NodeResources of this TableResource.
GET /rest/domain/{ID}/table/{ID}/getCovariance?={index}&={node1}&={node2}
{index} | the index of the discrete configuration. |
{node1} | URI reference to one of the continuous chance NodeResource in question. |
{node2} | URI reference to the other continuous chance NodeResource in question. |
200 OK
{real number}
Returned {real number} is the requested covariance value.
Computes the probability of the given interval for the mixture distribution represented by this TableResource.
GET /rest/domain/{ID}/table/{ID}/computeProbabilityOfInterval?={x}&={y}
{x} | the left endpoint of the interval. |
{y} | the right endpoint of the interval. |
200 OK
{real number}
Returned {real number} is the requested probability value.
Reorders the list of NodeResource of this TableResource.
POST /rest/domain/{ID}/table/{ID}/reorderNodes
{nodes} | the new order (which must be a permutation of the current order) of the NodeResources of this TableResource; a white-space separated list of URI references to NodeResources. |
={nodes}
200 OK
Returns the CG size of this TableResource. This is the number of CG data elements stored in the table.
GET /rest/domain/{ID}/table/{ID}/getCGSize
200 OK
{integer}
Returned {integer} is the number of CG data elements stored in the table.
Sets all data items of the discrete data of this TableResource.
POST /rest/domain/{ID}/table/{ID}/setAllDataItems
{value} | real number |
={value}
200 OK
A Model is a compact description of a table. A model consists of a list of discrete nodes and a set of expressions (one expression per configuration of states of the nodes.
ModelResources are created using DomainResource -> /getNewModel and acquired from nodes using the NodeResource -> /getModel function.
/rest/domain/{ID}/model/{ID}
Functions | |
/delete | Deletes this ModelResource. |
/setExpression | Associates an expression (specified as a string) with a specific configuration of the NodeResources of this ModelResource. |
/getExpression | Returns the expression (as a string) associated with a specific configuration of the NodeResources of this ModelResource. |
/setNumberOfSamplesPerInterval | Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents. |
/getNumberOfSamplesPerInterval | Gets the number of values per interval used when generating the conditional probability table for a node with interval parents. |
/getSize | Returns the number of configurations of the NodeResources of this ModelResource. |
/getNodes | Returns the list of NodeResources in this ModelResource. |
Associates an expression (specified as a string) with a specific configuration of the NodeResources of this ModelResource.
{index} | index of configuration |
{expression} | the expression as a string |
POST /rest/domain/{ID}/model/{ID}/setExpression
={index}&={expression}
200 OK
Returns the expression (as a string) associated with a specific configuration of the NodeResources of this ModelResource.
{index} | index of configuration |
GET /rest/domain/{ID}/model/{ID}/getExpression?={index}
200 OK
{expression as string}
Returned {expression as string} is a string representation of the expression associated with configuration {index} of the NodeResources of this ModelResource.
Sets the number of values taken within each bounded interval of an interval parent when generating the conditional probability table for a node with interval parents.
When generating the conditional probability table for a node with interval nodes as parents, a number of values are taken within each bounded interval of an interval parent. By default, the interval is divided into 25 subintervals, and the midpoints of these subintervals are then used in the computation of the value of the child.
{count} | the number of subintervals (an integer). |
POST /rest/domain/{ID}/model/{ID}/setNumberOfSamplesPerInterval
={count}
200 OK
Gets the number of values per interval used when generating the conditional probability table for a node with interval parents.
GET /rest/domain/{ID}/model/{ID}/getNumberOfSamplesPerInterval
200 OK
{integer}
Returned {integer} is the requested number of samples per interval.
Returns the number of configurations of the NodeResources of this ModelResource.
GET /rest/domain/{ID}/model/{ID}/getSize
200 OK
{integer}
Returned {integer} is the the number of configurations of the nodes of this model.
Returns the list of NodeResources in this ModelResource.
GET /rest/domain/{ID}/model/{ID}/getNodes
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all NodeResources in this this ModelResource.
CliqueResources represents the cliques in the junction tree.
CliqueResources are acquired using JunctionTreeResource -> /getCliques, JunctionTreeResource -> /getRoot and CliqueResource -> /getNeighbors functions. JunctionTreeResources are acquired using the DomainResource -> /getJunctionTrees function.
/rest/domain/{ID}/clique/{ID}
Functions | |
/getJunctionTree | Get the JunctionTreeResource to which this CliqueResource belongs. |
/getMembers | Get the list of NodeResources that are members of this CliqueResource. |
/getNeighbors | Returns a list of CliqueResources that are neighbors of this CliqueResource. |
Get the JunctionTreeResource to which this CliqueResource belongs.
GET /rest/domain/{ID}/clique/{ID}/getJunctionTree
200 OK
/rest/domain/{ID}/junctiontree/{ID}
Get the list of NodeResources that are members of this CliqueResource.
GET /rest/domain/{ID}/clique/{ID}/getMembers
200 OK
/rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} /rest/domain/{ID}/node/{ID} ...
Response is a white-space separated list of URI references to all member NodeResources of this CliqueResource.
Returns a list of CliqueResources that are neighbors of this CliqueResource.
GET /rest/domain/{ID}/clique/{ID}/getNeighbors
200 OK
/rest/domain/{ID}/clique/{ID} /rest/domain/{ID}/clique/{ID} /rest/domain/{ID}/clique/{ID} ...
Response is a white-space separated list of URI references to CliqueResource.
JunctionTreeResources represents the junction trees in the compiled domain.
JunctionTreeResources are acquired using the DomainResource -> /getJunctionTrees function.
/rest/domain/{ID}/junctiontree/{ID}
Functions | |
/cgEvidenceIsPropagated | Returns true if CG evidence has been propagated in this junction tree; otherwise, returns false. |
/equilibriumIs | Tests the Equilibrium type. |
/evidenceIsPropagated | Tests if evidence has been propagated for this JunctionTreeResource. |
/evidenceModeIs | Tests if the EvidenceMode matches {mode}. |
/evidenceToPropagate | Tests if evidence has been entered since the last propagation. |
/getCliques | Returns the list of CliqueResources in this JunctionTreeResource. |
/getConflict | Returns the conflict measure of the data inserted in this JunctionTreeResource. |
/getRoot | Returns the root CliqueResource of this JunctionTreeResource. |
/getTotalCGSize | Returns the total number of CG table entries for this JunctionTreeResource. |
/getTotalSize | Returns the total number of discrete table configurations for this JunctionTreeResource. |
/likelihoodIsPropagated | Returns true if likelihoods have been propagated in this JunctionTreeResource; otherwise, returns false. |
/tablesToPropagate | Returns true if this JunctionTreeResource contains updated tables that have not been propagated; otherwise, returns false. |
/propagate | Propagates evidence in this JunctionTreeResource. |
Returns true if CG evidence has been propagated in this junction tree; otherwise, returns false.
GET /rest/domain/{ID}/junctiontree/{ID}/cgEvidenceIsPropagated
200 OK
{true or false}
Returned {true or false} is true if CG evidence has been propagated in this JunctionTreeResource; otherwise false.
Tests the Equilibrium type. Returns true if the equilibrium of this JunctionTreeResource can be obtained through a propagation using {equilibrium} as the Equilibrium type; otherwise, returns false.
{equilibrium} | the type of Equilibrium to test for. |
GET /rest/domain/{ID}/junctiontree/{ID}/equilibriumIs?={equilibrium}
200 OK
{true or false}
Returned {true or false} is true if the equilibrium of this JunctionTreeResource can be obtained through a propagation using {equilibrium} as the Equilibrium type; otherwise false.
Tests if evidence has been propagated for this JunctionTreeResource.
GET /rest/domain/{ID}/junctiontree/{ID}/evidenceIsPropagated
200 OK
{true or false}
Returned {true or false} is true if evidence has been propagated; otherwise, false.
Tests if the EvidenceMode matches {mode}.
{mode} | the type of EvidenceMode to test for. |
GET /rest/domain/{ID}/junctiontree/{ID}/evidenceModeIs?={mode}
200 OK
{true or false}
Returned {true or false} is true if the EvidenceMode matches {mode}; otherwise false.
Tests if evidence has been entered since the last propagation.
GET /rest/domain/{ID}/junctiontree/{ID}/evidenceToPropagate
200 OK
{true or false}
Returned {true or false} is true if evidence has been entered since the last propagation; otherwise, false.
Returns the list of CliqueResources in this JunctionTreeResource.
GET /rest/domain/{ID}/junctiontree/{ID}/getCliques
200 OK
/rest/domain/{ID}/clique/{ID} /rest/domain/{ID}/clique/{ID} /rest/domain/{ID}/clique/{ID} ...
Response is a white-space separated list of URI references to CliqueResource.
Returns the conflict measure of the data inserted in this JunctionTreeResource.
GET /rest/domain/{ID}/junctiontree/{ID}/getConflict
200 OK
{real number}
Returned {real number} is the conflict measure of the data inserted in JunctionTreeResource.
Returns the root CliqueResource of this JunctionTreeResource.
GET /rest/domain/{ID}/junctiontree/{ID}/getRoot
200 OK
/rest/domain/{ID}/clique/{ID}
Response is a URI reference to the root CliqueResource of this JunctionTreeResource.
Returns the total number of CG table entries for this JunctionTreeResource. Both clique and separator table entries are counted.
GET /rest/domain/{ID}/junctiontree/{ID}/getTotalCGSize
200 OK
{integer}
Returned {integer} is the total number of CG table entries for this JunctionTreeResource.
Returns the total number of discrete table configurations for this JunctionTreeResource. Both clique and separator table configurations are counted. Also, if the junction tree has utility potentials, then the clique and separator configurations will effectively be counted twice.
GET /rest/domain/{ID}/junctiontree/{ID}/getTotalSize
200 OK
{integer}
Returned {integer} is the total number of discrete table configurations for this JunctionTreeResource.
Returns true if likelihoods have been propagated in this JunctionTreeResource; otherwise, returns false.
GET /rest/domain/{ID}/junctiontree/{ID}/likelihoodIsPropagated
200 OK
{true or false}
Returned {true or false} is true if likelihoods have been propagated in this JunctionTreeResource; otherwise, false.
Returns true if this JunctionTreeResource contains updated tables that have not been propagated; otherwise, returns false.
GET /rest/domain/{ID}/junctiontree/{ID}/tablesToPropagate
200 OK
{true or false}
Returned {true or false} is true if this JunctionTreeResource contains updated tables that have not been propagated; otherwise, false.
Propagates evidence in this JunctionTreeResource.
POST /rest/domain/{ID}/junctiontree/{ID}/propagate
{equilibrium} | Equilibrium type. The normal Equilibrium type is sum. |
Possible values for {equilibrium} are
{evidenceMode} | EvidenceMode type. The normal EvidenceMode type is normal. |
Possible values for {evidenceMode} are
={equilibrium}&={evidenceMode}
200 OK
An instance of the DataSetResource represents a data set as a “matrix” with cases as rows and variables as columns.
A DataSetResource is instantiated using the Rest -> /loadDataSet or Rest -> /newDataSet functions.
/rest/dataset/{ID}
Functions | |
/delete | Deletes this DataSetResource. |
/keepAlive | Touch the DataSetResource to mark it as active in periods where no other functions are being called. |
/deleteColumn | Deletes the specified column from this DataSet. |
/deleteRow | Deletes the specified row from this DataSet. |
/getColumnName | Returns the name of the specified column of this DataSet. |
/getDataItem | Returns the data item at the specified location of this DataSet. |
/getNumberOfColumns | Returns the number of columns in this DataSet. |
/getNumberOfRows | Returns the number of rows in this DataSet. |
/moveColumn | Moves the specified column to a new position. |
/moveRow | Moves the specified row to a new position. |
/newColumn | Creates a new column in this DataSet. |
/newRow | Creates a new row in this DataSet. |
/setColumnName | Sets the name of the specified column of this DataSet. |
/setDataItem | Sets (or deletes) the data item at the specified location of this DataSet. |
/save | Submits this DataSetResource in the form of a CSV file to the service located at a target URL. |
/download | Get this DataSetResource in the form of a CSV file. |
Touch the DataSetResource to mark it as active in periods where no other functions are being called. This function must be invoked regularly in periods where no operations are being performed on the DataSetResource or any of the objects belonging to it, in order to signal the remote decision engine that the DataSetResource are still in use and not subject to garbage collection.
POST /rest/dataset/{ID}/keepAlive
200 OK
Moves the specified column to a new position. The columns between the old and the new column positions will be shifted one position to the left or to the right depending on the direction of the move.
POST /rest/dataset/{ID}/moveColumn
{column} | the index of the column to be moved |
{newColumn} | the index of the destination column |
={column}&={newColumn}
200 OK
Moves the specified row to a new position. The rows between the old and the new row positions will be shifted one position to the left or to the right depending on the direction of the move.
POST /rest/dataset/{ID}/moveRow
{row} | the index of the row to be moved. |
{newRow} | the index of the destination row. |
={row}&={newRow}
200 OK
Sets (or deletes) the data item at the specified location of this DataSet.
POST /rest/dataset/{ID}/setDataItem
{row} | the index of the row. |
{column} | the index of the column. |
{data} | the new data item (the empty string causes the item to be deleted). |
={row}&={column}&={data}
200 OK
Submits this DataSetResource in the form of a CSV file to the service located at a target URL.
POST /rest/dataset/{ID}/save
{URL} | the URL to submit CSV file |
{method} | the HTTP method to use: POST | PUT |
{delimiter} | CSV delimiter character |
={URL}&={method}&={delimiter}
200 OK
Get this DataSetResource in the form of a CSV file.
{delimiter} | CSV delimiter character |
{filename} | filename, used for setting the Content-Disposition filename header of response. |
GET /rest/dataset/{ID}/download?={delimiter}&={filename}
200 OK
[ ... raw CSV file contents ... ]