Restricting running time in SICStus Prolog - sicstus-prolog

Is it possible to restrict the running time of a query in SICStus Prolog?

You can use the time_out predicate :
http://www.sics.se/sicstus/docs/3.7.1/html/sicstus_42.html

Related

Solr as analytics reporting platform

I was trying to use Solr to develop a reporting platform. It is helping in merging data from all different sources and finally rich query API to create report. There are some analytical requirements too. Most of the cases are taken care of except two following scenarios
Pivoting + Range facets : Example use case : If we want to get number of US citizens, Non-US citizens visited europe each year. In collection there is flag USCitizen and date visitedOn.
Faceting on functional query value : If I have createdDate, closedDate. Then I calculate number of days between them using functions. On that calculated number of days value, would like to have faceting.
Any help with above two cases is really helpful to determine if Solr suites for the need.

Synonyms in Solr (query time vs index time)

What are the advantages of using synonyms at index time vs expanding at query time? In what case would you use both?
There's a very good write-up at http://nolanlawson.com/2012/10/31/better-synonym-handling-in-solr/ … I remembered that one, because I had the same question recently, and I found that via Google *wink wink*.
Basically, there's a huge difference between both, and you may need to use both in the end, depending on what you're trying to achieve.

Benchmark postgresql cluster (postgres-xc) using Daabase Test tool-2 (DBT2)

I'm trying to understand benchmark tool DBT2. I want to benchmark on postgres-xc, i could not get much information about how to set up the environment of postgres-xc for DBT2. I have got the DBT2 from the link
I have fixed some compilation issues. But i have not much idea on how to use this tool. Please provide some insights. I'm completely new o this. thanks!!
If you are unsure of how to use DBT-2, I would focus on just using it against PostgreSQL itself.
Once you are more familiar with it, you can try DBT-2. I have only run DBT-1 and DBT-3 against Postgres-XC and Postgres-XL.
Note that the DBT-1 version used in testing XC has the schema partitioned a certain way to reduce the amount of implicit two phase commits that you need to do. I have not looked at DBT-2, but you should select the hash distribution column carefully (CREATE TABLE .... DISTRIBUTE BY HASH(some_column)). Also, for tables that are fairly static, please add DISTRIBUTE BY REPLICATION to the CREATE TABLE statements.
If you do end up testing Postgres-XC or Postgres-XL, I would love to hear about your results.

Generating script for subset of the data

Is there a way I can use Generate and Publish Scripts to generate INSERTs for a subset of my data, e.g., requested > '2011-09-01' where requested is a field in my table?
You could consider the venerable sp_generate_inserts, which allows you to specify a filter condition using the #from parameter. The original version can be found at http://vyaskn.tripod.com/code/generate_inserts.txt, although it's not without (minor) bugs, there might be a better version of this by now, although I haven't come across one.

how to rank gene using information gain?

how gene ranking is done for microarray data using information gain and chi-square statistics ?? Please illustrate with a simple example..
You could use the open source machine learning software Weka. Load your dataset and go to "Select attribute" tab. Use the following attributes evaluators:
ChiSquaredAttributeEval : Evaluates the worth of an attribute by computing the value of the chi-squared statistic with respect to the class.
InfoGainAttributeEval : Evaluates the worth of an attribute by measuring the information gain with respect to the class.
..using Ranker in the "Search Method" . That way the attributes are ranked by their individual evaluations
I don't exactly understand your question, but a very successful package for analyzing microarray data can be found here:
BioConductor
This is a software project that has a variety of different modules for reading data from microarrays and performing statistical analysis. This is very useful, because the file formats for microarray data are constantly changing as the technology develops, and the algorithms for analyzing microarray data have advanced significantly as well.
you can use InfoGainAttributeEval for calculating Information gain
and for more information check this answer

Resources