Finding a point best representing the centre of density
23 views (last 30 days)
I have got half hourly data of electric consumption for twenty four hours (i.e. 48 data points) for more than 100 customers. So to cut short i have 48 data points for each customer and each data point has a magnitude on y-axis. Now as all of the customers are plotted together, i want to find the point which is not mean but centre of the density at each data point. From visiual analysis you can tell a certain point as density centre (that point does not necessarily contain a data point there). Is it possible to do so using matlab? It is easy to do it visually however cannot figure out a way to do it programatically.
Image Analyst on 31 Mar 2017
I think this would call for the Statistics and Machine Learning Toolbox. It depends on what shape your distributions take. Do you think you have a pair of Gaussians? Or some other distribution? I'd first look to fitdist() or makedist(). Then look at fitgmdist() or fitglm(). Once you have a theoretical curve fitted to the data by using one of those functions, then you should know what to do, like find the mean at certain times, or find the peak signal, or whatever.
Joseph Cheng on 1 Apr 2017
Edited: Joseph Cheng on 1 Apr 2017
I don't quite think you need to go that far as Image Analyst suggests. if i get it you have a consumption by time by user matrix. if we plot3 and view it so you get consumption by time, you'll get a bunch of points stacked on top.
so if we do a slice in time you want to put a point of kW-Hr in the center of the points based off density. so the quick item below shows a slice in time
Cust=1:1000; %just putting a customer number to data point
%Con is generation of some dummy consumption with some centralized value so its not just at the max or min.
[N X]=hist(Con,1000); %with a histogram of some bucket size, you get how many consumers per consumption value.
from the histogram you can see the number of consumers per bucket consumption. Then using the center of mass calculation you can see the center of density. i would also suggest some threshold or windowing applied to get rid of outliers.