From: Neha on
Hi,

I am working for a company which have their count data for customers. This data is for each day. Also there are two different counts for different classes. But the problem is that the counts for each day is not available and mostly data for classone is missing. But this count is necessary since company want to forecast the demand for the future. I started working on the algorithm part of Matlab and used the followinf syntax, but could't do it properly.

newfts = fillts(oldfts, fill_method)
newfts = fillts(oldfts, fill_method, newdates)
newfts = fillts(oldfts, fill_method, newdates, {'T1','T2',...})
newfts = fillts(oldfts, fill_method, newdates, 'SPAN', {'TS','TE'},
delta)
newfts = fillts(... sortmode)


I have information scattered in the following columns:
Date Code Countone Countsecond time

Date: Date on which the count is made
Code: code of product
Countone: Count for class one
Countsecond: Count for class second
Time: This will be the time at which the service was used.

Please note: The company has several range of products and one product is used by several customers at one point of time so the excel sheet available with me look as follows:
Date Code Countone Countsecond Time
24-05-09 ABC NAN 298 5:30
24-05-09 PQR 34 251 8:30
24-05-09 JHK 5 28 13:20
24-05-09 NJE 26 NAN 15:30
25-05-09 THJ 54 41 2:30
25-05-09 LOU NAN NAN 8:30
25-05-09 PIU NAN NAN 11:20
25-05-09 LIS NAN NAN 15:30
and so on

The data available with me is for 15 weeks

Please let me know which algorith will be useful. I tried making some but i always got error. Any help will be great.

Regards
Neha
From: Oleg Komarov on
"Neha " <smile_neha16(a)yahoo.co.in> wrote in message <huq9mi$hhg$1(a)fred.mathworks.com>...
> Hi,
>
> I am working for a company which have their count data for customers. This data is for each day. Also there are two different counts for different classes. But the problem is that the counts for each day is not available and mostly data for classone is missing. But this count is necessary since company want to forecast the demand for the future. I started working on the algorithm part of Matlab and used the followinf syntax, but could't do it properly.
>
> newfts = fillts(oldfts, fill_method)
> newfts = fillts(oldfts, fill_method, newdates)
> newfts = fillts(oldfts, fill_method, newdates, {'T1','T2',...})
> newfts = fillts(oldfts, fill_method, newdates, 'SPAN', {'TS','TE'},
> delta)
> newfts = fillts(... sortmode)
>
>
> I have information scattered in the following columns:
> Date Code Countone Countsecond time
>
> Date: Date on which the count is made
> Code: code of product
> Countone: Count for class one
> Countsecond: Count for class second
> Time: This will be the time at which the service was used.
>
> Please note: The company has several range of products and one product is used by several customers at one point of time so the excel sheet available with me look as follows:
> Date Code Countone Countsecond Time
> 24-05-09 ABC NAN 298 5:30
> 24-05-09 PQR 34 251 8:30
> 24-05-09 JHK 5 28 13:20
> 24-05-09 NJE 26 NAN 15:30
> 25-05-09 THJ 54 41 2:30
> 25-05-09 LOU NAN NAN 8:30
> 25-05-09 PIU NAN NAN 11:20
> 25-05-09 LIS NAN NAN 15:30
> and so on
>
> The data available with me is for 15 weeks
>
> Please let me know which algorith will be useful. I tried making some but i always got error. Any help will be great.
>
> Regards
> Neha

If you need to consolidate data:

In = {'24-05-09' 'ABC' nan 298 '5:30'
'24-05-09' 'PQR' 34 251 '8:30'
'24-05-09' 'JHK' 5 28 '13:20'
'24-05-09' 'NJE' 26 nan '15:30'
'25-05-09' 'THJ' 54 41 '2:30'
'25-05-09' 'LOU' nan nan '8:30'
'25-05-09' 'PIU' nan nan '11:20'
'25-05-09' 'LIS' nan nan '15:30'};

