Computing Percentages in SPARQL - aggregate

I have an ontology (called CODO) about patients of the Covid pandemic. One of our classes is a Cluster and each patient codo:isMemberOf one and only one Cluster. I want to compute the percentage of patients in each Cluster using SPARQL. Also, we have the inverse property as well codo:hasMember linking a Cluster to a Patient if that is easier to compute.

Related

Mean statistics about agents in Anylogic

I'm working on a family practitioner model, my goal is to model the population of a city and all of the family practitioners in that given city by taking into account the distribution of the treatment time and the arrival schedule of patients etc... So far i've managed to create an agent that contains a bloc diagram to model the whole process
With a source and a delay bloc to generate patients according to a fixed schedule, a service bloc and two sinks.
Now i've put a population of this agent "process" in the main and i've simulated the model for 3 months.
Lets say i've started with a population of 10 process which represents the number of practitioners. My goal now to to collect some Mean statistics, like the Mean number of treated patients (treated patients goes to the sink "Served") of the 10 practitioners, the Mean waiting time of patients at the service bloc, the mean utilization ratio of the resource of the service bloc...
I want to also know if is it possible to limit the total number of Patients (or to at least count them), for exemple, instead of simulating the model for 3 months, i wanna limit the total number of patients that goes to the 10 process to 10k and i want to know how much time does it take to serve all of them. (is it possible with this architecture of the model or do i have to make major changes)
Thank you

Charting the results of an experiment

I am very new to ANYLOGIC. I am trying to use a chart to display the number of operating turbines from the Wind Turbine Tutorial.
I have followed the procedure in the Anylogic in 3 Days book and have the following error:
"Operating cannot be resolved or is not a field" in the statistics field.
I am using the condition item.inState(turbines.Operating). This should count all the agents in the population "turbines" that are in the state Operating.
My state chart for the Agent Turbine has 4 states and Operating is one of them.
Is there another way of getting this information or am I doing something wrong?
turbines is a population, so a state is not a part of the population, but a part of either one individual of the population, or the class of the population
so you would need to do
item.inState(Turbine.Operating)
where Turbine is the Agent Type

Determine number of clusters for different datasets

I performed a clustering analysis of the media usage of different users in order to find different groups that use a specific set of media (e.g. group 1 use media A, B and C and group 2 use media B, C and D). Then I divided the datset in different groups, since the users belong to a specific group (as a consequence the original dataset and the new datasets have a different size). Within in this groups I like to cluster again which different media sets are used.
How can I determine the number of clusters to guarantee that the results are comparable?
Thank you in advance!
Don't rely on clustering to be stable.
It's a hypothesis generation tool.
You clustered, and now you have the hypothesis that there are groups ABCD of media usage. You should first evaluate if this hypothesis is adequate. Now what you want to do in your next step is to assign the labels to subsets of the data. First of all, you should be able to simply subset this from the previous labels. But if this really is different data, you can label new data, for example using the most similar record (nearest neighbor classification). But that is classification now, because your classes are fixed.

How to find the most representative/distinguish features in each cluster after doing K-mean clustering?

I tried to use K-mean with a high-dimension dataset (CDR data).
After clustering, I would like to represent each cluster with the most informative features which can show the unique/representative characteristic of customers in that cluster.
For example,
Cluster 1: [High: call_duration], [Low: number_of_friends], [High: call_at_night]
Cluster 2: [Low: call_duration], [High: use_promotion]
Cluster 3: [High: internet_usage]
I would like to know that ...
Question 1: How I can find those informative features which can represent each cluster?
Question 2: If there are many informative features, how to measure which one is more representative?
Another problem is "how to measure whether the value is high or low?"
My current solution is applying z-normalization to every feature in every cluster centroids, then I assume that
<-2σ or >2σ is outlier
(-2σ to -1σ) or (1σ to 2σ) is low/high
-1σ to 1σ is medium
Question 3: Is this measurement make sense? Please give me your suggestion.
Train a decision tree to discriminate the clusters.
Or any other feature selection method for classification, because this is now a classification problem.

ELKI - How get clusters from elki's cluster object order file?

Running on ELKI the OPTICS and DeLiClu algorithms I get only the cluster object order file as result. How can I get the clusters list and the mapping among points and the respective cluster?
The OPTICS class does not (by design) produce clusters.
Instead, it produces the cluster order as defined by OPTICS.
If you want to extract partitions from the cluster order, please use the class OPTICSXi, which implements the main extraction method (adding the xi parameter) discussed in the OPTICS paper. This method can be used with either OPTICS or DeLiClu.
There are other alternatives to extract such partitions, but they have not yet been contributed to ELKI.