Answers below...

On Thu, Feb 5, 2015 at 5:31 PM, Matsushita,Toshiyuki <MKI USA>
<[email protected]> wrote:
> Hello,
> Now, I have just started to explore predictive possibilities of NuPIC.
> Although I believe these are very basic questions for predictive functions of 
> NuPIC that you may be already understanding, I would appreciate if someone 
> could advise or give answers to the following questions regarding the sample 
> of Hot Gym Prediction and CPU sample.
>
> ------------------------------------------------------------------
> <1> Hot Gym Prediction
> ------------------------------------------------------------------
>
> Q1 : Is it possible to lead to answers at one time as predicted data, 
> anomalyScore and anomalyLikelihood by feeding different data streams acquired 
> from different data sources such like GYM1, GYM2 or GYM3?
>
>   [Input data]
>      GymID           Date            Consumption
>      GYM1    2/5/2015    0:00:00      21.2
>      GYM2    2/5/2015    0:00:00      12.3
>      GYM3    2/5/2015    0:00:00      31.5
>      GYM1    2/5/2015    1:00:00      16.4
>      GYM2    2/5/2015    2:00:00      11.8
>      GYM3    2/5/2015    3:00:00      30.5
>         :        :        :
>         :        :        :
>      GYM1    2/5/2015    23:00:00      11.2
>      GYM2    2/5/2015    23:00:00      2.3
>      GYM3    2/5/2015    23:00:00      21.5
>
>
>   [Desirable Output] (Prediction)
>      GymID           Date            Consumption    anomalyScore    
> anomalyLikelihood
>      GYM1    2/6/2015    1:00:00      16.3                 0                 
> 0.5
>      GYM2    2/6/2015    1:00:00      11.5                 0                 
> 0.3
>      GYM3    2/6/2015    1:00:00      29.1                 0                 
> 0.2

Assuming the the gyms are independent, meaning the energy consumption
at one gym is completely independent of the energy consumption at
other gyms, you should create a model for each gym instead of trying
to send all the gyms' data into one model.

This means that each gym will have a model created for it, and each
one gets its own data passed into its model. Then each model will
learn the patterns within its gym and make predictions only based on
that gym's energy consumption.

> Q2 : In addition to above, how I could write scripts with JSON to execute 
> swarm in case of the model_params which predicts analytics results above?

In this case, the models parameters for each gym may be close enough
that you won't need to swarm for each gym. Just use the same model
parameters for each model you create. As the models get passed data,
they will learn only the patterns in the data for the gym they
represent.

If you want to swarm once for each gym, the swarm.py script can be
modified to generate a swarm description for each gym. I started
putting together a "Many Hot Gyms" tutorial last year, but haven't
gotten around to completing it. But you might find the code useful at
https://github.com/rhyolight/nupic/blob/many-hot-gyms-prediction/examples/opf/clients/hotgym/prediction/many_gyms/
(particularly the swarm script at
https://github.com/rhyolight/nupic/blob/many-hot-gyms-prediction/examples/opf/clients/hotgym/prediction/many_gyms/swarm_helper.py).

> ------------------------------------------------------------------
> <2> CPU Sample
> ------------------------------------------------------------------
>
> Q1 : Is it possible to lead to answers at one time which are categorized by 
> different parameters by feeding data streams obtaining these parameters such 
> like CPU(%), Memory(GB)and DISK_USAGE(GB) as shown below?
>
> [Input data]
> CPU(%)      Memory(GB)      DISK_USAGE(GB)
> 12.3            75.6            250.4
> 15.6            68.5            251.3
> 13.7            71.6            251.8
>
>  [Desirable Output] (Prediction)
> CPU(%)      Memory(GB)      DISK_USAGE(GB)
> 14.8            69.7            252.1

While a model can accept many fields of data at once (representing
factors that might affect the predicted field), it can only output a
prediction for one field. In order to get predictions for 3 fields
like you've defined above, you'll need to create 3 models.

> Q2 : In addition, how I could write scripts with JSON to execute swarm in 
> case of the model_params which predicts analytics results above?

See my answer to your other Q2 above.

Regards,
---------
Matt Taylor
OS Community Flag-Bearer
Numenta

Reply via email to