Pivot(In(:,1:3),@nansum) % search on he FEX
ans =
[NaN] '24-05-09' '25-05-09'
'ABC' [ NaN] [ NaN]
'JHK' [ 5] [ NaN]
'LIS' [ NaN] [ NaN]
'LOU' [ NaN] [ NaN]
'NJE' [ 26] [ NaN]
'PIU' [ NaN] [ NaN]
'PQR' [ 34] [ NaN]
'THJ' [ NaN] [ 54]

Oleg
From: Neha on
"Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <huqelq$aee$1(a)fred.mathworks.com>...
> "Neha " <smile_neha16(a)yahoo.co.in> wrote in message <huq9mi$hhg$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I am working for a company which have their count data for customers. This data is for each day. Also there are two different counts for different classes. But the problem is that the counts for each day is not available and mostly data for classone is missing. But this count is necessary since company want to forecast the demand for the future. I started working on the algorithm part of Matlab and used the followinf syntax, but could't do it properly.
> >
> > newfts = fillts(oldfts, fill_method)
> > newfts = fillts(oldfts, fill_method, newdates)
> > newfts = fillts(oldfts, fill_method, newdates, {'T1','T2',...})
> > newfts = fillts(oldfts, fill_method, newdates, 'SPAN', {'TS','TE'},
> > delta)
> > newfts = fillts(... sortmode)
> >
> >
> > I have information scattered in the following columns:
> > Date Code Countone Countsecond time
> >
> > Date: Date on which the count is made
> > Code: code of product
> > Countone: Count for class one
> > Countsecond: Count for class second
> > Time: This will be the time at which the service was used.
> >
> > Please note: The company has several range of products and one product is used by several customers at one point of time so the excel sheet available with me look as follows:
> > Date Code Countone Countsecond Time
> > 24-05-09 ABC NAN 298 5:30
> > 24-05-09 PQR 34 251 8:30
> > 24-05-09 JHK 5 28 13:20
> > 24-05-09 NJE 26 NAN 15:30
> > 25-05-09 THJ 54 41 2:30
> > 25-05-09 LOU NAN NAN 8:30
> > 25-05-09 PIU NAN NAN 11:20
> > 25-05-09 LIS NAN NAN 15:30
> > and so on
> >
> > The data available with me is for 15 weeks
> >
> > Please let me know which algorith will be useful. I tried making some but i always got error. Any help will be great.
> >
> > Regards
> > Neha
>
> If you need to consolidate data:
>
> In = {'24-05-09' 'ABC' nan 298 '5:30'
> '24-05-09' 'PQR' 34 251 '8:30'
> '24-05-09' 'JHK' 5 28 '13:20'
> '24-05-09' 'NJE' 26 nan '15:30'
> '25-05-09' 'THJ' 54 41 '2:30'
> '25-05-09' 'LOU' nan nan '8:30'
> '25-05-09' 'PIU' nan nan '11:20'
> '25-05-09' 'LIS' nan nan '15:30'};
>
> Pivot(In(:,1:3),@nansum) % search on he FEX
> ans =
> [NaN] '24-05-09' '25-05-09'
> 'ABC' [ NaN] [ NaN]
> 'JHK' [ 5] [ NaN]
> 'LIS' [ NaN] [ NaN]
> 'LOU' [ NaN] [ NaN]
> 'NJE' [ 26] [ NaN]
> 'PIU' [ NaN] [ NaN]
> 'PQR' [ 34] [ NaN]
> 'THJ' [ NaN] [ 54]
>
> Oleg

Hi Oleg,

Thanks for your reply.

I have one question, with this I will be able to interpolate or calculate the NaN value as well?

Actually I need to fill these Nan value.

