[OTDev] Representing parameters with optional values ...

surajit ray mr.surajit.ray at gmail.com
Sat May 14 22:13:27 CEST 2011


Hi pantelis,



On 15 May 2011 01:15, chung <chvng at mail.ntua.gr> wrote:
> Hi surajit,
>    First of all I think it's impossible to have the XSD datatype there
> except if you declare it additionally. We can have a property that maps
> ot:Parameter-type individuals to XSD datatype URIs or we can subclass
> ot:Parameter and introduce ot:StringParameter etc. Instead, I would ask
> what is the purpose of having the datatype in there. And the answer is,
> to provide information to the client regarding the expected type for the
> particular parameter. This however can be retrieved by an OPTIONS on the
> resource  (see latest ontology update and specification for OPTIONS).
> We've already implemented this method for most of our resources.
> RDF-formatted OPTIONS can even lead to automatically generated web
> interfaces for web services!
>

Could not find any page on OPTIONS on opentox.org (I searched with
"options") . Could you point me to the right page ...

> Evaluated runtime is not a parameter in the OT sense as it is not
> something expected by the client as input. This can be assigned to your
> node using some other ontological property (e.g. ot:evaluatedRuntime) or
> you can include it only in HTML representations and not in RDF.

There are some parameters in SVM model making that can have a default
value based on the number of compounds or some other factor. However
the underlying software can take a value for that parameter. In that
case the evaluated value for the parameter is not used.


>
> Best regards,
> Pantelis
>
> On Sat, 2011-05-14 at 11:43 +0530, surajit ray wrote:
>
>> Hi Nina, All,
>>
>> For the algorithm API we have to attach parameters which are
>> represented with a scope, a default value (with type) , and the name
>> and description.
>>
>> However some parameters may not have a default value. For example if
>> the default value is a function of another set of parameters OR it is
>> evaluated runtime (although may be overriden by a fixed value by the
>> user). In such cases there will be no default value. In this case how
>> to we mention the XSD TYPE. (See the comented line below).
>>
>>
>>             Individual parameter31 =
>> jenaModel.createIndividual(OT.OTClass.Parameter.getOntClass(jenaModel));
>>             //parameter31.addLiteral(OT.paramValue,
>> jenaModel.createTypedLiteral("", XSDDatatype.XSDfloat));
>>             parameter31.addLiteral(OT.paramScope,
>> jenaModel.createTypedLiteral("optional", XSDDatatype.XSDstring));
>>             parameter31.addLiteral(DC.title,
>> jenaModel.createTypedLiteral("integer_float_cutoff",
>> XSDDatatype.XSDstring));
>>             parameter31.addLiteral(DC.description,
>> jenaModel.createTypedLiteral("If Integer or Float Feature what is the
>> cutoff ? Float value required ", XSDDatatype.XSDstring));
>>             MCSSFinder.addProperty(OT.parameters, parameter31);
>>
>>
>> To put it simply ...Since the type is associated in the declaration of
>> the default value, what is the mechanism to mention the type when
>> there is no default value ?
>>
>> Thanx
>> Surajit
>> _______________________________________________
>> Development mailing list
>> Development at opentox.org
>> http://www.opentox.org/mailman/listinfo/development
>>
>
>
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
>


Also I have a question about Model API. Should the ot:hasSource on it
should point to the task object that generated it ?
[The ot:hasSource for the task contains the algorithm that created it]

Regards
Surajit Ray



More information about the Development mailing list