I have a dataset which contains time-series data of water flow over time. I have a flow meter connected to a kitchen faucet, and I am trying to cluster or classify specific water usage events.
The data is collected every second, and in each row I am given a value for the amount of gallons which are flowing through my flow meter.
For example, I am trying to classify someone washing their hands, filling a teapot, cleaning dishes, etc...
Is this something that I can use a k-NN Classification Approach to cluster these events? If a clustering based approach isn't good, what other method of classified would be good for this type of data?
If I run some experiments, I can classify each event and turn it into a supervised learning problem. But at the moment, none of the water events are classified.
A very abridged version of my dataset looks like the following:
EDIT
water = pd.DataFrame(shower1)
rng = pd.date_range('2016-09-01 00:00:00', '2016-09-30 23:59:58', freq='S')
water = water.reindex(rng,fill_value=0.0)
water = water['shower1']
df = pd.DataFrame({'time_stamp':rng,'water_amount':water})
starts = (df['water_amount']>0)&(df['water_amount'].shift(1)==0) #find all starts of events
n_events = sum(starts) #total number of events
df.loc[starts,'event_number'] = range(1,n_events+1) #numerate starts from 1 to n
df['event_number'] = df['event_number'].fillna(method='pad').fillna(-1) #forward fill all the values
df.loc[df['water_amount']==0,'event_number']=-1 #set all event numbers to -1 where the water amount is 0
df.groupby('event_number').agg({'time_stamp':'first',
'water_amount':'sum'}) #feature matrix
all samples have to be of the same dimension
, are you saying that since my samples do not represent the same event, that they're of different dimension? Thanks for your response. I'll take a look at HMMs. $\endgroup$