Login or Sign Up
Know what you are looking for? Here are some quick links to the documentation contained in this page.
Algorithm Parameters Set Service Description The Lifemapper Algorithm Parameters Set Service allows users to get an algorithm parameters set, list sets that fit desired criteria, or post a new algorithm parameters set.

A Lifemapper algorithm object is an algorithm code and a group of parameters associated with that code. These values are passed into openModeller. OpenModeller generates a model by using the algorithm specified by the code and the parameters specified. An algorithm parameter set is an instance of an algorithm with a unique set of parameter values.
Getting a List of Algorithm Parameters If you call http://lifemapper.org/services/lm2/algoparams/xml with an HTTP GET request, a list of available algorithm parameters sets will be returned.

The items returned in this list can be filtered using a number of url parameters. A full list of the available filter parameters can be found in the Lifemapper web services WADL document. You can get an idea of how the parameters work by visiting the listing service with a web browser. A form will be presented at the top of the page that will allow you to filter the results as well as display the filters used to generate that page of results.

A common task is to list all available algorithms. The easiest way to do this is to filter the list of results returned to only those algorithm parameter sets that are the defaults for an algorithm. To do this, we will set the "paramsType" url parameter to "default". The following url will return the default algorithm parameter set for each available algorithm.

http://lifemapper.org/services/lm2/algoparams/xml?paramsType=default


A second common task would be to list all available algorithm parameter sets that use a particular algorithm. For this example, we will list all algorithm parameter sets for the GARP Best Subsets - openModeller implementation algorithm. For this exercise, you will need to know the code of the algorithm you want to find parameter sets. In our case, the algorithm code is "GARP_BS". The other possible values for algorithm code can be found when you return an algorithm parameters set object, or you can view all available under the "algorithmCode" query parameter documentation at: http://lifemapper.org/schemas/services.wadl#MethodAlgorithmParametersResourceListAlgorithmParameterSets .

After you have picked an algorithm, set the value of the "algorithmCode" url parameter to its code. Using GARP Best Subsets, our url will be:

http://lifemapper.org/services/lm2/algoparams/xml?algorithmCode=GARP_BS .

The result is a list of algorithm parameter sets belonging to the "lm2" user for the GARP Best Subsets (openModeller implementation) algorithm.

The list of algorithm parameter sets is available in a variety of formats.

Formats available:
Getting an Individual Algorithm Parameter Set You will need the algorithm parameter set id to return an individual algorithm parameter set. If you submitted an algorithm parameter set, you should have this number. You can also browse the list to find the algorithm parameter set you want and just click the link.

Get an Individual Algorithm Parameters Set Method explains in more detail how this service works.

Formats available:
Posting an algorithm parameter set When you submit an experiment through the experiment submission page. You actually have the opportunity to create an algorithm parameter set as well. After you select an algorithm, a list of parameters will appear. You can set these values to anything in a valid range (specified by each parameter). This group of values is an algorithm parameter set. If the combination of values you choose is new, an algorithm parameter set will be inserted. If the group of parameters already exists in the database then that parameter group will be used instead of creating a new one.

Additionally, you can post an algorithm parameter set directly.

Documentation for posting an algorithm parameter set for each algorithm can be found at:
You can either post an algorithm parameter set from url parameters or from the body of the post request. Here is an example of each method.

In each case, you will need to provide the algorithm code for the algorithm you wish to submit parameters for as well as each parameter that algorithm takes. The documentation for submitting each algorithm (listed above) will let you know what parameters to provide.

For this first example, we will post a Support Vector Machines algorithm parameter set via url parameters. For this algorithm, the code is "SVM" and it takes the following parameters ( parameter documentation can be found here):

  • coef0
  • cost
  • degree
  • gamma
  • kerneltype
  • nu
  • numberofpseudoabsences
  • probabilisticoutput
  • svmtype

After filling in the values, we have the following url:

http://lifemapper.org/services/anon/algoparams?algorithmCode=SVM&coef0=1.0&cost=0.004&degree=0&gamma=0.0&kerneltype=2&nu=0.001&numberofpseudoabsences=0&probabilisticoutput=1&svmtype=1

Sending an HTTP Post request to this url will post a new algorithm parameter set.

Please note the "anon" part of the url. This indicates the user that will own the new algorithm parameters set. If you already have a Lifemapper user account, you can use your own user id here. If you do not, or wish to make this parameters set public, use the Lifemapper anonymous account ("anon"). Anonymously posted items will be available to the public "lm2" user.



In the second example, we will post an Artificial Neural Networks algorithm parameters set from the body of a post request. The algorithm code for Artificial Neural Networks is "ANN" and the required parameters are:

  • choice
  • epoch
  • hiddenlayerneurons
  • learningrate
  • minimumerror
  • momentum

Now we will build our request. Note that the body of the request should follow the XML schema at: http://lifemapper.org/schemas/serviceRequest.xsd.

The resulting request body will be:
<?xml version="1.0" encoding="utf-8"?> <lm:request xmlns:lm="http://lifemapper.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lifemapper.org /schemas/serviceRequest.xsd"> <lm:algoParamsSet> <lm:algorithmCode>ANN</lm:algorithmCode> <lm:parameters> <lm:choice>0</lm:choice> <lm:epoch>10</lm:epoch> <lm:hiddenlayerneurons>10</lm:hiddenlayerneurons> <lm:learningrate>0.5</lm:learningrate> <lm:minimumerror>0.025</lm:minimumerror> <lm:momentum>0.5</lm:momentum> </lm:parameters> </lm:algoParamsSet> </lm:request>

Post this request to:

http://lifemapper.org/services/anon/algoparams/

and the response will be something like:
<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="/css/services.xsl"?> <lm:response xmlns:lm="http://lifemapper.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lifemapper.org /schemas/serviceResponse.xsd"> <lm:title>Added algorithm parameters</lm:title> <lm:user>lm2</lm:user> <lm:urls> <lm:url> http://lifemapper.org/services/anon/algoparams/637 </lm:url> </lm:urls> </lm:response>
The HTTP response code should be 201. If it is 400 check your request. If it is anything else, contact us at: lifemapper [at] ku [dot] edu for help.

When you read the response, note that the element in: lm:response/lm:urls/lm:url will contain a url pointing to your new algorithm parameter set. Keep note of the algorithm parameter set id which is the number listed at the end of the url. In this case, the algorithm parameters set id is 637.