regarding crunching the numbers, I am not sure a Markov process can help you. If you want to have a prediction, then the NOAA will be more able to predict the weather I am sure. If you want to measure the energy fallen onto the gloves - locally, the maximum temperature reached etc. then some real-time temperature recording station is needed. There are some Monks who can dispense good advice on that.

In any event, if you do insist to use the MC to make a prediction, then arrange an input file with your observations like below and use the code I posted at n-dimensional statistical analysis of DNA sequences (or text, or ...) (in the meantime there are some un-publish revisions so if you are interested I can post it again or point you at a repository).

cat input.txt sun clo clo sun clo clo sun sun sun clo sun clo

that's like sunny, cloudy etc. use other symbols but the separator must be space (' '), then analyse the input:

analyse_text.pl --input-corpus input.txt --ngram-length 2 --output-sta +te mystate --separator ' '

results in this, probabilities of a state given a previous state:

{ "counts" => { "clo|clo" => 2, "clo|sun" => 3, "sun|clo" => 4, "sun|s +un" => 2 }, "cum-twisted-dist" => { clo => ["clo", 0.4, "sun", 1], sun => ["clo", 0.666666666666667, "sun", 1], }, "dist" => { "clo|clo" => 0.181818181818182, "clo|sun" => 0.272727272727273, "sun|clo" => 0.363636363636364, "sun|sun" => 0.181818181818182, }, "N" => 2, }

and do a 30-time-unit prediction:

predict_text.pl --input-state mystate --separator ' ' --num-iteration +s 30 --seed 'clo'

results in this:

/home/andreas/usr/bin/predict_text.pl : starting with seed 'clo' ... clo sun clo clo sun clo sun clo clo clo clo sun sun sun clo clo sun clo sun clo sun sun clo sun sun sun clo clo sun clo sun sun sun clo sun clo sun clo clo sun clo clo clo sun clo clo sun sun sun clo clo sun clo clo sun clo sun clo clo clo clo sun sun clo sun sun clo sun clo sun sun clo sun sun clo sun sun clo sun clo sun sun clo sun clo sun sun sun sun clo sun clo clo sun clo clo clo sun sun clo sun

But what's the meaning of this? good question!


In reply to Re: using a stochastic matrix to simulate weather conditions by bliako
in thread using a stochastic matrix to simulate weather conditions by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.