Thanks
Neha
From: Oleg Komarov on
> > If you need to consolidate data:
> >
> > In = {'24-05-09' 'ABC' nan 298 '5:30'
> > '24-05-09' 'PQR' 34 251 '8:30'
> > '24-05-09' 'JHK' 5 28 '13:20'
> > '24-05-09' 'NJE' 26 nan '15:30'
> > '25-05-09' 'THJ' 54 41 '2:30'
> > '25-05-09' 'LOU' nan nan '8:30'
> > '25-05-09' 'PIU' nan nan '11:20'
> > '25-05-09' 'LIS' nan nan '15:30'};
> >
> > Pivot(In(:,1:3),@nansum) % search on he FEX
> > ans =
> > [NaN] '24-05-09' '25-05-09'
> > 'ABC' [ NaN] [ NaN]
> > 'JHK' [ 5] [ NaN]
> > 'LIS' [ NaN] [ NaN]
> > 'LOU' [ NaN] [ NaN]
> > 'NJE' [ 26] [ NaN]
> > 'PIU' [ NaN] [ NaN]
> > 'PQR' [ 34] [ NaN]
> > 'THJ' [ NaN] [ 54]
> >
> > Oleg
>
> Hi Oleg,
>
> Thanks for your reply.
>
> I have one question, with this I will be able to interpolate or calculate the NaN value as well?
>
> Actually I need to fill these Nan value.
>
> Thanks
> Neha

You say: "But the problem is that the counts for each day is not available and mostly data for classone is missing. But this count is necessary since company want to forecast the demand for the future. "

why do you want to calculate teh NaNs? This will affect the distribution of the product and the forecast itself will be biased by the assumptions made to estimate those nans.

Oleg
From: Neha on
"Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <huqr38$bdk$1(a)fred.mathworks.com>...
> > > If you need to consolidate data:
> > >
> > > In = {'24-05-09' 'ABC' nan 298 '5:30'
> > > '24-05-09' 'PQR' 34 251 '8:30'
> > > '24-05-09' 'JHK' 5 28 '13:20'
> > > '24-05-09' 'NJE' 26 nan '15:30'
> > > '25-05-09' 'THJ' 54 41 '2:30'
> > > '25-05-09' 'LOU' nan nan '8:30'
> > > '25-05-09' 'PIU' nan nan '11:20'
> > > '25-05-09' 'LIS' nan nan '15:30'};
> > >
> > > Pivot(In(:,1:3),@nansum) % search on he FEX
> > > ans =
> > > [NaN] '24-05-09' '25-05-09'
> > > 'ABC' [ NaN] [ NaN]
> > > 'JHK' [ 5] [ NaN]
> > > 'LIS' [ NaN] [ NaN]
> > > 'LOU' [ NaN] [ NaN]
> > > 'NJE' [ 26] [ NaN]
> > > 'PIU' [ NaN] [ NaN]
> > > 'PQR' [ 34] [ NaN]
> > > 'THJ' [ NaN] [ 54]
> > >
> > > Oleg
> >
> > Hi Oleg,
> >
> > Thanks for your reply.
> >
> > I have one question, with this I will be able to interpolate or calculate the NaN value as well?
> >
> > Actually I need to fill these Nan value.
> >
> > Thanks
> > Neha
>
> You say: "But the problem is that the counts for each day is not available and mostly data for classone is missing. But this count is necessary since company want to forecast the demand for the future. "
>
> why do you want to calculate teh NaNs? This will affect the distribution of the product and the forecast itself will be biased by the assumptions made to estimate those nans.
>
> Oleg

I agree with your point. But the problem is that for one class 50% of data is missing and for other 5% of data is missing. Company is not interested in forecasting on the basis of current available counts only. They want to calculate NaNs. Till now they used to take the average in place of the missing value but which reduces the accuracy of forecast.

So, in order to improve this we have decided to calculate these NaNs using some appropriate startegy. In Matlab we have option of some models with which the NaNs calculated might be better and reduces the percentage of devation.

Neha
 |  Next  |  Last
Pages: 1 2
Prev: Issues with Matlab Figure
Next: Write to xlm file