<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Monte Carlo Simulation using OpenVINO in GPU Compute Software</title>
    <link>https://community.intel.com/t5/GPU-Compute-Software/Monte-Carlo-Simulation-using-OpenVINO/m-p/1657249#M1702</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am discovering Data Science and am having a very good time. I don't have lots of mathematic skills . I'm wondering if someone can help kickstart my optimization project. I would like to know if it would be possible to optimize this script so that it benefits from intel vector processors :&lt;/P&gt;&lt;P&gt;By the way, is there a fast alternative to itertools.combinations() in OpenVINO?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Code :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def monte_carlo_simulation(draws, size):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; combination_counts = {}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for _ in range(1000000):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; draw = random.choice(draws)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combinations = itertools.combinations(draw, size)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; for combination in combinations:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination = tuple(sorted(combination))&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if combination not in combination_counts:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination_counts[combination] = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination_counts[combination] += 1&lt;/PRE&gt;&lt;P&gt;Example data :&lt;/P&gt;&lt;PRE&gt;[[6 7 10 13 15 16 18 22 23 24 26 27 29 31 33 35 37 41 66 68]&lt;BR /&gt;[1 2 12 14 19 20 22 24 25 30 35 44 45 47 52 55 56 57 61 67]&lt;BR /&gt;[15 19 20 25 30 32 33 35 38 39 40 46 47 48 51 61 62 63 64 70]&lt;BR /&gt;[3 5 6 11 14 15 19 22 26 27 34 41 43 45 51 53 56 57 68 69]&lt;BR /&gt;[4 6 8 11 14 29 32 33 34 35 38 41 47 51 53 56 58 62 63 64]&lt;BR /&gt;[6 12 13 17 19 21 24 25 26 29 30 41 44 50 51 52 54 55 57 70]&lt;BR /&gt;[3 5 13 17 18 23 24 28 31 38 42 43 45 48 50 53 57 66 68 69]&lt;BR /&gt;[1 2 6 9 10 11 14 27 28 34 35 41 44 45 46 52 55 56 64 65]&lt;BR /&gt;[4 5 8 13 16 18 22 33 34 36 39 42 43 44 50 51 55 60 69 70]&lt;BR /&gt;[7 8 12 13 16 27 31 32 39 41 46 47 48 55 56 61 63 64 66 70]&lt;BR /&gt;[1 9 12 20 23 24 26 28 33 36 45 50 52 55 57 60 62 63 64 65]&lt;BR /&gt;[4 5 8 9 10 13 18 19 25 30 33 34 37 47 51 54 58 66 67 68]&lt;BR /&gt;[2 3 8 10 11 13 14 21 31 36 40 42 46 49 55 56 57 62 65 69]&lt;BR /&gt;[1 7 9 18 22 25 31 36 38 39 41 42 44 53 54 56 60 61 64 65]&lt;BR /&gt;[1 3 8 11 13 14 16 17 20 22 31 34 35 41 42 43 60 64 68 69]&lt;BR /&gt;[3 4 5 8 12 14 23 24 27 28 31 37 39 44 49 55 59 66 69 70]&lt;BR /&gt;[7 13 16 21 22 25 28 29 32 35 37 38 39 42 46 47 48 55 57 62]&lt;BR /&gt;[2 5 10 11 12 14 16 18 22 24 26 27 30 36 40 41 52 57 62 64 5]&lt;BR /&gt;[4 8 9 10 13 17 23 24 29 32 34 39 42 43 56 57 59 64 67 68 3]&lt;BR /&gt;[2 7 11 15 22 24 25 35 37 38 39 40 41 45 52 57 62 67 68 69 3]&lt;BR /&gt;[9 11 18 20 21 25 33 34 41 42 45 49 50 52 53 55 56 63 66 69 2]&lt;BR /&gt;[1 2 11 12 13 15 22 26 27 35 36 37 39 40 57 60 65 68 69 70 2]&lt;BR /&gt;[3 7 11 12 13 14 17 20 24 29 31 34 38 39 41 46 59 62 67 69 2]&lt;BR /&gt;[4 9 17 21 22 23 29 32 36 41 43 44 45 47 54 55 57 67 69 70 2]&lt;BR /&gt;[1 3 5 7 13 19 21 22 23 24 32 33 38 45 47 49 52 53 60 66 2]&lt;BR /&gt;[6 8 11 14 15 16 24 25 30 34 35 36 51 58 61 62 65 68 69 70 5]&lt;BR /&gt;[2 3 4 6 7 9 18 23 24 25 26 38 42 43 46 49 50 57 69 70 2]&lt;BR /&gt;[1 2 9 11 13 16 20 21 22 25 26 27 29 31 38 47 48 63 67 70 2]]&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Jim&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2025 15:14:17 GMT</pubDate>
    <dc:creator>jeanmarieb</dc:creator>
    <dc:date>2025-01-15T15:14:17Z</dc:date>
    <item>
      <title>Monte Carlo Simulation using OpenVINO</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/Monte-Carlo-Simulation-using-OpenVINO/m-p/1657249#M1702</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am discovering Data Science and am having a very good time. I don't have lots of mathematic skills . I'm wondering if someone can help kickstart my optimization project. I would like to know if it would be possible to optimize this script so that it benefits from intel vector processors :&lt;/P&gt;&lt;P&gt;By the way, is there a fast alternative to itertools.combinations() in OpenVINO?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Code :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def monte_carlo_simulation(draws, size):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; combination_counts = {}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for _ in range(1000000):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; draw = random.choice(draws)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combinations = itertools.combinations(draw, size)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; for combination in combinations:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination = tuple(sorted(combination))&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if combination not in combination_counts:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination_counts[combination] = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combination_counts[combination] += 1&lt;/PRE&gt;&lt;P&gt;Example data :&lt;/P&gt;&lt;PRE&gt;[[6 7 10 13 15 16 18 22 23 24 26 27 29 31 33 35 37 41 66 68]&lt;BR /&gt;[1 2 12 14 19 20 22 24 25 30 35 44 45 47 52 55 56 57 61 67]&lt;BR /&gt;[15 19 20 25 30 32 33 35 38 39 40 46 47 48 51 61 62 63 64 70]&lt;BR /&gt;[3 5 6 11 14 15 19 22 26 27 34 41 43 45 51 53 56 57 68 69]&lt;BR /&gt;[4 6 8 11 14 29 32 33 34 35 38 41 47 51 53 56 58 62 63 64]&lt;BR /&gt;[6 12 13 17 19 21 24 25 26 29 30 41 44 50 51 52 54 55 57 70]&lt;BR /&gt;[3 5 13 17 18 23 24 28 31 38 42 43 45 48 50 53 57 66 68 69]&lt;BR /&gt;[1 2 6 9 10 11 14 27 28 34 35 41 44 45 46 52 55 56 64 65]&lt;BR /&gt;[4 5 8 13 16 18 22 33 34 36 39 42 43 44 50 51 55 60 69 70]&lt;BR /&gt;[7 8 12 13 16 27 31 32 39 41 46 47 48 55 56 61 63 64 66 70]&lt;BR /&gt;[1 9 12 20 23 24 26 28 33 36 45 50 52 55 57 60 62 63 64 65]&lt;BR /&gt;[4 5 8 9 10 13 18 19 25 30 33 34 37 47 51 54 58 66 67 68]&lt;BR /&gt;[2 3 8 10 11 13 14 21 31 36 40 42 46 49 55 56 57 62 65 69]&lt;BR /&gt;[1 7 9 18 22 25 31 36 38 39 41 42 44 53 54 56 60 61 64 65]&lt;BR /&gt;[1 3 8 11 13 14 16 17 20 22 31 34 35 41 42 43 60 64 68 69]&lt;BR /&gt;[3 4 5 8 12 14 23 24 27 28 31 37 39 44 49 55 59 66 69 70]&lt;BR /&gt;[7 13 16 21 22 25 28 29 32 35 37 38 39 42 46 47 48 55 57 62]&lt;BR /&gt;[2 5 10 11 12 14 16 18 22 24 26 27 30 36 40 41 52 57 62 64 5]&lt;BR /&gt;[4 8 9 10 13 17 23 24 29 32 34 39 42 43 56 57 59 64 67 68 3]&lt;BR /&gt;[2 7 11 15 22 24 25 35 37 38 39 40 41 45 52 57 62 67 68 69 3]&lt;BR /&gt;[9 11 18 20 21 25 33 34 41 42 45 49 50 52 53 55 56 63 66 69 2]&lt;BR /&gt;[1 2 11 12 13 15 22 26 27 35 36 37 39 40 57 60 65 68 69 70 2]&lt;BR /&gt;[3 7 11 12 13 14 17 20 24 29 31 34 38 39 41 46 59 62 67 69 2]&lt;BR /&gt;[4 9 17 21 22 23 29 32 36 41 43 44 45 47 54 55 57 67 69 70 2]&lt;BR /&gt;[1 3 5 7 13 19 21 22 23 24 32 33 38 45 47 49 52 53 60 66 2]&lt;BR /&gt;[6 8 11 14 15 16 24 25 30 34 35 36 51 58 61 62 65 68 69 70 5]&lt;BR /&gt;[2 3 4 6 7 9 18 23 24 25 26 38 42 43 46 49 50 57 69 70 2]&lt;BR /&gt;[1 2 9 11 13 16 20 21 22 25 26 27 29 31 38 47 48 63 67 70 2]]&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 15:14:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/Monte-Carlo-Simulation-using-OpenVINO/m-p/1657249#M1702</guid>
      <dc:creator>jeanmarieb</dc:creator>
      <dc:date>2025-01-15T15:14:17Z</dc:date>
    </item>
  </channel>
</rss>

