Hi,

I'll try to follow on the swarming vs. running question:
-"run model" = model + parameters + input data ->produce outputs
(predictions, ...)
-"swarm" = model + some data (+lot of time) -> find "optimal" parameters
(for model+data)

So, below..

On Wed, May 20, 2015 at 11:47 PM, Wakan Tanka <[email protected]> wrote:

> Hello NuPIC,
>
> I would like to ask regarding code here:
> https://github.com/rhyolight/nupic.examples/blob/master/sine-prediction/sine_experiment.py
>
>
> From command line there is one command for starting swarming process:
> $NUPIC/scripts/run_swarm.py $PWD/search_def.json --maxWorkers=6
>
> Is this  equivalent to following python code?
> model_params = swarm_over_data()
>
>
>
> From command line running the model (which was found by swarming process)
> on data this is used:
> $NUPIC/scripts/run_opf_experiment.py $PWD/model_0/
>
> Is this  equivalent to following python code?
> model = ModelFactory.create(model_params)
> model.enableInference({"predictedField": "sine"})
> result = model.run({"sine": sine_value})
>
>
>
> 1. Is there any benefit for running swarming and running model in two
> steps?
>
yes,  swarm=parameters, run=outputs; although swarming imho saves also the
output of the best model, so you can already use that.

2. Is running only swarming without running model useful for something?
>
yes, parameters.


> 3. Is there any benefit for three separate steps for running model in
> python?
>
which steps?


> 4. When I have swarm data created in the past and I did not touch the
> input data how can I reuse it and run model in python?
>
call the model with the params you got from swarming; If you really did not
change the data, you could have saved the model (serialize) and then just
restore it back again.

Note on swarming: of course it helps, but in Nupic the general defaults are
just "good enough" usually and the model adjusts to the data itself, so
usually just running the model is enough.

hth,
Mark


>
>
> Thank you
>
> Wakan
>
>


-- 
Marek Otahal :o)

Reply via email to