<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing questions tagged with Computational Humanities sorted by active.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3156766" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3030120" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2638404" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2608592" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2452694" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/520009" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1862900" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2103451" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1900563" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1757394" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1383246" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1382958" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1256480" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1136926" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1137218" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1136795" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1011732" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/908823" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/908332" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/796831" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3156766">
    <title>Help needed --- Every Japanese to be called SATO by 2531&amp;#034;</title>
    <link>https://community.wolfram.com/groups/-/m/t/3156766</link>
    <description>Hello!&#xD;
&#xD;
I&amp;#039;m a teacher of journalism at the international EDJ school in Nice FR&#xD;
&#xD;
My students have access to Mathematica 14 (but they mainly use chat-driven notebooks as the wolfram language is sort of complicated to them).&#xD;
&#xD;
Anyway. As part of the &amp;#034;Data Journalism&amp;#034; course I want to give them the assignment to read this article  https://www.dailymail.co.uk/news/article-13266707/Everyone-Japan-called-Sato-year-2531-countrys-marriage-laws.html&#xD;
&#xD;
It tells the story of a Tohoku University economics professor that concluded that, given how married couples in jpn  drop one of their family names in favour of both individuals taking the same one everyone will be called &amp;#034;SATO&amp;#034; by 2531.&#xD;
&#xD;
I&amp;#039;d like the students to perform  the same simulation for their own country (after finding out the candidate family name -- for Italy that would probably be &amp;#034;Rossi&amp;#034;)&#xD;
&#xD;
Now, after some digging I&amp;#039;ve found in this PDF https://think-name.jp/assets/pdf/Sato_estimation_yoshida_hiroshi.pdf&#xD;
&#xD;
the method used to perform the calculation for Japan:&#xD;
&#xD;
Handling of Past Data&#xD;
&#xD;
First, we obtained the number of people with the Sato surname in Japan from the data provided and published by &amp;#034;Myoji-yurai.net&amp;#034; (https://myoji-yurai.net/), which covers more than 99.04% of Japanese surnames.&#xD;
&#xD;
Next, we divided the number of people with the Sato surname by the total population of Japan for each year (estimated by the Ministry of Internal Affairs and Communications) * 99.04% to obtain the &amp;#034;ratio of the Sato surname in a given year t&amp;#034;: x(t).&#xD;
&#xD;
From the change in the Sato surname between the latest years of 2022 and 2023, we calculated the one-year growth rate \[Rho] in the Sato surname ratio.&#xD;
Estimation Results (1) Growth Rate \[Rho] of the Sato Surname It is found that the ratio of the Sato surname x(t) increased from 1.480% in 2013 to 1.530% in 2023, an increase of 0.05 percentage points over more than 10 years. Calculating from the data for the most recent points of 2022 and 2023, the growth rate \[Rho] of the Sato surname ratio is (1+\[Rho]) = 1.0083.&#xD;
&#xD;
(2) Future Simulation&#xD;
Assuming that the ratio of the Sato surname to the Japanese population will grow at a rate of 1.0083 each year, starting from 1.530% as of March 2023, and repeating the calculation of x(t+1) = (1+\[Rho]) x(t), it was calculated that the ratio will reach 100% in approximately 500 years, in 2531.&#xD;
&#xD;
-----&#xD;
&#xD;
**And the question is : Is anyone kind enough to write me the Wolfram Language generic code to perform the same**  ? Ideally, students could get their own country basic data (if possible directly with WolfrmaLanguage functions, if not possible from outside sources) and have the system perform the simulation for them (of course, forcing the Japanese role &amp;#034;select one family name&amp;#034;  even if not the case for the specific country)&#xD;
&#xD;
&#xD;
&#xD;
It is also possible that it will not converge and we will never have a &amp;#034;Rossi only&amp;#034; country not even in year 3500...or maybe yes. But that&amp;#039;s also the point of the simulation.&#xD;
&#xD;
Thanks!!</description>
    <dc:creator>Marco Barsotti</dc:creator>
    <dc:date>2024-04-11T09:01:38Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3030120">
    <title>Hardware for exploring &amp;#034;Generative AI Space&amp;#034;?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3030120</link>
    <description>I was inspired by Wolfram&amp;#039;s blog post on [Generative AI Space and the Mental Imagery of Alien Minds][1] but realized that I can&amp;#039;t run any of his code because my Mathematica installations are on MacOS and GPU use is not supported. Can anyone give me a sense of how long it would take to run his examples on a newish Linux or Windows laptop (minutes, hours, days)? I would like to get into the kind of experimentation he describes but I don&amp;#039;t have a sense of whether it can be done with a modest system or whether it requires a lot of computational resources or some kind of cloud deployment. Thanks!&#xD;
&#xD;
  [1]: https://writings.stephenwolfram.com/2023/07/generative-ai-space-and-the-mental-imagery-of-alien-minds/</description>
    <dc:creator>William Turkel</dc:creator>
    <dc:date>2023-10-08T13:58:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2638404">
    <title>[WTC22] Wolfram arts community &amp;amp; Tech Conference questionnaire</title>
    <link>https://community.wolfram.com/groups/-/m/t/2638404</link>
    <description>Hi all, &#xD;
&#xD;
This Fall, I&amp;#039;ve been teaching artists and designers at the Rhode Island School of Design how to use Mathematica for creative coding and fine art making. I&amp;#039;ll be presenting what I&amp;#039;ve seen from my students at WTC in a couple weeks and put some questions together to learn more about the arts community here and perhaps include some of your responses in my presentation. If you&amp;#039;re willing, share your thoughts below. Thanks in advance!   &#xD;
&#xD;
 1. Mathematica has a small but active visual arts community. How have you seen the usage of Mathematica as an art medium grow over time? What changes have you seen from your perspective?&#xD;
&#xD;
 2. Whether it&amp;#039;s showing off a beautiful pattern or an attempt to capture a more complicated feeling from a unique perspective, we call both results “art”. How do you distinguish art being made in Mathematica between craft art and fine art? What does each share with the greater public?&#xD;
&#xD;
 3. What has surprised you about the ways Mathematica is being used in creative fields like art and design?&#xD;
&#xD;
 4. It doesn’t take long in the Mathematica visual arts community to learn the names of [Clayton Shonkwiler][1], [Henry Segerman][2], [Erik Mahieu][3], and [Silvia Hao][4]. What other names or projects come to mind when you think of &amp;#034;Mathematica + Art”?&#xD;
&#xD;
 5. Do you think the practice of art and visual creativity by scientists and mathematicians improves the visual communication standards of the STEM fields as a whole, making us all better at understanding and sharing information visually? &#xD;
&#xD;
 6. [For the Wolfram staff] There is a clear appreciation at Wolfram for aesthetics and design. You can see it in the elegance of powerful functions, in-line equation typesetting, the “Neat Examples” section in documentation, and even the promotion of Mathematica through tweetable code emphasizes patterns and visually interesting graphics. What does art or a more emotive relationship with math and science mean to Wolfram?&#xD;
&#xD;
 7. What other thoughts have these questions brought to the surface for you?&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com/web/claytonshonkwiler&#xD;
  [2]: http://www.segerman.org/&#xD;
  [3]: https://community.wolfram.com/web/erikmahieu&#xD;
  [4]: https://community.wolfram.com/web/wyelen</description>
    <dc:creator>Jack Madden</dc:creator>
    <dc:date>2022-10-07T22:03:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2608592">
    <title>More about visual motion illusions</title>
    <link>https://community.wolfram.com/groups/-/m/t/2608592</link>
    <description>![enter image description here][1]&#xD;
&#xD;
After my previous previous [community contribution][2], I looked deeper into this type of illusion by further analysing existing illusions and creating exciting new ones.&#xD;
&#xD;
**1. Video as a spatio-temporal object**&#xD;
&#xD;
A video can be represented as an x-y-t space. The frames are periodic cross sections perpendicular to the t-axis. They show motion over time. To detect motion in the x- or y-direction, one needs cross sections perpendicular to the x- or y-axis.&#xD;
This is simple video containing 32 frames of 120 by 120 pixels with a static (blue circle) and moving (red propeller) part:&#xD;
&#xD;
    aV = AnimationVideo[&#xD;
       Graphics[{AbsoluteThickness[10], Red, &#xD;
         Rotate[Line[{{0, -.99}, {0, .99}}], -\[Phi]], Blue, Circle[]}, &#xD;
        Background -&amp;gt; LightGray, PlotRange -&amp;gt; 1.2], {\[Phi], 0, &#xD;
        6.28, \[Pi]/16}, RasterSize -&amp;gt; 120];&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
Here is the same  video represented as an x-y-t space. The 32 Cross sections perpendicular to the t-axis are the video frames.&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
The frames are 120 by 120 pixels  and the above video can also be defined by its 120 cross sections perpendicular to the x- or y-axis. Here is a function *ytSectionFromVideo* for making a cross section perpendicular to the y-axis at pixel position yf.&#xD;
&#xD;
    ytSectionFromVideo[v_, yf_] := &#xD;
     Module[{frames, count, size}, frames = VideoFrameList[v, All]; &#xD;
      size = ImageDimensions[frames[[1]]]; count = Length[frames]; &#xD;
      Raster[ParallelTable[&#xD;
        PixelValue[frames[[frm]], {x, yf}], {x, size[[1]]}, {frm, &#xD;
         count}]]]&#xD;
&#xD;
Here are some of the y-t sections at pixel positions 35, 45 and 55 along the y-axis:&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
Reversely, the function *videoFromYtSections* makes a complete set of video frames of size sz from the full set of  y-t sections (one for each pixel in the y direction). &#xD;
&#xD;
    videoFromYtSections[ytSections_, sz_] := &#xD;
     Module[{xSize, ySize}, {xSize, ySize} = &#xD;
       ImageDimensions[ytSections[[1]]]; &#xD;
      Table[ImageRotate[&#xD;
        ImageReflect[&#xD;
         ImageResize[&#xD;
          Image[ParallelTable[(PixelValue[#1, {frm, xf}] &amp;amp;) /@ &#xD;
             ytSections, {xf, ySize}]], {sz, sz}]], -Pi/2], {frm, xSize}]]&#xD;
&#xD;
This is a re-creation of the original video aV from its y-t sections:&#xD;
&#xD;
    avFrames = videoFromYtSections[avYTs, 100];&#xD;
    Video[FrameListVideo[Reverse@avFrames], ImageSize -&amp;gt; 100]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
**2. Motion and motion illusion in videos**&#xD;
&#xD;
The y-t sections (or x-t sections) are essential to detect and create motion in videos. First we look at the completely motionless video of a landscape and 3 of its by-t sections: (landscape still.jpg&amp;#034;, attached from &amp;#034;[Banff NP images][7]&amp;#034;&#xD;
&#xD;
   landscapeV = FrameListVideo[Table[banff, 10]]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[landscapeV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {50, 70, 90}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
Since there is no motion at all, the pixels form parallel lines to the x-axis (if we made x-t sections, lines would be parallel to the y-axis)&#xD;
&#xD;
This is a video and some of the y-t sections of the real motion in a bouncing ball video: (bouncing balls video.mp4 (attached) taken from: [depositphotos][10]&amp;#034;&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[landscapeV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {50, 70, 90}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][12]&#xD;
The background is static and forms parallel lines to the x-axis but the bouncing balls trace slanted or even Perpendicular lines to the x-axis.&#xD;
&#xD;
Finally, the [Mario video][13] from Jacob Yates creating the illusion of motion:&#xD;
&#xD;
    fullMarioV = &#xD;
      Video[&amp;#034;https://jake.vision/motionillusionblog/marioReversePhi.mp4&amp;#034;];&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
The y-t sections of the complete video would be too crowded so, we take a cropped detail from the original:&#xD;
&#xD;
    croppedMarioV = &#xD;
      VideoFrameMap[ImageTake[#1, {228, 318}, {555, 645}] &amp;amp;, fullMarioV];&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
These are the 10 colors of the periodic flashes.&#xD;
&#xD;
    vfl = VideoFrameList[croppedMarioV, All];&#xD;
    colors = ((DominantColors[#1, 2] &amp;amp;) /@ Take[vfl, 10])[[All, 2]]&#xD;
&#xD;
![enter image description here][16]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[croppedMarioV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {15, 40, 50}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][17]&#xD;
&#xD;
The y-t sections above are a mix of parallel and slanted sections parts. If we look along the time axis of these y-t sections, we notice two essential features of this illusion: **the periodic flashing** and **the slanted edges of the y-t section pattern.** In the middle, the flashing merely shows a different color each period. At the slanted edges, there is a time shift. Our brain compares the color flash of the mid section with the delayed color at the sides and will interpret it as movement. The perceived motion at the edges will appear to our eyes as to be for the whole bar and the whole frame as a set of bars. A more scientific explanation can be found in &amp;#034;[Spatiotemporal energy models for the perception of motion][18]&amp;#034; by Adelson and Bergen.&#xD;
&#xD;
&#xD;
**3. Making YT sections with slanted edges**&#xD;
&#xD;
A video can be re-created from its y-t sections. We want to make y-t sections with slanted edges to create the illusion of motion in a static video. &#xD;
The function *edgeShiftedYTsection* makes an image for an y-t section with slanted edges starting at pixel position pos and w pixels wide. The edges are d pixels wide and the number of frames per bar is frs. The total number of frames will be the number of colors in cols times frs.&#xD;
&#xD;
    edgedStrip[y_, w_, h_, d_, col_] := {col, &#xD;
      Polygon[{{d - 0.5` w, -h + y}, {-0.5` w, d - h + y}, {-0.5` w, &#xD;
         d + h + y}, {d - 0.5` w, h + y}, {-d + 0.5` w, &#xD;
         h + y}, {0.5` w, -d + h + y}, {0.5` w, -d - h + y}, {-d + &#xD;
          0.5` w, -h + y}}]}&#xD;
    edgedStripe[pos_, w_, d_, cols_] := &#xD;
     Translate[&#xD;
      MapThread[&#xD;
       edgedStrip[#1, w, 0.5`, d, #2] &amp;amp;, {Range[Length[cols]], &#xD;
        cols}], {0.5` w + pos, 0}]&#xD;
    edgeShiftedYTsection[pos_, w_, d_ : 3, frs_ : 6, cols_ : colors] := &#xD;
     Module[{cls}, cls = Length[cols]; &#xD;
      Image[ImageRotate[&#xD;
        Image[Graphics[&#xD;
          Table[Translate[edgedStripe[pos, w, d, cols], {0, y}], {y, -cls,&#xD;
             frs cls, cls}], PlotRange -&amp;gt; {{0, 92}, {0, frs cls}}]], &#xD;
        Pi/2]]]&#xD;
&#xD;
This is an example of an image to be used as an y-t section: the y-position of the edged pattern is at pixel 15 from the bottom, the total width is 65 pixels and the slanted edges are 5 pixels wide. The pattern will give flashes in 10 different colors and is repeated 6 times to create 6 video frames.&#xD;
&#xD;
![enter image description here][19]&#xD;
&#xD;
**4. Reverse engineering Mario**&#xD;
&#xD;
We try our *edgeShiftedYTsection* function to produce y-t sections and re-create the Mario video from them. This is our home made Mario:&#xD;
&#xD;
![enter image description here][20]&#xD;
&#xD;
**Step 1: Divide the image into horizontal bars** (16 for the Mario pic) and collect the position and width of the bars into a list.&#xD;
To re create the video,  one needs all y-t sections but, for images like Mario, one y-t section for each of the 16 horizontal bars is sufficient. The complete set of y-t sections is then 16 times the number of frames in the resulting video.&#xD;
&#xD;
    marioBarData = {{{21, 33}}, {{14, 55}}, {{14, 47}}, {{8, 67}}, {{8, &#xD;
         74}}, {{8, 67}}, {{21, 47}}, {{14, 40}}, {{8, 67}}, {{0, &#xD;
         82}}, {{0, 82}}, {{0, 82}}, {{0, 82}}, {{14, 18}, {48, 21}}, {{8,&#xD;
          18}, {54, 21}}, {{0, 26}, {54, 28}}};&#xD;
&#xD;
**Step 2: Make an y-t section for each bar:**&#xD;
&#xD;
    marioYTs = (ColorReplace[#1, &#xD;
          White -&amp;gt; &#xD;
           Lighter[Gray, 0.5]] &amp;amp;) /@ (ImageResize[#1, {60, 92}] &amp;amp;) /@ &#xD;
        Apply[ImageMultiply, &#xD;
         Apply[edgeShiftedYTsection, marioBarData, {2}], {1}];&#xD;
    Grid[{marioYTs}, ItemSize -&amp;gt; 3.5, Frame -&amp;gt; True];&#xD;
&#xD;
![enter image description here][21]&#xD;
&#xD;
**Step 3: Create the video** using the function videoFromYtSections:&#xD;
&#xD;
    marioFrames = &#xD;
      ImagePad[#, {{12, 0}, {0, 12}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
       videoFromYtSections[marioYTs, 100];&#xD;
    VideoTimeStretch[Video[FrameListVideo[marioFrames], ImageSize -&amp;gt; 100],&#xD;
      2]&#xD;
&#xD;
![enter image description here][22]&#xD;
&#xD;
**5. Creating completely new illusions: bunny**&#xD;
Here is a bunny extracted from: [Clip-art library][23] rasterized and converted to 34 horizontal bars: &#xD;
&#xD;
![enter image description here][24]&#xD;
&#xD;
This is a list of positions and widths in pixels of the 34 bars and their respective y-t sections:&#xD;
&#xD;
    bunnyBarData = {{{26, 6}, {38, 3}}, {{26, 6}, {35, 6}}, {{23, 9}, {35,&#xD;
          9}}, {{23, 21}}, {{20, 24}}, {{20, 24}}, {{20, 24}}, {{23, &#xD;
         18}}, {{20, 21}}, {{17, 21}}, {{14, 24}}, {{11, 27}, {50, &#xD;
         12}}, {{8, 60}}, {{8, 66}}, {{8, 69}}, {{5, 75}}, {{2, 81}}, {{2,&#xD;
          81}}, {{5, 81}}, {{14, 72}}, {{14, 72}}, {{14, 72}}, {{17, &#xD;
         72}}, {{17, 72}}, {{20, 69}}, {{26, 63}}, {{29, 60}}, {{29, &#xD;
         63}}, {{29, 63}}, {{29, 60}}, {{26, 54}}, {{17, 24}, {47, &#xD;
         27}}, {{23, 12}, {44, 21}}, {{44, 9}}};&#xD;
    bunnyYTs = (ImageReflect[#1, &#xD;
          Left] &amp;amp;) /@ (ImageResize[#1, &#xD;
           60] &amp;amp;) /@ (ColorReplace[#1, White -&amp;gt; Lighter[Gray, 0.65]] &amp;amp;) /@&#xD;
          Apply[ImageMultiply, &#xD;
          Map[edgeShiftedYTsection[Sequence @@ #1, 3, 6, colors] &amp;amp;, &#xD;
           bunnyBarData, {2}], {1}];&#xD;
&#xD;
Some of the 34 y-t sections (at bars nos 10,  20 and 32 ):&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[bunnyYTs[[#]], AspectRatio -&amp;gt; 1, Frame -&amp;gt; True, &#xD;
        FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {10, 20, 32}, ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][25]&#xD;
&#xD;
The video frames and the resulting video are derived from the y-t sections:&#xD;
&#xD;
    bunnyFrames = &#xD;
      Map[ImageResize[#, {95, 112}] &amp;amp;, &#xD;
       ImagePad[#, {{12, 0}, {0, 12}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
        videoFromYtSections[bunnyYTs, 100]];&#xD;
    bunnyFrames[[;; 5]]&#xD;
&#xD;
![enter image description here][26]&#xD;
&#xD;
    Video[FrameListVideo[&#xD;
      ImagePad[#, {{12, 0}, {0, 6}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
       Flatten@Table[ImageReflect[#, Left] &amp;amp; /@ bunnyFrames, 10]], &#xD;
     ImageSize -&amp;gt; 275]&#xD;
&#xD;
![enter image description here][27]&#xD;
&#xD;
**8. Creating completely new illusions: rooster**&#xD;
&#xD;
Here is a rooster image extracted from: Clip-art library rasterized and converted to 43 horizontal bars: &#xD;
&#xD;
&#xD;
![enter image description here][28]&#xD;
&#xD;
    roosterBarData = {{{13, 6}}, {{9, 14}}, {{7, 18}, {63, 10}}, {{5, &#xD;
         22}, {63, 12}}, {{3, 26}, {61, 16}}, {{3, 28}, {65, 10}}, {{1, &#xD;
         30}, {63, 14}}, {{1, 32}, {61, 18}}, {{1, 2}, {5, 28}, {61, &#xD;
         18}}, {{5, 28}, {59, 18}}, {{3, 32}, {59, 18}}, {{3, 34}, {59, &#xD;
         18}}, {{7, 30}, {57, 22}}, {{7, 30}, {57, 22}}, {{7, 32}, {55, &#xD;
         24}}, {{7, 32}, {49, 32}}, {{7, 32}, {47, 34}}, {{9, 32}, {45, &#xD;
         36}}, {{9, 8}, {19, 62}}, {{9, 8}, {19, 60}}, {{19, 60}}, {{21, &#xD;
         56}}, {{21, 6}, {29, 46}}, {{21, 2}, {25, 2}, {29, 46}}, {{29, &#xD;
         44}}, {{27, 44}}, {{27, 42}}, {{27, 38}}, {{27, 36}}, {{29, &#xD;
         34}}, {{39, 22}}, {{41, 18}}, {{43, 14}}, {{45, 10}}, {{45, &#xD;
         8}}, {{45, 18}}, {{45, 2}, {57, 10}}, {{45, 2}, {59, 10}}, {{45, &#xD;
         2}, {67, 2}}, {{43, 4}, {67, 2}}, {{43, 4}}, {{43, 4}}, {{45, &#xD;
         4}}};&#xD;
&#xD;
Sample YT sections at bars nos 10,  20 and 32 out of 43:&#xD;
&#xD;
    roosterYTs = (ImageResize[#1, 60] &amp;amp;) /@ &#xD;
       Apply[ImageMultiply, &#xD;
        Apply[edgeShiftedYTsection, roosterBarData, {2}], {1}];&#xD;
    GraphicsRow[&#xD;
     Graphics[roosterYTs[[#]], AspectRatio -&amp;gt; 1, Frame -&amp;gt; True, &#xD;
        FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {10, 20, 32}, ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][29]&#xD;
&#xD;
The video frames and video as derived from the y-t sections:&#xD;
&#xD;
![enter image description here][30]&#xD;
&#xD;
    roosterV = &#xD;
     Video[FrameListVideo[&#xD;
       ImagePad[#, {{12, 0}, {0, 6}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
        Flatten@Table[ImageReflect[#, Left] &amp;amp; /@ roosterFrames, 10]], &#xD;
      ImageSize -&amp;gt; 275]&#xD;
&#xD;
&#xD;
![enter image description here][31]&#xD;
&#xD;
Several of the illusions can be combined into new ones. The possibilities are endless. Here is the code for the &amp;#034;rooster and hens&amp;#034; video at the top:&#xD;
&#xD;
![enter image description here][32]&#xD;
&#xD;
I hope this helps you making your own visual illusions!&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=schoolOfHens15.gif&amp;amp;userId=68637&#xD;
  [2]: https://community.wolfram.com/groups/-/m/t/2567382&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=avvideo.gif&amp;amp;userId=68637&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=xytspace.png&amp;amp;userId=68637&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8414ytsfromav.png&amp;amp;userId=68637&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5413avfromyts.gif&amp;amp;userId=68637&#xD;
  [7]: https://www.gildshire.com/national-parks-in-the-usa-that-you-should-visit-part-one/&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=landcscapevideo.gif&amp;amp;userId=68637&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromlandscape.png&amp;amp;userId=68637&#xD;
  [10]: https://depositphotos.com/stock-footage/bouncing-balls.html?offset=240&#xD;
  [11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bouncingballssmall.gif&amp;amp;userId=68637&#xD;
  [12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfrombouncingballs.png&amp;amp;userId=68637&#xD;
  [13]: https://jake.vision/motionillusionblog/marioReversePhi.mp4&#xD;
  [14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=fullMarioV.gif&amp;amp;userId=68637&#xD;
  [15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=croppedMarioColor.gif&amp;amp;userId=68637&#xD;
  [16]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4806colors.png&amp;amp;userId=68637&#xD;
  [17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromcroppedMario.png&amp;amp;userId=68637&#xD;
  [18]: http://persci.mit.edu/pub_pdfs/spatio85.pdf&#xD;
  [19]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5328edgeshiftedytsection.png&amp;amp;userId=68637&#xD;
  [20]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9087mariopic16bars.png&amp;amp;userId=68637&#xD;
  [21]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mario16yts.png&amp;amp;userId=68637&#xD;
  [22]: https://community.wolfram.com//c/portal/getImageAttachment?filename=reverseEngineeredMariobest.gif&amp;amp;userId=68637&#xD;
  [23]: http://clipart-library.com/animal-silhouettes-images.html&#xD;
  [24]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyandrsater.png&amp;amp;userId=68637&#xD;
  [25]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfrombunny.png&amp;amp;userId=68637&#xD;
  [26]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyframes.png&amp;amp;userId=68637&#xD;
  [27]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyVbest.gif&amp;amp;userId=68637&#xD;
  [28]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterandraster.png&amp;amp;userId=68637&#xD;
  [29]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromrooster.png&amp;amp;userId=68637&#xD;
  [30]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterframes.png&amp;amp;userId=68637&#xD;
  [31]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterV25.gif&amp;amp;userId=68637&#xD;
  [32]: https://community.wolfram.com//c/portal/getImageAttachment?filename=hensAndRooster.gif&amp;amp;userId=68637</description>
    <dc:creator>Erik Mahieu</dc:creator>
    <dc:date>2022-08-31T12:39:44Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2452694">
    <title>Can you help me navigate an XML tree?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2452694</link>
    <description>I am working on developing a tool in Wolfram Language to correlate user ratings on the website Board Game Geek (BGG, [www.boardgamegeek.com][1]). Users on the site can rate games with a value from 1-10, and my initial goal is to allow someone to check their ratings against those of other users to find other users whose tastes generally match their own.&#xD;
&#xD;
Part of this involves, of course, grabbing all of a user&amp;#039;s rated games. BGG has an API which allows this. To access it, one does this:&#xD;
&#xD;
    userName = &amp;#034;skutsch&amp;#034;;&#xD;
    urlUser = &amp;#034;https://www.boardgamegeek.com/xmlapi2/collection?username=&amp;#034; &amp;lt;&amp;gt; userName &amp;lt;&amp;gt; &amp;#034;&amp;amp;rated=1&amp;#034;;&#xD;
    r1 = Import[urlUser, &amp;#034;XML&amp;#034;];&#xD;
&#xD;
When that call is made, BGG checks if a data file already exists for that user. If so, it serves the data as XML. If not, it sends an HTTP code of 202 and returns a message that it is preparing the data. Accessing the link again a few seconds later usually then results in an HTTP code of 200 and the XML data. (The data is saved by BGG until either the user makes changes to their collection or a number of days pass by. I&amp;#039;ve been hitting these users as test cases so they will probably serve data on the first try.)&#xD;
&#xD;
When it comes to the XML results, I am clueless. I&amp;#039;ve read the documentation for XML in WL and haven&amp;#039;t been able to digest it. &#xD;
&#xD;
The data *very roughly* looks like this:&#xD;
&#xD;
    &amp;lt;items totalitems=&amp;#034;318&amp;#034; ... &amp;gt;&#xD;
      &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;177590&amp;#034; subtype=&amp;#034;boardgame&amp;#034;...&amp;gt;&#xD;
        &amp;lt;name ...&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;stats ...&amp;gt;&#xD;
          &amp;lt;rating value=&amp;#034;7.5&amp;#034;&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
          &amp;lt;/rating&amp;gt;&#xD;
        &amp;lt;/stats&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
      &amp;lt;/item&amp;gt;&#xD;
      &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;68448&amp;#034; subtype=&amp;#034;boardgame&amp;#034;...&amp;gt;&#xD;
        &amp;lt;name ...&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;stats ...&amp;gt;&#xD;
          &amp;lt;rating value=&amp;#034;6.5&amp;#034;&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
          &amp;lt;/rating&amp;gt;&#xD;
        &amp;lt;/stats&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
      &amp;lt;/item&amp;gt;&#xD;
      &amp;lt;...many more items...&amp;gt;&#xD;
    &amp;lt;/items&amp;gt;&#xD;
&#xD;
As I have editorially indicated, I&amp;#039;m only interested in a few values here. What I want to parse out is:&#xD;
&#xD;
 - for every &amp;lt;item&amp;gt; where &amp;lt;item subtype=&amp;#034;boardgame&amp;#034;&amp;gt;:&#xD;
     - get &amp;lt;item objectid=&amp;#034;xxxxx&amp;#034;&amp;gt;&#xD;
     - get &amp;lt;rating value=&amp;#034;yy&amp;#034;&amp;gt;&#xD;
    &#xD;
I was trying to do this in a very brute force matter thusly:&#xD;
&#xD;
        a = &amp;lt;|&amp;#034;gameID&amp;#034; -&amp;gt; Values[r1[[2, 3, i, 2, 2]]], &amp;#034;userName&amp;#034; -&amp;gt; username,&#xD;
           &amp;#034;rating&amp;#034; -&amp;gt; ToExpression @@ Values[r1[[2, 3, i, 3, 5, 3, 1, 2]]]|&amp;gt;&#xD;
&#xD;
basically going to the exact location of the data and iterating through it (i = 1 to &amp;lt;items totalitems=&amp;#034;i&amp;#034;&amp;gt;). Not great, but seemed to work. I&amp;#039;m lazy, so I liked that it kept me from having to figure out the XML.&#xD;
&#xD;
Unfortunately there&amp;#039;s a snag. If you look at the data where userName=&amp;#034;Legomancer&amp;#034;, you hit a problem at item 129 (&amp;lt;item objectid=&amp;#034;1231&amp;#034;&amp;gt;). That item has an additional element that others don&amp;#039;t have:&#xD;
&#xD;
    &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;1231&amp;#034; subtype=&amp;#034;boardgame&amp;#034; collid=&amp;#034;6163073&amp;#034;&amp;gt;&#xD;
      &amp;lt;name sortindex=&amp;#034;1&amp;#034;&amp;gt;Bandu&amp;lt;/name&amp;gt;&#xD;
      &amp;lt;originalname&amp;gt;Bausack&amp;lt;/originalname&amp;gt;&#xD;
      &amp;lt;yearpublished&amp;gt;1987&amp;lt;/yearpublished&amp;gt;&#xD;
&#xD;
That **&amp;lt;originalname&amp;gt;** element shifts the rest of the fields, wrecking my brainless strategy and throwing an error. So I guess I need to learn how to use XML after all.&#xD;
&#xD;
So while I read up again on XML and knock at it with some trial and error, if anyone could point me towards a path, that would be super helpful. &#xD;
&#xD;
&#xD;
  [1]: http://www.boardgamegeek.com</description>
    <dc:creator>Dave Lartigue</dc:creator>
    <dc:date>2022-01-22T15:26:26Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/520009">
    <title>Create a 3D WordCloud ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/520009</link>
    <description>Hi, I was wondering how a 3D version of WordCloud could be made :&#xD;
&#xD;
    WordCloud[EntityValue[CountryData[],{&amp;#034;Name&amp;#034;,&amp;#034;Population&amp;#034;}]]</description>
    <dc:creator>nfaterpe</dc:creator>
    <dc:date>2015-06-28T23:31:56Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1862900">
    <title>StyleGAN with the Wolfram Language?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1862900</link>
    <description>Hi, are there any plans underway to add support for [StyleGAN][1] / [StyleGAN2][2] in the Wolfram Neural Repository? I&amp;#039;ve just started playing around with generating my own images with [RunwayML][3] by re-using an existing community StyleGAN model (it sure helps that they start you off w/$100 Cloud GPU credits) but I&amp;#039;d really like to keep learning and doing this further on the Wolfram platform. &#xD;
&#xD;
Best,&#xD;
Arno&#xD;
&#xD;
  [1]: https://github.com/NVlabs/stylegan&#xD;
  [2]: https://github.com/NVlabs/stylegan2&#xD;
  [3]: https://runwayml.com</description>
    <dc:creator>Arno Bosse</dc:creator>
    <dc:date>2020-01-19T09:52:14Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2103451">
    <title>Error while using DeleteMissing?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2103451</link>
    <description>Hi, I just joined the Wolfram community and was trying out Mathematica for mapping and research purposes. I came across a very help guide to making historical animated maps, however I am encountering issues when I try to implement it. I&amp;#039;m pasting the code below and as I am a beginner, any help would be appreciated. I really want to benefit and enjoy from this platform.&#xD;
&#xD;
Thanks, &#xD;
&#xD;
Shahmir</description>
    <dc:creator>shahmir nawaz</dc:creator>
    <dc:date>2020-10-28T07:54:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1900563">
    <title>Labelling vertices, edges, &amp;amp; faces of polyhedra?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1900563</link>
    <description>I am looking through the documentation on V 12 for a way to label vertices, edges, and faces on polyhedra. (In specific I am trying to make tetrahedra that look like this.)&#xD;
&#xD;
How do I make this happen?&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=IMG_7435.jpeg&amp;amp;userId=1518292</description>
    <dc:creator>Kathryn Cramer</dc:creator>
    <dc:date>2020-03-18T06:57:17Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1757394">
    <title>How to write a time efficient user-defined function with local variables?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1757394</link>
    <description>I want to write a &amp;#039;Gauss&amp;#039; function in my main  program like the way its written in Matlab. In the following example I want to pass the variables (&amp;#039;aar&amp;#039; &amp;amp; &amp;#039;es&amp;#039; are matrices and other are scalars) &amp;#034;aar, es, x1value, x2value, x3value, x4value, y1value, y2value, y3value, y4value&amp;#034; like given below. I want the output to store in detjacobs &amp;amp; Invdetjacobs. Kindly suggest me the correct way.&#xD;
&#xD;
 &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
    [detjacobs, Invdetjacobs] = Gauss[aar, es, x1value, x2value, x3value, x4value, y1value, y2value, y3value, y4value]&#xD;
&#xD;
&#xD;
    Do[&#xD;
    Do[&#xD;
    r = aar[[i]]; s = es[[j]];&#xD;
  &#xD;
  				shape1 = ((1. - r) (1. - s))/4.;&#xD;
  				shape2 = ((1. + r) (1. - s))/4.; &#xD;
                shape3 = ((1. + r) (1. + s))/4.; &#xD;
                shape4 = ((1. - r) (1. + s))/4.;&#xD;
                                          dhdr1 = 1./4. (-1. + s); &#xD;
                                          dhdr2 = (1. - s)/4.;&#xD;
                                          dhdr3 = 1./4. (1. + s); &#xD;
                                          dhdr4 = -(1. + s)/4.;&#xD;
  	                             dhds1 = 1./4. (-1. + r); &#xD;
                                 dhds2 = 1./4. (-1. - r); &#xD;
                                 dhds3 = (1. + r)/4.; &#xD;
                                 dhds4 = (1. - r)/4.;&#xD;
            &#xD;
     detjacobs = {{dhdr1 x1value + dhdr2 x2value + dhdr3 x3value + &#xD;
      dhdr4 x4value, &#xD;
     dhdr1 y1value + dhdr2 y2value + dhdr3 y3value + &#xD;
      dhdr4 y4value}, {dhds1 x1value + dhds2 x2value + dhds3 x3value +&#xD;
       dhds4 x4value, &#xD;
     dhds1 y1value + dhds2 y2value + dhds3 y3value + dhds4 y4value}};&#xD;
&#xD;
    Invdetjacobs = 1/detjacobs;&#xD;
&#xD;
    ,{j,1,4}];&#xD;
&#xD;
    ,{i,1,4}];</description>
    <dc:creator>khaja moinuddin mohammed</dc:creator>
    <dc:date>2019-08-09T11:59:47Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1383246">
    <title>[WSC18] Voice sentiment classification using neural networks</title>
    <link>https://community.wolfram.com/groups/-/m/t/1383246</link>
    <description>## Introduction ##&#xD;
Hello Wolfram community! My name is Ryan Heo and I am a student at the Wolfram high school summer camp where over the past two weeks I was able to work on and complete a project called &amp;#034;Voice Sentiment classification&amp;#034;. The goal of this project was to be able to take an input of an audio speech file and be able to classify that into one of the 8 different categories of emotion using machine learning. Down below is are the steps and the procedure I followed in the completion of my project.&#xD;
&#xD;
##Dataset##&#xD;
For this project I used the Ryerson Audio-Visual Database of Emotional Speech which consisted of varying tones or emotion of speech recordings from voice actors.Down below is the importation of the speech audio files that I have downloaded&#xD;
&#xD;
    folders = Select[FileNames[&amp;#034;*&amp;#034;, NotebookDirectory[]], &#xD;
       DirectoryQ[#] &amp;amp;&amp;amp; StringContainsQ[#, &amp;#034;Actor&amp;#034;] &amp;amp;];&#xD;
    fileNames = FileNames[&amp;#034;*.wav&amp;#034;, #] &amp;amp; /@ folders // Flatten;&#xD;
    audio = Import /@ fileNames;&#xD;
&#xD;
## Encoding the data ##&#xD;
After I have imported all the data files I took extracted the number section of the file name that matches the different emotion categories.&#xD;
I then separated these numbers into eight sections which corresponded with the emotional category of these files.&#xD;
Additionally, I threaded these sections to their corresponding emotion and after flattening the list and random sampling the data I inserted the data into the net encoder. I converted the data into a mel-frequency cepstrum which is based on the log power spectrum and does a better job modeling the human auditory system than the a normal cepstrum. In the net encoder I set my sampling rate and the number of filters I had to a high number in order to create more data points and to be able to extract more features respectively.&#xD;
&#xD;
    enc = NetEncoder[{&amp;#034;AudioMelSpectrogram&amp;#034;, &amp;#034;WindowSize&amp;#034; -&amp;gt; 4096, &#xD;
        &amp;#034;Offset&amp;#034; -&amp;gt; 1024, &amp;#034;SampleRate&amp;#034; -&amp;gt; 44100, &amp;#034;MinimumFrequency&amp;#034; -&amp;gt; 1, &#xD;
        &amp;#034;MaximumFrequency&amp;#034; -&amp;gt; 22050, &amp;#034;NumberOfFilters&amp;#034; -&amp;gt; 128}] ;&#xD;
After encoding the data I separated it into sections consisting of length 41 and reshaped the array to be inputted into neural net for training.&#xD;
Down below is a representation of the mel spectrogram represented by a matrix plot&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
##Neural Networks ##&#xD;
I used a combination of a convolutional neural network and a recurrent network for classification.&#xD;
Down below is the convolutional neural network architecture that I used&#xD;
&#xD;
    convNet = NetChain[&#xD;
      {&#xD;
       conv[32],&#xD;
       conv[32],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[64],&#xD;
       conv[64],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[128],&#xD;
       conv[128],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[256],&#xD;
       conv[256],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       LinearLayer[1024],&#xD;
       Ramp,&#xD;
       DropoutLayer[0.5],&#xD;
       LinearLayer[8],&#xD;
       SoftmaxLayer[]&#xD;
       },&#xD;
      &amp;#034;Input&amp;#034; -&amp;gt; {1, 41, 128},&#xD;
      &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, newClasses}]&#xD;
      ]&#xD;
&#xD;
This is the architecture for the recurrent network with LSTM layers&#xD;
&#xD;
    recurrentNet = NetChain[{&#xD;
       LongShortTermMemoryLayer[128, &amp;#034;Dropout&amp;#034; -&amp;gt; 0.3],&#xD;
       LongShortTermMemoryLayer[128, &amp;#034;Dropout&amp;#034; -&amp;gt; 0.3],&#xD;
       SequenceLastLayer[],&#xD;
       LinearLayer[Length@newClasses],&#xD;
       SoftmaxLayer[]&#xD;
       },&#xD;
      &amp;#034;Input&amp;#034; -&amp;gt; {&amp;#034;Varying&amp;#034;, 8},&#xD;
      &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, newClasses}]&#xD;
      ]&#xD;
I then combined these two nets&#xD;
&#xD;
    netCombined = NetChain[{&#xD;
       NetMapOperator[cnnTrainedNet],&#xD;
       lstmTrained&#xD;
       }]&#xD;
&#xD;
I inputted the section of the dataset files I reserved for testing and validation and inputted these files into the combined neural net achieving an accuracy of 85 percent.Down below would be a good representation of how accurate my net was in in classifying these files into their respective emotional categories.&#xD;
&#xD;
For example in the neutral category out of the 38 samples of the randomly distributed data it was able to correctly match these files into neutral 28 times. As shown below the net seems to confuse the neutral emotion with the sadness emotion as seen by guessing sad 4 times out of 38 files.&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Spectrogram.jpg&amp;amp;userId=1372518&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ConfusionMatrixPlot.jpg&amp;amp;userId=1372518&#xD;
&#xD;
## Deploying the Microsite ##&#xD;
&#xD;
    MicroFunc[aud_Audio] := Module[{net, enc},&#xD;
      net = Import[CloudObject[&#xD;
        &amp;#034;https://www.wolframcloud.com/objects/ryanheo2001/CombinedNet.\&#xD;
    wlNet&amp;#034;], &amp;#034;WLNET&amp;#034;];&#xD;
      enc = NetEncoder[{&amp;#034;AudioMelSpectrogram&amp;#034;, &amp;#034;WindowSize&amp;#034; -&amp;gt; 4096, &#xD;
         &amp;#034;Offset&amp;#034; -&amp;gt; 1024, &amp;#034;SampleRate&amp;#034; -&amp;gt; 44100, &amp;#034;MinimumFrequency&amp;#034; -&amp;gt; 1,&#xD;
          &amp;#034;MaximumFrequency&amp;#034; -&amp;gt; 22050, &amp;#034;NumberOfFilters&amp;#034; -&amp;gt; 128}];&#xD;
      net[Transpose[{Partition[enc[aud], 41]}, {2, 1, 3, 4}]]&#xD;
      ]&#xD;
    CloudDeploy[&#xD;
     FormPage[{&amp;#034;Audio&amp;#034; -&amp;gt; &amp;#034;CachedFile&amp;#034; -&amp;gt; &amp;#034;&amp;#034;, &amp;#034;URL&amp;#034; -&amp;gt; &amp;#034;URL&amp;#034; -&amp;gt; &amp;#034;&amp;#034;}, Which[&#xD;
        #Audio =!= &amp;#034;&amp;#034;, MicroFunc[Audio[#Audio]],&#xD;
        #URL =!= &amp;#034;&amp;#034;, MicroFunc[Import[#URL, &amp;#034;Audio&amp;#034;]],&#xD;
        True, &amp;#034;&amp;#034;] &amp;amp;, PageTheme -&amp;gt; &amp;#034;Red&amp;#034;, &#xD;
      AppearanceRules -&amp;gt; &amp;lt;|&amp;#034;Title&amp;#034; -&amp;gt; &amp;#034;Voice Sentiment Classifier&amp;#034;|&amp;gt;],&#xD;
     &amp;#034;VoiceSentiment&amp;#034;, Permissions -&amp;gt; &amp;#034;Public&amp;#034;]&#xD;
&#xD;
The final microsite can be found here at: https://www.wolframcloud.com/objects/ryanheo2001/VoiceSentiment&#xD;
&#xD;
Lastly, I want to thank my mentor Michael and all the instructors and staff at the wolfram summer camp. They have been very helpful and I have learned valuable lessons from them these past two weeks.</description>
    <dc:creator>Ryan Heo</dc:creator>
    <dc:date>2018-07-13T20:57:43Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1382958">
    <title>[WSC18] Economics of Cryptokitties</title>
    <link>https://community.wolfram.com/groups/-/m/t/1382958</link>
    <description># Economics of Cryptokitties&#xD;
![enter image description here][1]&#xD;
## Executive Summary&#xD;
Cryptokitties is an online game run on the Ethereum blockchain that sells virtual cats with different &amp;#034;cattributes&amp;#034; (cat attributes). The goal of this project is to analyze what factors affect the price of a cryptokitty. The results from the gathered data show that certain cattributes can affect the price of a cryptokitty, but the scarcity of that cattribute does not seem to play a factor in determining a cryptokitty&amp;#039;s price. The time a kitty was sold can be a contributor to the price of a cryptokitty, with cryptokitties that were sold soon after the game&amp;#039;s launch tending to have higher prices than kitties sold at later times. Also, a kitty is most likely to be sold within the first two weeks of its birth.&#xD;
&#xD;
##Introduction&#xD;
&#xD;
### What are Cryptokitties?&#xD;
Cryptokitties are virtual cats sold online using the Ethereum blockchain. Each cryptokitty has a certain set of cattributes, which is determined by their online genetic code. One cryptokitty is released every 15 minutes by the owners of Cryptokitties. While cryptokitties may be released by the company, cryptokitties can also breed, mixing up their genetic code and be creating new kitties that share cattributes passed down from its parents, and possibly even have a mutation that creates a new cattribute. When a person buys a cryptokitty online they own the rights to the genetic code of the cryptokitty, but the company owns the rights to all the images of the cryptokitty and all the programming that went into creating the virtual cat. One can buy a cryptokitty by visiting the Cryptokitties website and having an Ethereum wallet and buy a cryptokitty using ether, the Ethereum cryptocurrency.&#xD;
&#xD;
###Why should I care?&#xD;
Blockchain technology will be an up-and-coming innovation that will change the way that people do online transactions. Blockchain technology is not just limited to the use of currency but can be applied to many different online fields, such as for games like Cryptokitties. Analyzing the economics Cryptokitties can help predict what a new wave of Blockchain games will look and operate like.&#xD;
&#xD;
##Gathering the data&#xD;
To gather the data, I accessed the CryptoKittyDex website[1] and shifted between kitties by changing the cryptokitty&amp;#039;s index number which is the last number in the URL.&#xD;
&#xD;
    ImportCryptoKittiesDB[&amp;#034;Web&amp;#034;, range_] := &#xD;
     importRawKittiesData /@ (Range @@ range)&#xD;
    &#xD;
    ImportCryptoKittiesDB[&amp;#034;File&amp;#034;, filepath_] := Import[filepath];&#xD;
    &#xD;
    importRawKittiesData[id_] := &#xD;
     Block[{request = &#xD;
        HTTPRequest[&#xD;
         URLBuild[{&amp;#034;https://cryptokittydex.com/kitties/&amp;#034;, ToString[id]}]],&#xD;
        result},&#xD;
      result = URLRead[request];&#xD;
      If[result[&amp;#034;StatusCode&amp;#034;] == 200, Import[result, &amp;#034;Data&amp;#034;]]&#xD;
      ]&#xD;
&#xD;
An obstacle I faced while doing this is that if I try to mass import cryptokitties, after some number of kitties there would be an error in importing data from a webpage, causing any importation after the failed import to never happen. To combat this problem I imported all kitties in random sets of eleven consecutive kitties and then pause for a few seconds before importing another set of kitties. This allowed for a break in the importation making new sets not crash due to and importation failure in an earlier set of kitties. I would flatten the gathered data so it&amp;#039;d be usable later, and then saved the data in a file in the case of my kernel crashing.&#xD;
&#xD;
    ranges = Table[With[{n = RandomInteger[825000]}, {n, n + 10}], 10];&#xD;
    &#xD;
    sample72 = With[{range = #},&#xD;
         Pause[5];&#xD;
         ImportCryptoKittiesDB[&amp;#034;Web&amp;#034;, range]&#xD;
         ] &amp;amp; /@ ranges;&#xD;
    &#xD;
    cryptokittiesSample72 = Flatten[sample72, 1];&#xD;
    &#xD;
    Save[&amp;#034;/Users/kylekotanchek/Documents/CryptokittiesDatabases/\&#xD;
    CryptokittiesSample72.wl&amp;#034;, cryptokittiesSample72]&#xD;
&#xD;
Once a enough sets of data were gathered, I put them all into a database after deleting duplicates and any cases of failed imports which occurred in the form of Null.&#xD;
&#xD;
    database = &#xD;
      DeleteCases[&#xD;
       DeleteDuplicates[&#xD;
        Join[cryptokittiesSample1, cryptokittiesSample2, &#xD;
         cryptokittiesSample3, cryptokittiesSample[40], &#xD;
         cryptokittiesSample41, cryptokittiesSample42, &#xD;
         cryptokittiesSample43, cryptokittiesSample44, &#xD;
         cryptokittiesSample45, cryptokittiesSample46, &#xD;
         cryptokittiesSample47, cryptokittiesSample48, &#xD;
         cryptokittiesSample49, cryptokittiesSample50, &#xD;
         cryptokittiesSample51, cryptokittiesSample52, &#xD;
         cryptokittiesSample53, cryptokittiesSample54, &#xD;
         cryptokittiesSample55, cryptokittiesSample56, &#xD;
         cryptokittiesSample57, cryptokittiesSample58, &#xD;
         cryptokittiesSample59, cryptokittiesSample60, &#xD;
         cryptokittiesSample61, cryptokittiesSample62, &#xD;
         cryptokittiesSample63, cryptokittiesSample64, &#xD;
         cryptokittiesSample65, cryptokittiesSample66, &#xD;
         cryptokittiesSample67, cryptokittiesSample68, &#xD;
         cryptokittiesSample69, cryptokittiesSample70, &#xD;
         cryptokittiesSample71, cryptokittiesSample72]], Null];&#xD;
&#xD;
&#xD;
##Compiling the data&#xD;
Once all the data was together, I was able to take certain parts of all of the data of the individual kitties and compile it in a usable way. I found the time a kitty was born, the generation of the kitty, the cattributes of the kitty, and the price and time the kitty was sold. A struggle found was that a kitty could have never been sold, sold once, or sold multiple times. Originally I ignored the cryptokitties that had never been sold, but later changed it to making their price zero after realizing this was causing price inflation in determining the average cost of a cryptokitty. Since every cat needed a time that it was sold at, I made cats that were never sold to have a selling data in 2016, which was before Cryptokitties was launched, so that it&amp;#039;d have no effect in analyzing the time vs. price distribution of sold cats. For every cryptokitty I paired the mean of all the prices a kitty was sold and paired that with each of its cattributes. I also made a function to see the average price value of a cattribute by taking the mean of all the prices of the cryptokitties that have the same cattribute. I dropped the last 15 items in the variable MeanCattributePrice because of some random kitties that never had their cattributes appear on the CryptoKittyDex website.&#xD;
&#xD;
    getPriceInfo[rawdata_] := &#xD;
     Block[{data = &#xD;
        Cases[rawdata, {x_String, _} /; ! &#xD;
           StringFreeQ[x, &amp;#034;Sold for&amp;#034;], \[Infinity]], rawprices, rawdates, &#xD;
       prices, dates}, rawprices = data[[All, 1]];&#xD;
      rawdates = data[[All, 2]];&#xD;
      prices = &#xD;
       Quantity[&#xD;
          ToExpression@&#xD;
           First[StringCases[#, &#xD;
             RegularExpression[&amp;#034;Sold for ([[:print:]]+) ETH&amp;#034;] -&amp;gt; &amp;#034;$1&amp;#034;]], &#xD;
          &amp;#034;Ethers&amp;#034;] &amp;amp; /@ rawprices;&#xD;
      dates = DateObject /@ rawdates;&#xD;
      MapThread[List, {prices, dates}]]&#xD;
    &#xD;
    GetKittyData[database_, id_Integer] := &#xD;
     Catch[Block [{KittyData, KittySoldPrice, KittyBorn, KittyGeneration, &#xD;
        Cattributes, priceInfo},&#xD;
       (*832250 kitties*)&#xD;
       KittyData = database[[id, 2]];&#xD;
       priceInfo = getPriceInfo[KittyData];&#xD;
       If[priceInfo === {},&#xD;
        &amp;lt;|&#xD;
         &#xD;
         KittyBorn -&amp;gt; &#xD;
          DateObject@&#xD;
           StringDrop[&#xD;
            StringReplace[KittyData[[1, 2]], &amp;#034;Born: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], -4],&#xD;
         KittyGeneration -&amp;gt;  &#xD;
          StringReplace[KittyData[[1, 3]], &amp;#034;Generation: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;],&#xD;
         Cattributes -&amp;gt; &#xD;
          StringSplit[&#xD;
           StringReplace[&#xD;
            StringReplace[KittyData[[1, 7]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
            &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;],&#xD;
         KittySoldPrice -&amp;gt; {Quantity[0.0, &amp;#034;Ethers&amp;#034;], &#xD;
           DateObject[{2016, 1, 1}]}&#xD;
         |&amp;gt;,&#xD;
        &amp;lt;|&#xD;
         &#xD;
         KittyBorn -&amp;gt; &#xD;
          DateObject@&#xD;
           StringDrop[&#xD;
            StringReplace[KittyData[[1, 2]], &amp;#034;Born: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], -4],&#xD;
         KittyGeneration -&amp;gt;  &#xD;
          StringReplace[KittyData[[1, 3]], &amp;#034;Generation: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;],&#xD;
         Cattributes -&amp;gt; &#xD;
          StringSplit[&#xD;
           StringReplace[&#xD;
            StringReplace[KittyData[[1, 7]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
            &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;],&#xD;
         KittySoldPrice -&amp;gt; priceInfo&#xD;
         |&amp;gt;&#xD;
        ]&#xD;
       ]&#xD;
      ]&#xD;
    &#xD;
    CattributePricePK[database_, x_Integer] :=&#xD;
     &#xD;
     Block[{list, price, kittydata = GetKittyData[database, x]},&#xD;
      If[Lookup[kittydata, KittySoldPrice] === {Quantity[0.`, &amp;#034;Ethers&amp;#034;], &#xD;
         DateObject[{2016, 1, 1}, &amp;#034;Day&amp;#034;, &amp;#034;Gregorian&amp;#034;, -4.`]},&#xD;
       {#, Quantity[0.`, &amp;#034;Ethers&amp;#034;]} &amp;amp; /@ &#xD;
        First[StringSplit[Lookup[kittydata, Cattributes], &amp;#034;,&amp;#034;]],&#xD;
       list = StringSplit[First[kittydata[[3]]], &amp;#034;,&amp;#034;];&#xD;
       If[Length[ kittydata[[4]]] == 1, price = kittydata[[4, 1, 1]], &#xD;
        price = Mean[&#xD;
          Table[kittydata[[4, n]], {n, Length[kittydata[[4, 1]]]}][[All, &#xD;
            1]]]];&#xD;
       Table[{n, price}, {n, &#xD;
         If[Length[ kittydata[[4]]] == 1, &#xD;
          StringSplit[First[kittydata[[3]]], &amp;#034;,&amp;#034;], list]}]&#xD;
       ]&#xD;
      ]&#xD;
    &#xD;
    &#xD;
    CryptoKittiesData[database_, id_, &amp;#034;FullInfo&amp;#034;] := &#xD;
     GetKittyData[database, id]&#xD;
    &#xD;
    CryptoKittiesData[database_, id_, &amp;#034;CattributesPrice&amp;#034;] := &#xD;
     CattributePricePK[database, id]&#xD;
    &#xD;
    CryptoKittiesData[database_, &amp;#034;CattributesMeanPrice&amp;#034;] := &#xD;
     Block[{cattributesSet, cleandb = DeleteCases[database, Null], &#xD;
       dblength},&#xD;
      dblength = Length[cleandb];&#xD;
      cattributesSet = &#xD;
       Flatten[CryptoKittiesData[cleandb, #, &amp;#034;CattributesPrice&amp;#034;] &amp;amp; /@ &#xD;
         Range[dblength], 1];&#xD;
      Mean[#[[All, 2]]] &amp;amp; /@ GroupBy[cattributesSet, First]&#xD;
      ]&#xD;
&#xD;
    MeanCattributesPrice = &#xD;
      CryptoKittiesData[database, &amp;#034;CattributesMeanPrice&amp;#034;][[1 ;; -15]];&#xD;
&#xD;
##Finding Patterns&#xD;
The first pattern I wanted to find was to see was if the scarcity of a cattribute is what determines the average value of the cattribute or if the scarcity of the cattribute isn&amp;#039;t related to the cattribute&amp;#039;s price. Due to some string importation errors in cattributes while compiling the cattribute-price relations, I had to find the cattributes that appeared in both the cattribute-price relations and in the cattribute-scarcity relation. Once I did that I then applied that intersection list to the cattribute-price and cattribute-scarcity relations to get two other lists that contained all of the cattributes shared between the two original lists.&#xD;
&#xD;
    completeCryptokittiesZeroSampleCounts = &#xD;
     Counts[Sort[&#xD;
        Flatten[Table[&#xD;
          Table[StringSplit[&#xD;
             StringSplit[&#xD;
               StringReplace[&#xD;
                StringReplace[database[[y, 2, 1]], &#xD;
                 &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;][[7, 1]], &#xD;
             &amp;#034;,&amp;#034;][[x]], {x, &#xD;
            Length[StringSplit[&#xD;
              StringSplit[StringReplace[StringReplace[database[[y&#xD;
                    , 2, 1]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
                &amp;#034; , &amp;#034;][[7, 1]], &amp;#034;,&amp;#034;]]}], {y, Length[database]}], &#xD;
         1]]][[15 ;; 198]]&#xD;
    &#xD;
    listofSampleZeroCounts = &#xD;
     Table[{Keys[database][[x]], Values[database][[x]]}, {x, &#xD;
       Length[database]}] &#xD;
    &#xD;
    listofSampleZeroMeanPrices = &#xD;
     Table[{Keys[MeanCattributesPrice][[x]], &#xD;
       Values[ MeanCattributesPrice][[x]]}, {x, &#xD;
       Length[MeanCattributesPrice]}]&#xD;
    &#xD;
    intersectionofLists = &#xD;
     Intersection[listofSampleZeroCounts[[All, 1]], &#xD;
      listofSampleZeroMeanPrices[[All, 1]]]&#xD;
    &#xD;
    intersectionofSampleZeroMeanPrices = &#xD;
     SortBy[Flatten[&#xD;
       Table[If[MatchQ[yay[[1]], nay], yay, Nothing], {yay, &#xD;
         listofSampleZeroMeanPrices}, {nay, intersectionofLists}], 1], &#xD;
      First]&#xD;
    &#xD;
    intersectionofSampleZeroCounts = &#xD;
     Flatten[Table[&#xD;
       If[MatchQ[yay[[1]], nay], yay, Nothing], {yay, &#xD;
        listofSampleZeroCounts}, {nay, intersectionofLists}], 1]&#xD;
&#xD;
Then I graphed the two resulting list by sorting all the cattributes in alphabetical order and placing it on the x-axis. For the first graph I showed the price in ethers on the y-axis, and in the second graph I showed how common each cattribute was on the y-axis.&#xD;
&#xD;
    BarChart[Transpose[intersectionofSampleZeroMeanPrices][[2]], &#xD;
     ChartLabels -&amp;gt; Automatic]&#xD;
&#xD;
![Mean Cattribute Price in Ethers][2]&#xD;
&#xD;
    BarChart[Transpose[intersectionofSampleZeroCounts][[2]]]&#xD;
&#xD;
![How many times each cattribute appears][3]&#xD;
&#xD;
My hypothesis assumed that the two graphs would show an inverse relationship and that the price of a cattribute would originate from its scarcity, however the graphs showed no patterns between the two, proving my hypothesis to be wrong and proving there is no relationship between the scarcity of a cattribute and the cattribute&amp;#039;s price.&#xD;
&#xD;
We can also see Benford&amp;#039;s Law apply to the first digit of the prices of the cryptokitties that were sold.&#xD;
&#xD;
    allPrices = &#xD;
      Flatten[Table[&#xD;
         If[getPriceInfo[database[[n]]] == {}, Nothing, &#xD;
          getPriceInfo[database[[n]]]], {n, Length[database]}], 1][[All, &#xD;
       1, 1]];&#xD;
    Histogram[&#xD;
     First@First[RealDigits[FractionalPart[#]*10]] &amp;amp; /@ allPrices]&#xD;
&#xD;
![Beford&amp;#039;s Law in Cryptokitties prices][4]&#xD;
&#xD;
We can also see the price of cryptokitties sold over time. In the graph, we can see that cryptokitties sold soon after the game&amp;#039;s release in November 28, 2017 to about January 2018 tended to be sold for higher prices than kitties sold in times after that period. &#xD;
&#xD;
    sortedDatesSold = &#xD;
     SortBy[Flatten[&#xD;
       Table[If[getPriceInfo[database[[n]]] == {}, Nothing, &#xD;
         getPriceInfo[database[[n]]]], {n, Length[database]}], 1], Last]&#xD;
    DateListPlot[&#xD;
     Thread[{sortedDatesSold[[All, 2]], sortedDatesSold[[All, 1]]}]]&#xD;
&#xD;
 ![Price of cryptokitties sold over time][5]&#xD;
&#xD;
Here is a microsite for looking up a cattribute and seeing what it&amp;#039;s average price is and how common it is among kitties.&#xD;
&#xD;
[Link to Finding a Cattribute&amp;#039;s Price and Commonality][6]&#xD;
&#xD;
Some more information was found by Christian Pasquel using the same data and analyzing the time difference between when a kitty was born and sold. The variable data is the same thing as database, which was a variable used earlier.&#xD;
&#xD;
    data = Import[&#xD;
       FileNameJoin[{NotebookDirectory[], &amp;#034;cryptokittiesData01.wl&amp;#034;}]];&#xD;
&#xD;
He then deleted all the kitties that had never been sold before and found the difference between the time that the kitty was born and the kitty was sold. The mean time of the difference of a kitty being born and sold was almost nine days, with many kitties being sold the same day they&amp;#039;re born and some taking half a year to be sold since their birth; the longest difference in our dataset was 164 days. The histogram below shows the distribution of differences of cats being sold since being born.&#xD;
&#xD;
    In[170]:= soldCryptokitties = &#xD;
      DeleteCases[&#xD;
       data, &amp;lt;|__, &#xD;
        KittySoldPrice -&amp;gt; {Quantity[0.`, &amp;#034;Ethers&amp;#034;], &#xD;
          DateObject[{2016, 1, 1}, &amp;#034;Day&amp;#034;, &amp;#034;Gregorian&amp;#034;, -4.`]}|&amp;gt;];&#xD;
    &#xD;
    Computing the time they stayed with her owners&#xD;
    &#xD;
    In[171]:= timeBeforeLeaving = &#xD;
      Function[ck, (First[Sort[#[[2]][[All, 2]]]] - #[[1]]) &amp;amp;@&#xD;
         Lookup[ck, {KittyBorn, KittySoldPrice}]] /@ soldCryptokitties;&#xD;
    &#xD;
    MinMax values&#xD;
    &#xD;
    In[172]:= N@UnitConvert[MinMax[timeBeforeLeaving], &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Out[172]= {Quantity[0., &amp;#034;Days&amp;#034;], Quantity[164.849, &amp;#034;Days&amp;#034;]}&#xD;
    &#xD;
    Mean time&#xD;
    &#xD;
    In[173]:= UnitConvert[Mean[timeBeforeLeaving] // N, &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Out[173]= Quantity[8.93256, &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Histogram (in days)&#xD;
    &#xD;
    In[174]:= Histogram[UnitConvert[timeBeforeLeaving, &amp;#034;Days&amp;#034;]]&#xD;
&#xD;
![Cryptokitty born-sold distribution][7]&#xD;
&#xD;
And Benford&amp;#039;s Law still applies to the born-sold distribution.&#xD;
&#xD;
    Histogram[First[IntegerDigits[#[[1]]]] &amp;amp; /@ timeBeforeLeaving]&#xD;
&#xD;
![Benford&amp;#039;s Law applied to cryptokitty born-sold distribution][8]&#xD;
&#xD;
##Future Work&#xD;
&#xD;
Gathering more data into the dataset will be beneficial. Currently, there are only 3,112 cryptokitties inside the database, which are trying to represent over 840,000 kitties. Also looking more deeply into the relationships different traits that cryptokitties have will show more complex patterns. Some of these traits include whether the kitty has parents or not, what generation it is, the genetic code of the kitty, the kitty&amp;#039;s description, and more.&#xD;
&#xD;
## Reference and other lists&#xD;
&#xD;
- [Cattribute Details][9]&#xD;
- [Cryptokitty Indexes][10]&#xD;
- [Cryptokitties Website][11]&#xD;
- [Hackernoon Cryptokitties Explanations][12]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=cryptokitties-ethereum-game.png&amp;amp;userId=1371793&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=GraphMeanPricesofCattributes.png&amp;amp;userId=1371793&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Scarcityof.png&amp;amp;userId=1371793&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=HistogramofCryptokittiesBenford%27sLaw.png&amp;amp;userId=1371793&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Cryptokittypricesovertime.png&amp;amp;userId=1371793&#xD;
  [6]: Hyperlink%5B%22https://www.wolframcloud.com/objects/d5d2d294-ef02-4053-%5C%20a0ac-9c72253d6c6a%22,%20%5C%20%22https://www.wolframcloud.com/objects/d5d2d294-ef02-4053-a0ac-%5C%209c72253d6c6a%22%5D&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Cryptokittybornsolddistribution.png&amp;amp;userId=1371793&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=BenfordsLawborn-solddistribution.png&amp;amp;userId=1371793&#xD;
  [9]: https://cryptokittydex.com/&#xD;
  [10]: https://cryptokittydex.com/kitties/527438&#xD;
  [11]: https://www.cryptokitties.co&#xD;
  [12]: https://hackernoon.com/hacking-the-cryptokitties-genome-1cb3e7dddab3</description>
    <dc:creator>Kyle Kotanchek</dc:creator>
    <dc:date>2018-07-13T19:48:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1256480">
    <title>Analysis of the Wolfram Community</title>
    <link>https://community.wolfram.com/groups/-/m/t/1256480</link>
    <description>The Wolfram Community is now ~4.5 years &amp;#039;old&amp;#039;. So time to do some analysis let&amp;#039;s go!&#xD;
&#xD;
Let&amp;#039;s download all the threads-titles, their votes, their authors et cetera:&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
    $HistoryLength=1;&#xD;
    xml=Import[&amp;#034;http://community.wolfram.com/dashboard/-/discussions-list/all+groups/Any+discussions/none/active/full/10000/1/filter&amp;#034;,&amp;#034;XMLObject&amp;#034;];&#xD;
    Export[&amp;#034;website.mx&amp;#034;,xml]&#xD;
&#xD;
This will save that output to `website.mx` file next to your notebook.&#xD;
&#xD;
Here is a small function that extract the relevant data:&#xD;
&#xD;
    ClearAll[GetThreadProperties]&#xD;
    GetThreadProperties[threadxml_]:=Module[{url,title,creator,creatorurl,views,replies,votes},&#xD;
        {url,title}=FirstCase[threadxml,XMLElement[&amp;#034;h3&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-title&amp;#034;},{_,XMLElement[&amp;#034;a&amp;#034;,{&amp;#034;shape&amp;#034;-&amp;gt;&amp;#034;rect&amp;#034;,&amp;#034;href&amp;#034;-&amp;gt;url_},{title_}],_}]:&amp;gt;{url,title},{Missing[],Missing[]},\[Infinity]];&#xD;
        {creator,creatorurl}=FirstCase[threadxml,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;metadata-entry&amp;#034;},{_,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-meta-bold&amp;#034;},{&amp;#034;CREATED BY: &amp;#034;}],_,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-meta-normal&amp;#034;},{_,XMLElement[&amp;#034;a&amp;#034;,{&amp;#034;shape&amp;#034;-&amp;gt;&amp;#034;rect&amp;#034;,&amp;#034;href&amp;#034;-&amp;gt;creatorprofileurl_},{creator_}],_}],_}]:&amp;gt;{creator,creatorprofileurl},{Missing[],Missing[]},\[Infinity]];&#xD;
        views=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;views stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{views_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;VIEWS&amp;#034;}],_}]:&amp;gt;views,Missing[],\[Infinity]];&#xD;
        replies=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;replies stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{replies_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;REPLIES&amp;#034;}],_}]:&amp;gt;replies,Missing[],\[Infinity]];&#xD;
        votes=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;votes stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{votes_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;VOTES&amp;#034;}],_}]:&amp;gt;votes,Missing[],\[Infinity]];&#xD;
        views=If[StringEndsQ[views,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[views,-1]],ToExpression@views];&#xD;
        replies=If[StringEndsQ[replies,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[replies,-1]],ToExpression@replies];&#xD;
        votes=If[StringEndsQ[votes,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[votes,-1]],ToExpression@votes];&#xD;
        &amp;lt;|&amp;#034;url&amp;#034;-&amp;gt;url,&amp;#034;title&amp;#034;-&amp;gt;title,&amp;#034;creator&amp;#034;-&amp;gt;creator,&amp;#034;views&amp;#034;-&amp;gt;views,&amp;#034;replies&amp;#034;-&amp;gt;replies,&amp;#034;votes&amp;#034;-&amp;gt;votes,&amp;#034;createrurl&amp;#034;-&amp;gt;creatorurl|&amp;gt;&#xD;
    ]&#xD;
&#xD;
Import the data from the mx file, and then get the relevant values from it using the above function, store in a dataset:&#xD;
&#xD;
    tmp=Import[&amp;#034;website.mx&amp;#034;];&#xD;
    tmp=Cases[tmp,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-abstract default-asset-publisher&amp;#034;,&amp;#034;style&amp;#034;-&amp;gt;_},___],\[Infinity]];&#xD;
    ds=Dataset[GetThreadProperties/@tmp];&#xD;
&#xD;
Here an example:&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
Let&amp;#039;s start simple and get the number of threads, the number of views, votes, and replies:&#xD;
&#xD;
    Length[ds]&#xD;
    ds[Total,{&amp;#034;views&amp;#034;,&amp;#034;votes&amp;#034;,&amp;#034;replies&amp;#034;}]&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
Nearly 8000 topics and nearing 15 mega-views!&#xD;
&#xD;
Let&amp;#039;s check the number of replies for each topic:&#xD;
&#xD;
    ListLogPlot[Tally[Normal[ds[All, &amp;#034;replies&amp;#034;]]], AxesLabel -&amp;gt; {&amp;#034;Number of replies&amp;#034;, &amp;#034;Number of threads&amp;#034;}]&#xD;
&#xD;
giving:&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
We can also plot the number of votes vs rank:&#xD;
&#xD;
    ListLogLogPlot[Flatten[Normal[Values[ds[Reverse@*SortBy[#votes&amp;amp;]][All,{&amp;#034;votes&amp;#034;}]]]],PlotRange-&amp;gt;All,AxesLabel-&amp;gt;{&amp;#034;Rank&amp;#034;,&amp;#034;Number of votes&amp;#034;},PlotMarkers-&amp;gt;{Automatic,Medium}]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Let&amp;#039;s look into my posts:&#xD;
&#xD;
    ds[Select[#creator==&amp;#034;Sander Huisman&amp;#034;&amp;amp;]/*Reverse@*SortBy[#votes&amp;amp;]]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
I&amp;#039;m very happy to see some of my posts got ~50 votes. &#xD;
&#xD;
Let&amp;#039;s have a look at the authors, who is the most active in making threads:&#xD;
&#xD;
    data=SortBy[Tally[Flatten[Normal[Values[ds[[All,{&amp;#034;creator&amp;#034;}]]]]]],Minus@*Last][[;;50]];&#xD;
    BarChart[Association[Rule@@@Reverse@data],ChartLabels-&amp;gt;Automatic,BarOrigin-&amp;gt;Left,Frame-&amp;gt;True,PerformanceGoal-&amp;gt;&amp;#034;Speed&amp;#034;,AspectRatio-&amp;gt;GoldenRatio/2,ChartStyle-&amp;gt;Directive[EdgeForm[{Thickness[Medium],Black,Opacity[1]}],RGBColor[0,0.5,1]],FrameStyle-&amp;gt;Black,FrameTicks-&amp;gt;{{Automatic,Automatic},{All,All}},ImageSize-&amp;gt;650,PlotRange-&amp;gt;{0,160},PlotRangePadding-&amp;gt;{None,{None,Scaled[0.01]}},BarSpacing-&amp;gt;None,PlotLabel-&amp;gt;Style[&amp;#034;Number of threads&amp;#034;,16,Black]]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
[@Clayton Shonkwiler][at0] is by far the author with the most posts.&#xD;
&#xD;
We can also check by number of votes:&#xD;
&#xD;
    BarChart[Sort[GroupBy[Normal[Values[ds[[All,{&amp;#034;creator&amp;#034;,&amp;#034;votes&amp;#034;}]]]],First-&amp;gt;Last,Total]][[-100;;]],ChartLabels-&amp;gt;Automatic,BarOrigin-&amp;gt;Left,Frame-&amp;gt;True,PerformanceGoal-&amp;gt;&amp;#034;Speed&amp;#034;,ScalingFunctions-&amp;gt;&amp;#034;Log&amp;#034;,AspectRatio-&amp;gt;GoldenRatio,ChartStyle-&amp;gt;Directive[EdgeForm[{Thickness[Medium],Black,Opacity[1]}],RGBColor[0,0.5,1]],FrameStyle-&amp;gt;Black,FrameTicks-&amp;gt;{{Automatic,Automatic},{All,All}},ImageSize-&amp;gt;650,PlotRange-&amp;gt;{20,3000},PlotRangePadding-&amp;gt;{None,{None,Scaled[0.01]}},PlotLabel-&amp;gt;Style[&amp;#034;Total number of votes&amp;#034;,16,Black]]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
I was surprised to see I end up second in this list!&#xD;
&#xD;
Finally let&amp;#039;s make a word cloud of the topic-titles:&#xD;
&#xD;
    WordCloud[ToLowerCase[StringRiffle[Flatten[Normal[Values[ds[[All,{&amp;#034;title&amp;#034;}]]]]]]],MaxItems-&amp;gt;150]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Hope you enjoyed this little exploration, even further analysis would be to download all the threads, but that would be quite the undertaking without access to the database directly&#xD;
&#xD;
 [at0]: http://community.wolfram.com/web/claytonshonkwiler&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.08.20.png&amp;amp;userId=73716&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.09.59.png&amp;amp;userId=73716&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.12.56.png&amp;amp;userId=73716&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=rank.png&amp;amp;userId=73716&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.16.41.png&amp;amp;userId=73716&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.18.32.png&amp;amp;userId=73716&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1517out.png&amp;amp;userId=73716&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.22.11.png&amp;amp;userId=73716</description>
    <dc:creator>Sander Huisman</dc:creator>
    <dc:date>2018-01-01T22:27:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1136926">
    <title>[WSS17] Patent Claims Analytics</title>
    <link>https://community.wolfram.com/groups/-/m/t/1136926</link>
    <description>Project on GitHub: https://github.com/lne817/WSS-17 &#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
Patent Claims Analytics&#xD;
=======================&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
Patent claims are formally worded statements within a patent application or patent, which clearly explain the invention, and define the scope of the invention. In order to enforce the full scope of a patent, it is imperative for inventors, firms, and companies to make sure that the patent&amp;#039;s scope is not covered by prior publications and competitors&amp;#039; patents (referred to as &amp;#034;prior art&amp;#034;) available in the public domain. For this reason, most companies with a patent portfolio spend a substantial amount of resources in searching for potentially troubling prior art. Therefore, this project is a first step to optimize this process and offers an analytic tool to better categorize and analyze the relationship between a granted patent with other patents by clustering them based on claim term frequency.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
 &#xD;
---------&#xD;
&#xD;
**Constructing Patent Analysis Dataset**&#xD;
&#xD;
&#xD;
&#xD;
Patent grant full text (without images) from USPTO Bulk Data Storage System (https://bulkdata.uspto.gov) are downloaded as zip files and extracted into xml files. Each patent is parsed by separating with headings of xml files and parsed. For each patent, patent information including the patent number, title, number of claims, claim text, three most frequently used words is extracted.&#xD;
&#xD;
    parsePatent[files_, numberOfPatents: (n_?IntegerQ /; Positive[n])|All, streamPosition_ : 0] :=&#xD;
    	Module[&#xD;
    		{patentsStream, patent},&#xD;
    		patentsStream = OpenRead[files];&#xD;
    		SetStreamPosition[patentsStream, streamPosition];&#xD;
    		Do[readPatent[Find[patentsStream, &amp;#034;&amp;lt;doc-number&amp;gt;&amp;#034;,&#xD;
    			RecordSeparators -&amp;gt; {{&amp;#034;&amp;lt;?xml version=\&amp;#034;1.0\&amp;#034; encoding=\&amp;#034;UTF-8\&amp;#034;?&amp;gt;&amp;#034;}, {&amp;#034;&amp;lt;/us-patent-grant&amp;gt;&amp;#034;}}]], numberOfPatents];&#xD;
    		Close[patentsStream];&#xD;
    	]&#xD;
    &#xD;
    readPatent[patent_] :=&#xD;
    	Module[&#xD;
    		{patentStream, patentInfoList, patentInfoRaw, patentInfo, claimsRaw, claims, words},&#xD;
    		patentStream = StringToStream[patent];&#xD;
    		patentInfoList = {&amp;#034;&amp;lt;doc-number&amp;gt;&amp;#034;, &amp;#034;&amp;lt;invention-title id=&amp;#034;, &amp;#034;&amp;lt;number-of-claims&amp;gt;&amp;#034;};&#xD;
    		patentInfoRaw = Find[patentStream, #] &amp;amp; /@ patentInfoList;&#xD;
    		patentInfo = StringReplace[patentInfoRaw, Shortest[&amp;#034;&amp;lt;&amp;#034;~~__~~&amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;];&#xD;
    		claimsRaw = FindList[patentStream, &amp;#034;&amp;lt;claim-text&amp;gt;&amp;#034;];&#xD;
    		claims = StringReplace[StringJoin[claimsRaw], {Shortest[&amp;#034;&amp;lt;&amp;#034;~~__~~&amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034; &amp;#034;, StringExpression[a:NumberString,&amp;#034;.&amp;#034;] -&amp;gt; StringExpression[ToExpression[a],&amp;#034;:&amp;#034;]}];&#xD;
    		AssociateTo[claimText, {patentInfo[[1]] -&amp;gt; claims}];&#xD;
    		words = DeleteCases[base[StringDelete[DeleteStopwords[ToLowerCase[StringJoin[claims, &amp;#034; &amp;#034;, patentInfo[[2]]]]], Alternatives@@dropList]], Alternatives@@blackList];&#xD;
    		AppendTo[patentAnalysisMatrix,&#xD;
    			&amp;lt;|patentInfo[[1]] -&amp;gt; &amp;lt;|&amp;#034;Title&amp;#034; -&amp;gt; patentInfo[[2]], &amp;#034;# Claims&amp;#034; -&amp;gt; patentInfo[[3]], &amp;#034;Words&amp;#034; -&amp;gt; Select[Keys[WordCounts[words]], LetterQ][[1;;3]]|&amp;gt;|&amp;gt;];&#xD;
    		(*Print[WordCloud[words]]*)&#xD;
    		Close[patentStream];&#xD;
    	]&#xD;
&#xD;
The most frequently used words are cleaned with separate lists of words to be dropped for better characterizing each patent.&#xD;
&#xD;
    Clear@base;&#xD;
    base[w_] := &#xD;
      With[{tmp = WordData[w, &amp;#034;BaseForm&amp;#034;, &amp;#034;List&amp;#034;]}, &#xD;
       If[(Head[tmp] === Missing) || tmp === {}, w, tmp[[1]]]];&#xD;
    SetAttributes[base, Listable];&#xD;
    blackList = {&amp;#034;doi&amp;#034;, &amp;#034;ed&amp;#034;, &amp;#034;isbn&amp;#034;, &amp;#034;pmid&amp;#034;};&#xD;
    dropList =&#xD;
       {&amp;#034;wherein&amp;#034;, &amp;#034;claim&amp;#034;, &amp;#034;said&amp;#034;, &amp;#034;-&amp;#034;, &amp;#034;&amp;amp;#&amp;#034;, &amp;#034;x2018&amp;#034;, &amp;#034;x2019&amp;#034;, &amp;#034;x201c&amp;#034;, &#xD;
       &amp;#034;x201d&amp;#034;, &amp;#034;;&amp;#034;, &amp;#034;/&amp;#034;, &amp;#034;&amp;#039;&amp;#034;, &amp;#034;.&amp;#034;, &#xD;
       StringExpression[&amp;#034; &amp;#034;, NumberString, &amp;#034; &amp;#034;], &#xD;
       StringExpression[&amp;#034; &amp;#034;, NumberString, &amp;#034;, &amp;#034;]};&#xD;
&#xD;
Then, we obtained a dataset with three most frequently used words in each patent for further analyses.&#xD;
![Patent information dataset with three most frequently used words in each patent.][1]&#xD;
&#xD;
&#xD;
&#xD;
---------&#xD;
&#xD;
**Clustering with Vector Representations of Words with NetModel, GloVe**&#xD;
&#xD;
GloVe is used to turn three most frequently used words in claim text into [3 x 100]-dimensional vector representations, allowing us to group them together with semantically similar data in a vector space.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
    net = NetModel[&#xD;
      &amp;#034;GloVe 100-Dimensional Word Vectors Trained on Wikipedia and Gigaword-5 Data&amp;#034;]&#xD;
    wordToVec = net /@ Normal[patentAnalysisMatrix[All, &amp;#034;Words&amp;#034;]];&#xD;
    Dimensions /@ wordToVec // Tally  (* Same dimension checked *)&#xD;
    c = ClusterClassify[Values[wordToVec]]&#xD;
&#xD;
&#xD;
 ---------&#xD;
&#xD;
**Time-Series Data using USPTO&amp;#039;s Classification Systems**&#xD;
&#xD;
Patents are classified by the USPTO into patent classes and subclasses based on the subject matter of the patent claims. Thus, we can use patent class/subclass information to group or cluster patents that have common claimed subject matter. Here, instead of the USTPO&amp;#039;s patent classification systems which have large numbers of categories and largely designed for administrative purposes, thus limiting their value for research purposes, the National Bureau of Economic Research (NBER) categories, which Hall, Jaffe, and Trajtenberg (2001) developed by aggregating USPC classes into six economically relevant technology categories (and 37 sub-categories) and classified granted patents accordingly, were applied to create the times series data.&#xD;
&#xD;
The number of patent grants in Computers &amp;amp; Communication has been greatly increased, suggesting that they are more probable to be invalidated and the applicants would need more than mere implementation for their inventions to be patent eligible.&#xD;
![Patent grant counts per category per year.][2]&#xD;
&#xD;
&#xD;
---------&#xD;
&#xD;
**Scope Checker**&#xD;
&#xD;
Lastly, we often need to explore the description (or specification) part of patent documents to clarify the scope and details which are claimed in the patent. There is also a requirement for a patent application called &amp;#034;Sufficiency of Disclosure&amp;#034; which means that it should contain sufficient information or details of patent claims so that others can reproduce. Therefore, by constructing the distance matrix between the claim sentence and description sentences, we would be able to find the most similar and related text with a given claim sentence.&#xD;
&#xD;
    patentScopeChecker[files_, patentNum_, claimNum_] :=&#xD;
     	Module[&#xD;
      		{patentsStream, patent, patentTitleRaw, patentTitle, patentText, patentTextRaw, patentSpec, claimsRaw, claims},&#xD;
      		patentsStream = OpenRead[files];&#xD;
      		patent = &#xD;
       			Find[patentsStream, patentNum, RecordSeparators -&amp;gt; {{&amp;#034;&amp;lt;?xml version=\&amp;#034;1.0\&amp;#034; \ encoding=\&amp;#034;UTF-8\&amp;#034;?&amp;gt;&amp;#034;}, {&amp;#034;&amp;lt;/us-patent-grant&amp;gt;&amp;#034;}}];&#xD;
      		patentTitleRaw = StringCases[patent, Shortest[&amp;#034;&amp;lt;invention-title id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/invention-title&amp;gt;&amp;#034;]][[1]];&#xD;
      		patentTitle = StringReplace[patentTitleRaw, Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;];&#xD;
      		patentSpec = StringReplace[StringCases[patent, Shortest[&amp;#034;&amp;lt;description id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/description&amp;gt;&amp;#034;]], &amp;#034;\n&amp;#034; -&amp;gt; &amp;#034; &amp;#034;];&#xD;
      		patentTextRaw =  StringReplace[patentSpec, {Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;,  StringExpression[NumberString, &amp;#034;.&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;}];&#xD;
      		patentText = TextSentences[StringJoin[patentTextRaw]];&#xD;
      		claimsRaw = StringReplace[StringCases[patent, Shortest[&amp;#034;&amp;lt;claims id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/claims&amp;gt;&amp;#034;]], &amp;#034;\n&amp;#034; -&amp;gt; &amp;#034; &amp;#034;];&#xD;
      		claims = Flatten[TextSentences[StringTrim[StringReplace[claimsRaw, &#xD;
                    {Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;,  StringExpression[a : NumberString, &amp;#034;.&amp;#034;] -&amp;gt; StringExpression[ToExpression[a], &amp;#034;:&amp;#034;]}]]]];&#xD;
      		Print[&amp;#034;Title: &amp;#034;, patentTitle, &amp;#034;\nClaim: &amp;#034;, claims[[claimNum]], &amp;#034;\nDescription:&amp;#034;, Nearest[patentText, claims[[claimNum]], 3]];&#xD;
      		PrependTo[patentText, claims[[claimNum]]];&#xD;
      		distanceToText = DistanceMatrix[patentText][[1]];&#xD;
      		Print[distanceToText] // MatrixForm;&#xD;
      		Print[ListLinePlot[distanceToText]];&#xD;
      		Print[NearestNeighborGraph[patentText, VertexLabels -&amp;gt; {patentText[[1]] -&amp;gt; &amp;#034;Claim&amp;#034;}]];&#xD;
      		Close[patentsStream];&#xD;
      	]&#xD;
&#xD;
Searching for details of the claim 2 in US8407580, one of the patents by Stephen Wolfram, demonstrates that the Scope Checker successfully detects the relevant details in the description/specification part of a patent document for a given claim text. These sentences correspond to the three smallest values in the DistanceMatrix between the claim text and the description text, and NearestNeighborMatrix demonstrates how the claim text is related to the description text.&#xD;
&#xD;
&#xD;
![Find by the patent number within known file name (&amp;#034;ipgYYMMDD.xml&amp;#034; for known publication date).][3]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project1.png&amp;amp;userId=1122853&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project3.PNG&amp;amp;userId=1122853&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project4.PNG&amp;amp;userId=1122853</description>
    <dc:creator>Nae Eoun Lee</dc:creator>
    <dc:date>2017-07-05T20:48:00Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1137218">
    <title>[WSS17] OCR for 8 major writing systems</title>
    <link>https://community.wolfram.com/groups/-/m/t/1137218</link>
    <description>The goal of OCR (Optical Character Recognition) is to recognize characters in images. Here is how I used convolutional neural network to create an OCR working on images of single characters that supports 8 major writing systems: Arabic, Chinese, Cyrillic, Devanagari, Greek, Japanese, Korean, and Latin.&#xD;
&#xD;
## Neural Network ##&#xD;
&#xD;
I developed my neural network based on LeNet by adding batch normalization layers, dropout layers, and more convolutional layers. Here is the architecture of my network:&#xD;
&#xD;
    OUCR = NetChain[{&#xD;
      ConvolutionLayer[32, {5, 5}, &amp;#034;PaddingSize&amp;#034; -&amp;gt; {2, 2}, &amp;#034;Stride&amp;#034; -&amp;gt; 2],&#xD;
      BatchNormalizationLayer[&amp;#034;Input&amp;#034; -&amp;gt; {32, 32, 32}],&#xD;
      ElementwiseLayer[Ramp],&#xD;
      PoolingLayer[{2, 2}, {2, 2}],&#xD;
      ConvolutionLayer[64, {3, 3}, &amp;#034;PaddingSize&amp;#034; -&amp;gt; {1, 1}],&#xD;
      BatchNormalizationLayer[&amp;#034;Input&amp;#034; -&amp;gt; {64, 16, 16}],&#xD;
      ElementwiseLayer[Ramp],&#xD;
      PoolingLayer[{2, 2}, {2, 2}],&#xD;
      ConvolutionLayer[128, {3, 3}, &amp;#034;PaddingSize&amp;#034; -&amp;gt; {1, 1}],&#xD;
      BatchNormalizationLayer[&amp;#034;Input&amp;#034; -&amp;gt; {128, 8, 8}],&#xD;
      ElementwiseLayer[Ramp],&#xD;
      PoolingLayer[{2, 2}, {2, 2}],&#xD;
      ConvolutionLayer[256, {3, 3}, &amp;#034;PaddingSize&amp;#034; -&amp;gt; {1, 1}],&#xD;
      BatchNormalizationLayer[&amp;#034;Input&amp;#034; -&amp;gt; {256, 4, 4}],&#xD;
      ElementwiseLayer[Ramp],&#xD;
      PoolingLayer[{2, 2}, {2, 2}],&#xD;
      FlattenLayer[],&#xD;
      DropoutLayer[0.5],&#xD;
      LinearLayer[],&#xD;
      SoftmaxLayer[]&#xD;
      },&#xD;
     &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, unicode}],&#xD;
     &amp;#034;Input&amp;#034; -&amp;gt; &#xD;
      NetEncoder[{&amp;#034;Image&amp;#034;, {64, 64}, &amp;#034;Grayscale&amp;#034;, &amp;#034;MeanImage&amp;#034; -&amp;gt; 0.85}]&#xD;
     ]&#xD;
&#xD;
The first convolutional layer has kernels of size 5 and stride 2 to reduce the influence of noise. The fully connected layers are very simple due to the large volume (over 32000) of classes.&#xD;
&#xD;
## Training Set ##&#xD;
&#xD;
To train my neural network, I generated over a million images of characters with different fonts and rotations using Mathematica. At first I used Rasterize[], which turned out to be so slow that it would take tens of hours to generate all the images. So I improved my algorithm by using Image[], Graphics[], and Text[] instead, which took only a few minutes. Here are the two functions I designed to generate images:&#xD;
&#xD;
    unrotated[list_, size_, scale_, font_, horizontal_, vertical_] := &#xD;
      Module[{len, col, row},&#xD;
        len = Length[list];&#xD;
        col = Floor[Sqrt[len]];&#xD;
        row = Ceiling[len / col];&#xD;
        Thread[(Join @@ &#xD;
          ImagePartition[&#xD;
            Image[&#xD;
              Graphics[&#xD;
                MapIndexed[&#xD;
                  Text[&#xD;
                    Style[#1, FontFamily -&amp;gt; font, FontSize -&amp;gt; Scaled[scale / col]],&#xD;
                    Reverse[#2]] &amp;amp;, &#xD;
                  Reverse[&#xD;
                    Partition[FromCharacterCode /@ list, UpTo[col]]&#xD;
                  ],{2}], &#xD;
                PlotRange -&amp;gt; {{horizontal, col + horizontal}, {vertical, row + vertical}},&#xD;
                ImageSize -&amp;gt; {size * col, size * row}], &#xD;
            ColorSpace -&amp;gt; &amp;#034;Grayscale&amp;#034;], size])[[;; len]]&#xD;
          -&amp;gt; &#xD;
          FromCharacterCode /@ list]]&#xD;
&#xD;
    rotated[list_, size_, scale_, font_, angle_, horizontal_, vertical_] := &#xD;
      Module[{len, col, row},&#xD;
        len = Length[list];&#xD;
        col = Floor[Sqrt[len]];&#xD;
        row = Ceiling[len / col];&#xD;
        Thread[(Join @@ &#xD;
          ImagePartition[&#xD;
            Image[&#xD;
              Graphics[&#xD;
                MapIndexed[&#xD;
                  Rotate[&#xD;
                    Text[&#xD;
                      Style[#1, FontFamily -&amp;gt; font, FontSize -&amp;gt; Scaled[scale / col]],&#xD;
                      Reverse@#2], &#xD;
                    RandomVariate[&#xD;
                      NormalDistribution[0, angle]] Degree] &amp;amp;, &#xD;
                  Reverse[&#xD;
                    Partition[FromCharacterCode /@ list, UpTo[col]]&#xD;
                  ], {2}], &#xD;
                PlotRange -&amp;gt; {{horizontal, col + horizontal}, {vertical, row + vertical}},&#xD;
                ImageSize -&amp;gt; {size * col, size * row}], &#xD;
            ColorSpace -&amp;gt; &amp;#034;Grayscale&amp;#034;], size])[[;; len]]&#xD;
          -&amp;gt; &#xD;
          FromCharacterCode /@ list]]&#xD;
&#xD;
These functions take a list of Unicodes and generate images of unrotated and rotated characters of the corresponding Unicodes. There are several tunable parameters. &amp;#034;size&amp;#034; controls the size of the images (size * size), where I used 64 for my training set. &amp;#034;scale&amp;#034; controls the scale of characters in images, where I found 0.7~0.8 suitable for most writing systems and fonts. For &amp;#034;font&amp;#034;, I chose several fonts for each language to make the characters as diverse as possible. &amp;#034;horizontal&amp;#034; and &amp;#034;vertical&amp;#034; are compensations, where 0.5 works for most cases. rotated[] also takes &amp;#034;angle&amp;#034; and generates rotated images whose rotational angles follow a normal distribution with standard deviation of &amp;#034;angle&amp;#034; degrees, where I used 4 degrees in most cases.&#xD;
&#xD;
For each font of each writing system, I generated 1 unrotated and 3 rotated images for the training set and 1 rotated image for the validation set. There was no obvious overfitting or underfitting during the training process, and after 70 rounds of training, the validation loss was down to 5*10^-3.&#xD;
&#xD;
## Tests ##&#xD;
&#xD;
Here is the bar chart of accuracies recognizing characters of each writing system, tested on random samples with random fonts and random rotations:&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
The accuracies recognizing Cyrillic, Greek, and Latin characters are rather low because some of their characters are very similar. The accuracy recognizing Latin characters is especially low because I tested on a random sample of all fonts, and Latin characters can look very different in different fonts, while many fonts don&amp;#039;t support other writing systems.&#xD;
&#xD;
Here is the bar chart of accuracies recognizing a random sample of 200 Chinese characters, tested on characters generated by the computer (different fonts), handwritten by Yan, Zhenqing (709-785, one of the best calligraphers in Chinese history, images from http://www.shufazidian.com/), and handwritten by myself (written on paper, scanned, and processed using Mathematica):&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
Two short examples of how it works (first handwritten by Yan, second handwritten by myself):&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
I also tested my network on many variations of the images, including blurring, adding noise, distortion, zooming in and out, horizontal and vertical movement, and rotation:&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
## Acknowledgements ##&#xD;
&#xD;
I would like to thank my mentor Vladimir Grankovsky for helping me along the whole project and Matteo Salvarezza and Timothée Verdier for helping me set up AWS GPU computing services.&#xD;
&#xD;
## References ##&#xD;
&#xD;
 1. Image source for Yan&amp;#039;s handwritten Chinese characters: http://www.shufazidian.com/&#xD;
 2. My GitHub repository: https://github.com/MatthewChen7211/WSS2017&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=6830WS.png&amp;amp;userId=1123149&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1449HW.png&amp;amp;userId=1123149&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-07-05at5.21.25PM.png&amp;amp;userId=1123149&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Blur.png&amp;amp;userId=1123149&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Noise.png&amp;amp;userId=1123149&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Distortion.png&amp;amp;userId=1123149&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Zoom.png&amp;amp;userId=1123149&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Horizontal.png&amp;amp;userId=1123149&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Vertical.png&amp;amp;userId=1123149&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Rotate.png&amp;amp;userId=1123149</description>
    <dc:creator>Matthew Chen</dc:creator>
    <dc:date>2017-07-05T21:51:05Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1136795">
    <title>[WSS 17] Combining content and link-based classifiers to analyze Wikipedia</title>
    <link>https://community.wolfram.com/groups/-/m/t/1136795</link>
    <description>The goal of this project was to create an algorithm that would be able to describe the scope of knowledge covered in Wikipedia. The task was approached as a classification problem. &#xD;
&#xD;
Problem&#xD;
-------&#xD;
&#xD;
In the case of Wikipedia, classification is difficult mainly for two reasons:&#xD;
&#xD;
 1. The scope keeps changing as new articles are being added and new linkages between articles are created; &#xD;
 2. Similar vocabularies may be used to describe totally different concepts in different contexts.&#xD;
&#xD;
When a new article is added, simple classification based on content is may be insufficient because it is difficult to categorize the content that is not similar to the previously learned. Links provide immediate help as it is safe to assume that a large portion of the linked articles discuss related and similar issues. &#xD;
&#xD;
Solution outline&#xD;
----------------&#xD;
&#xD;
To include both content and links, I based my solution on Iterative Classification Algorithms whose basic idea is the minimization of dissimilarity in the categories of closely linked articles. The implementation involved two classifiers: &#xD;
&#xD;
 1. A basic Content Classifier used the most frequently used words as a feature vector&#xD;
 2. A Relational Classifier used the occurrence of categories in the linked articles as a feature vector. &#xD;
In the following sections, data preparation/feature extraction methods for each classifier is explained. Then the code for each classifier is outlined.  Finally, the combined application of the two classifiers and the benefits of such combination are discussed. In conclusion, the outline for the future development of this project is detailed.&#xD;
&#xD;
Classifiers&#xD;
-----------&#xD;
&#xD;
In the ICA, the initial content categories or labels are guessed and then further improved. The guessing or initial approximation is used for training the relational and the content classifiers. &#xD;
In the project, the training data was extracted starting from a randomly selected article (Activism in this particular analysis) and collecting further linked articles until the sample size of ~4000 articles was reached. These articles were initially classified for training using:&#xD;
&#xD;
    topicCheck = Classify[&amp;#034;FacebookTopic&amp;#034;]&#xD;
&#xD;
Relational Classifier feature extraction&#xD;
========================================&#xD;
&#xD;
getWikiLinks := Function[{articleName},&#xD;
linkText = WikipediaData[articleName, &amp;#034;SummaryWikicode&amp;#034;];&#xD;
list = StringCases[linkText, &#xD;
Shortest[&amp;#034;[[&amp;#034; ~~ x__ ~~ &amp;#034;]]&amp;#034;] :&amp;gt; ToString[x]];&#xD;
list1 = &#xD;
DeleteCases[&#xD;
list, _?((StringTake[#, Min[StringLength[#], 4]] == &amp;#034;File&amp;#034; || &#xD;
StringTake[#, Min[StringLength[#], 4]] == &amp;#034;Imag&amp;#034;) &amp;amp;)];&#xD;
Clear[strListClear];&#xD;
strListClear := (If [StringPosition[#, &amp;#034;|&amp;#034;] != {}, &#xD;
pos = StringPosition[#, &amp;#034;|&amp;#034;][[1, 1]]; &#xD;
StringTake[#, pos - 1], #]) &amp;amp;;&#xD;
listOfLinks = Map[strListClear, list1];&#xD;
listOfLinks = Union[listOfLinks]]&#xD;
&#xD;
Loop through the links:&#xD;
&#xD;
    getWikiLinksAndAdd :=   Function[temp = getWikiLinks[#];    tempInitialIds =  Table[#, Length[temp]] ;    tempDataLinks0 = Transpose[{tempInitialIds, temp}]; {temp,     tempDataLinks0 }]&#xD;
&#xD;
the results of the function were saved into a file, e.g.:&#xD;
&#xD;
&amp;gt; Activism	artivism&#xD;
 &#xD;
&#xD;
&amp;gt; Activism	boycott&#xD;
&#xD;
&amp;gt; Activism	civic engagement &#xD;
&#xD;
&amp;gt; Activism	Civil Rights Movement&#xD;
&#xD;
 &amp;gt; .. and so on.*&#xD;
&#xD;
This file was further used in the relational classifier.&#xD;
&#xD;
Content classifier: Data preparation and feature extraction&#xD;
===========================================================&#xD;
&#xD;
For the content classifier, the same articles as in the relational classifier were extracted, however instead of Wikicode, plain text summary was used. The articles were classified using topicCheck classifier created above. Further, a list of most frequent nouns was extracted from each article, combined from all articles into the list of keywords and used to create a feature vector. &#xD;
&#xD;
    CreateContentFile:= Function[{uniqueArticle}, &#xD;
    	text = ToString[WikipediaData[uniqueArticle, &amp;#034;SummaryPlaintext&amp;#034;]];&#xD;
    	label = topicCheck[text]; &#xD;
    	nouns = TextCases[text, &amp;#034;Noun&amp;#034;];&#xD;
    	(*nouns = Pluralize/@ nouns;*)&#xD;
    	nouns = DeleteStopwords[ToLowerCase[nouns]];&#xD;
    	freqnouns=Sort[Counts[nouns], Greater];&#xD;
    	features =If[Length[freqnouns]&amp;gt;=1,Keys[freqnouns][[1]],&amp;#034;&amp;#034;];&#xD;
    	{features, label}&#xD;
    	]&#xD;
&#xD;
Article names, keywords, and labels were saved into wiki.content file. This file was then used to create feature vectors:&#xD;
&#xD;
    finalAllTRead = &#xD;
     Import[&amp;#034;wiki.content&amp;#034;, &amp;#034;Table&amp;#034;]&#xD;
    The features in the feature vector were assigned based on the occurrence of the keywords stem in the articles summary:&#xD;
    For[k1 = 1, k1 &amp;lt;= Length[finalAllTRead], k1++,&#xD;
     featureVector = Table[0, Length[keywords]];&#xD;
     kw = ToString[finalAllTRead[[k1, 2]]];&#xD;
     For[k2 = 1, k2 &amp;lt;= Length[keywords], k2++,&#xD;
      If[ StringPosition[kw, keywords[[k2]]] != {}, &#xD;
       featureVector[[k2]] = 1]];&#xD;
     finalAllTRead[[k1, 2]] = featureVector]&#xD;
&#xD;
The feature vector was saved into a separate file:&#xD;
&#xD;
    Export[&amp;#034;wikifeature.content&amp;#034;, finalAllTRead[[All, 2]], &amp;#034;Table&amp;#034;]&#xD;
&#xD;
Content Classifier&#xD;
==================&#xD;
&#xD;
Content classifier was trained using wiki.content and wikifeature.content data and logistic regression:&#xD;
&#xD;
    localClf=Classify[selectedFeatures?selectedLabels,Method?&amp;#034;LogisticRegression&amp;#034;];&#xD;
&#xD;
Relational Classifier&#xD;
=====================&#xD;
&#xD;
The relational classifier was also based on logistic regression and the data stored in wiki.cites file. However, before the data in the file could be used for regression purposes, it had to be transformed into suitable feature arrays and labels. The feature array had the length equal to the number of unique labels and was constructed based on the occurrence of a particular label in the articles neighbours (the articles linked to the current):&#xD;
&#xD;
    aggregate[conditionalMap_, vertice_, &#xD;
      features1_] :=(*returns a matrix: rows equal to training sample, \&#xD;
    columns equal to dataLabels equal to the amount of dataLabels in the \&#xD;
    find all connected indices*)(&#xD;
      tempFeatures = List[features1][[1]];&#xD;
      neighboursR = Select[dataLinks, Part[#, 1] == vertice &amp;amp;];&#xD;
      neighboursR = neighboursR[[All, 2]];&#xD;
      neighboursL = Select[dataLinks, Part[#, 2] == vertice &amp;amp;];&#xD;
      neighboursL = neighboursL[[All, 1]];&#xD;
      neighbours = Join[neighboursL, neighboursR];&#xD;
      For[j = 1, j &amp;lt;= Length[neighbours], j++, &#xD;
       node = neighbours[[j]];&#xD;
       labelToReinforce = Select[conditionalMap, Part[#, 1] == node &amp;amp;];&#xD;
       If[labelToReinforce != {}, &#xD;
        k = Flatten[&#xD;
           Position[uniqueLabels, labelToReinforce[[All, 2]][[1]]]][[1]];&#xD;
        If[features1[[k]] &amp;gt;= 0, tempFeatures[[k]] ++];&#xD;
        ];&#xD;
       ];&#xD;
      tempFeatures&#xD;
      )&#xD;
    &#xD;
    For [i = 1, i &amp;lt;= Length[trainIds], i++, (&#xD;
       selectedFeatures1 = &#xD;
        aggregate[conditionalMap, selectedNodes[[i]], &#xD;
         selectedFeatures[[i]]];&#xD;
       selectedFeatures[[i]] = selectedFeatures1;&#xD;
       )];&#xD;
&#xD;
Further, the labels and the feature arrays were used in the logistic regression:&#xD;
&#xD;
    relClf = Classify[selectedFeatures -&amp;gt; selectedLabels, &#xD;
      Method -&amp;gt; &amp;#034;LogisticRegression&amp;#034;]&#xD;
&#xD;
Combining the Classifiers&#xD;
=========================&#xD;
&#xD;
In the ICA, combining classifiers is used to find the optimum labels by adjusting the labels in the relational classifier in an iterated fashion until the least label diversity in the directly linked articles is reached. This was not fully implemented in the project, however, the availability of two different classifiers allowed to select the classifier with higher accuracy and choose the answer with higher probability:&#xD;
&#xD;
    relLabel = relClf[testFeature][[1]]&#xD;
    relClf[testFeature, &amp;#034;TopProbabilities&amp;#034;]&#xD;
    relLabelProbaility = &#xD;
     relClf[testFeature, &amp;#034;TopProbabilities&amp;#034;][[1]][[1, 2]]&#xD;
    &#xD;
    localLabel = localClf[dataFeatures[[1]]]&#xD;
    localLabelProb = &#xD;
     localClf[dataFeatures[[1]], &amp;#034;TopProbabilities&amp;#034;][[1, 2]]&#xD;
&#xD;
The cases where the prediction of the Content Classifier differed from the Relational classifier, and both classifiers were not confident of the answer were treated as an indication for the need of a new label:&#xD;
&#xD;
    If[(localLabel != relLabel &amp;amp;&amp;amp; localLabelProb &amp;lt; 0.5 &amp;amp;&amp;amp; &#xD;
       relLabelProbaility &amp;lt; 0.5), &#xD;
     newLabel = &#xD;
      topicCheck[ToString[getText[dataContent[[dataIds[[58]]]][[1]]]] ];&#xD;
     newId = Max[dataIds] + 1;&#xD;
     AppendTo[conditionalMap, {newId, newLabel}];&#xD;
     newFeatures = {(*recreates the feature vectors*)}]&#xD;
&#xD;
Future development&#xD;
------------------&#xD;
&#xD;
The most obvious future development is the implementation of the full ICA. It would also require improvements in the data preparation procedures and the automation of the feature vectors update when a new label is created.&#xD;
The current solution was based on links in Wikicode, however, it can be extended to the analysis of Natural text as the linkages in text may be inferred from phrases like this means that or this explains that and so on. The extension of the algorithm to the meaning extraction from the natural text should be the next goal of this project.&#xD;
&#xD;
The code for this analysis is available on GitHub: [WikiClassify][1]&#xD;
&#xD;
&#xD;
  [1]: https://github.com/tetyanaloskutova/TetyanaWSS2017/tree/master/WikiClassify</description>
    <dc:creator>Tetyana Loskutova</dc:creator>
    <dc:date>2017-07-05T21:22:04Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1011732">
    <title>Comparing translations of &amp;#034;Heart of a Dog.&amp;#034;</title>
    <link>https://community.wolfram.com/groups/-/m/t/1011732</link>
    <description>Hi Wolfram Community, &#xD;
&#xD;
This post is a branch from Vitaliy&amp;#039;s earlier thread about textual comparison. I find online pdf translations for &amp;#034;Heart of a Dog&amp;#034; and process the text as follows:&#xD;
&#xD;
[PDF Source 1][1] $\longrightarrow$ [plaintext cipher][2]&#xD;
&#xD;
[PDF Source 2][3] $\longrightarrow$ [plaintext cipher][4]&#xD;
&#xD;
It&amp;#039;s easy to get going right away with word-by-word analysis, and I produce the following distribution of words, showing fluctuations between the texts:&#xD;
&#xD;
    ParsedTexts = StringSplit[#,&amp;#034; &amp;#034;]&amp;amp;/@TextStrings (* as in the ciphers hyperlinked above *)&#xD;
    Length /@ ParsedTexts&#xD;
    Length[Union[#]] &amp;amp; /@ ParsedTexts &#xD;
    Out[1] = {32399, 34772}&#xD;
    Out[2] = {5060, 5197}&#xD;
&#xD;
    Tallies = Tally /@ ParsedTexts;&#xD;
    Words = Union @@ ParsedTexts;&#xD;
    AbsoluteTiming[&#xD;
     CompareCounts = &#xD;
       ReplaceAll[&#xD;
        Prepend[(Function[{a}, Cases[Tallies[[a]], {#, b_} :&amp;gt; b]] /@ {1, &#xD;
              2}), #] &amp;amp; /@ Words, {{} -&amp;gt; 0, {x_Integer} :&amp;gt; x}]; ]&#xD;
    CompareDiff = CompareCounts /. {x_, y_, z_} :&amp;gt; {x, y - z};&#xD;
    Histogram[CompareDiff[[All, 2]], PlotRange -&amp;gt; {{-10, 10}, {0, 3000}}]&#xD;
&#xD;
![Diff Distribution][5]&#xD;
&#xD;
The graph shows preponderance of difference around $0$, and the texts each contain about 2000 words not found in the other. This is by no means a perfect analysis, and probably contains some processing errors, so should be taken lightly. &#xD;
&#xD;
Now we can also import [Vitaliy&amp;#039;s algorithm][6]  and find some interesting results:&#xD;
&#xD;
     &#xD;
    ideaNET[text_String, order_] := &#xD;
     Module[{wordsTOP, edges, resctal, &#xD;
       words = TextWords[DeleteStopwords[ToLowerCase[text]]]}, &#xD;
      resctal = &#xD;
       Transpose[MapAt[N[Rescale[#]] &amp;amp;, Transpose[Tally[words]], 2]];&#xD;
      wordsTOP = Select[resctal, Last[#] &amp;gt;= order &amp;amp;];&#xD;
      edges = &#xD;
       UndirectedEdge @@@ &#xD;
        DeleteDuplicates[&#xD;
         Sort /@ DeleteCases[&#xD;
           Partition[Cases[words, Alternatives @@ wordsTOP[[All, 1]]], 2, &#xD;
            1], {x_String, x_String}]];&#xD;
      CommunityGraphPlot[&#xD;
       Graph[edges, &#xD;
        VertexSize -&amp;gt; &#xD;
         Thread[wordsTOP[[All, 1]] -&amp;gt; .1 + .9 wordsTOP[[All, 2]]], &#xD;
        VertexLabels -&amp;gt; Automatic, &#xD;
        VertexLabelStyle -&amp;gt; Directive[20, White, Opacity[.8]], &#xD;
        GraphStyle -&amp;gt; &amp;#034;Prototype&amp;#034;, Background -&amp;gt; Black], &#xD;
       CommunityBoundaryStyle -&amp;gt; Directive[GrayLevel[.4], Dashed], &#xD;
       CommunityRegionStyle -&amp;gt; GrayLevel[.2], ImageSize -&amp;gt; 500 {1, 1}, &#xD;
       PlotRangePadding -&amp;gt; {{.1, .3}, {0.1, 0.1}}]]&#xD;
    &#xD;
    {ideaNET[StringJoin[StringRiffle[#, &amp;#034; &amp;#034;]], .15] &amp;amp; /@ ParsedTexts,&#xD;
      ideaNET[StringJoin[StringRiffle[#, &amp;#034; &amp;#034;]], .1] &amp;amp; /@ &#xD;
       ParsedTexts} // TableForm&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
So we see that applying a variation of the cut parameter causes a bifurcation in the graphs. What is the meaning of this bifurcation? It&amp;#039;s especially intriguing when you consider that one translation graph has Zina and Darya in the same community, while the other has Zina and Darya in seperate communites. I don&amp;#039;t know much about the function CommunityGraphPlot, so maybe one of the experts here would care to comment on the meaning of this discrepancy? In any case, it&amp;#039;s nice to see this technology put to some positive use, as I would not be interested in the least, to see a graph of some social networking site. &#xD;
&#xD;
What is the next step in our Magnificent Integral? We could possibly find a way to rip the subtitles out of the following video adaptation from 1988, during the Dissolution of the Soviet Union: [ ??????? ?????? (1988)  ][8] ! &#xD;
&#xD;
To conclude, let&amp;#039;s do one last comparison of the cipher texts:&#xD;
&#xD;
According to my calculations, the name &amp;#034;Vasnetsova&amp;#034; appears twice in one of the translated texts and zero times in the other. It&amp;#039;s reminding me of a painting I&amp;#039;ve seen from inside St. Vladimir&amp;#039;s Cathedral in Kiev, [The Russian Bishops][9]. Someday it would be nice to visit the Bulgakov Museum and to tour the cathedral, but I&amp;#039;m afraid it&amp;#039;s not the year to do so. &#xD;
&#xD;
Bradley Klee &#xD;
&#xD;
&#xD;
  [1]: http://www.arvindguptatoys.com/arvindgupta/29r.pdf&#xD;
  [2]: https://ptpb.pw/8R6e&#xD;
  [3]: http://www.masterandmargarita.eu/archieven/tekstenbulgakov/heartdog.pdf&#xD;
  [4]: https://ptpb.pw/_6dj&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5607Comparison.png&amp;amp;userId=234448&#xD;
  [6]: http://community.wolfram.com/groups/-/m/t/1007290&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=IdeaNet.png&amp;amp;userId=234448&#xD;
  [8]: https://www.reelhouse.org/vintagefilmclub/the-heart-of-a-dog/video&#xD;
  [9]: https://upload.wikimedia.org/wikipedia/commons/0/06/Vasnetsov_Russian_Bishops.jpg</description>
    <dc:creator>Brad Klee</dc:creator>
    <dc:date>2017-02-10T20:35:49Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/908823">
    <title>[WSSA16] Classify Users by Internet Public Information</title>
    <link>https://community.wolfram.com/groups/-/m/t/908823</link>
    <description>**User Clustering by their Social Behaviour**&#xD;
-------------------&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
My main goal in this project was to classify internet users using information publicly available on social sites. Among the many alternatives, I chose Reddit because I was able to find a rich database. [Database][2]the whole set of comments posted during  May of 2015.&#xD;
&#xD;
The main steps of my project have been&#xD;
&#xD;
 - Learning how to work with an SQL database in Mathematica&#xD;
 - Collecting information about random users&#xD;
 - Analysing the relevance of the Subreddit present in the data&#xD;
 - Creating a user feature vector&#xD;
 - Clustering the users through their feature representation&#xD;
&#xD;
##Learning how to use the Database&#xD;
&#xD;
To start working on the database, I first checked the [database description][3] in order to correctly manipulate the data. To do that I need to know how to open SQLITE files in Mathematica. We must check the [database description][4] in order to correctly  manipulate the data.&#xD;
As it was my first time, I wanted to start easy to get an idea of what could be done. For that I chose one random person from the dataset, and then tried to collect information about him (or her). I got up to 1000 rows and the columns &amp;#034;subreddit&amp;#034; and &amp;#034;score&amp;#034;, but only if the value in the column &amp;#034;author&amp;#034; was &amp;#034;WyaOfWade&amp;#034; (a random user&amp;#039;s name). &#xD;
&#xD;
    subreddit.commentsScore=SQLSelect[database,&amp;#034;May2015&amp;#034;,{&amp;#034;subreddit&amp;#034;,&amp;#034;score&amp;#034;},&#xD;
    SQLColumn[{&amp;#034;May2015&amp;#034;,&amp;#034;author&amp;#034;}]==&amp;#034;WyaOfWade&amp;#034;,&#xD;
    &amp;#034;MaxRows&amp;#034;-&amp;gt;1000];&#xD;
&#xD;
Then I grouped the results by the first element (&amp;#034;subreddit&amp;#034;)  returning the last one (&amp;#034;score&amp;#034;), and  computing the length of the vector to see how many comments are on a given &#xD;
&#xD;
    GroupBy[commentsScore, First -&amp;gt; Last, Length]&#xD;
&#xD;
The result in Column form is&#xD;
   &#xD;
    nba-&amp;gt;306&#xD;
    nfl-&amp;gt;2&#xD;
    CoDCompetitive-&amp;gt;32&#xD;
    hiphopheads-&amp;gt;17&#xD;
    Boxing-&amp;gt;2&#xD;
    GlobalOffensive-&amp;gt;6&#xD;
    headphones-&amp;gt;8&#xD;
    food-&amp;gt;1&#xD;
    pcmasterrace-&amp;gt;1&#xD;
    leagueoflegends-&amp;gt;4&#xD;
    malefashionadvice-&amp;gt;4&#xD;
    DotA2-&amp;gt;3&#xD;
    Music-&amp;gt;2&#xD;
    OpTicGaming-&amp;gt;10&#xD;
    leakthreads-&amp;gt;2&#xD;
    AskReddit-&amp;gt;1&#xD;
    todayilearned-&amp;gt;1&#xD;
    Games-&amp;gt;1&#xD;
&#xD;
So now we have some information about a random user and can for example make a histogram for a more presentable form. Here are the the top 3 subreddits where he/she is commenting.&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
##Starting with Statistics&#xD;
&#xD;
Now we can gather statistics about more than one user, for example the first 10,000 users in the database. To reduce the noise in the data, we filter them by quantity of comments and take all users that have more than 20 comments in some subreddits.&#xD;
&#xD;
    minLength=20;&#xD;
    commentPerSub=Map[Select[GroupBy[#,First-&amp;gt;Last,Length],#&amp;gt;minLength&amp;amp;]&amp;amp;, data];&#xD;
&#xD;
    Short[commentPerSub,2]&#xD;
    &amp;lt;|rx109-&amp;gt;&amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37|&amp;gt;,WyaOfWade-&amp;gt;&amp;lt;|nba-&amp;gt;306,CoDCompetitive-&amp;gt;32|&amp;gt;,&#xD;
       Wicked_Truth-&amp;gt;&amp;lt;|politics-&amp;gt;156|&amp;gt;,jesse9o3-&amp;gt;&amp;lt;|AskReddit-&amp;gt;54,worldnews-&amp;gt;275,soccer-&amp;gt;28|&amp;gt;,&#xD;
       &amp;lt;&amp;lt;7516&amp;gt;&amp;gt;,Zandock-&amp;gt;&amp;lt;|fireemblem-&amp;gt;57|&amp;gt;,RandomRem-&amp;gt;&amp;lt;||&amp;gt;,Op69dong-&amp;gt;&amp;lt;||&amp;gt;|&amp;gt;&#xD;
&#xD;
This way we find ourseves with  4468 users. Here is the distribution of the amount of subreddits each user commented in. Most users only have significant activity (more than 20 comments) in one subreddit.&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
##Subreddit analysis&#xD;
&#xD;
It&amp;#039;s time to start the Subreddit analysis. I first got the list of all subs (1812 of them are present in my data).&#xD;
&#xD;
    allSubs = Merge[Values[commentPerSub], Total];&#xD;
&#xD;
    Length[allSubs]&#xD;
    1812&#xD;
&#xD;
Here are the first five by number of comments&#xD;
&#xD;
TakeLargest[allSubs, 5]&#xD;
&#xD;
    &amp;lt;|&amp;#034;AskReddit&amp;#034; -&amp;gt; 85288, &amp;#034;nba&amp;#034; -&amp;gt; 48097, &amp;#034;nfl&amp;#034; -&amp;gt; 43888, &#xD;
     &amp;#034;leagueoflegends&amp;#034; -&amp;gt; 27483, &amp;#034;hockey&amp;#034; -&amp;gt; 18535|&amp;gt;&#xD;
&#xD;
We can see that AskReddit is very popular sub so user commenting on it are probably not very correlated by interestsTherefore I decided to drop it from the list. Now I can have a look at the plot of each subreddit vs its number of comments.&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
##User representation&#xD;
&#xD;
Now I have enough information about subreddits and users for creating user vectors which we will use in user&amp;#039;s classification.So let&amp;#039;s create an  empty user vector with zero comments for each sub, then replace the values for each user into empty vector.The new association as values for each subreddit.&#xD;
&#xD;
    (*Create an empty user vector with zero comments for each sub*)&#xD;
    userVectorEmpty = Association[Thread[Keys[allSubs] -&amp;gt; 0]];&#xD;
&#xD;
    Short[userVectorEmpty]&#xD;
    &amp;lt;|newsokur-&amp;gt;0,BakaNewsJP-&amp;gt;0,nba-&amp;gt;0,&amp;lt;&amp;lt;1806&amp;gt;&amp;gt;,shorthairedhotties-&amp;gt;0,uwaterloo-&amp;gt;0|&amp;gt;&#xD;
&#xD;
    (*Replace values for each user into the empty vector*)&#xD;
    extendedCommentPerSub = Join[userVectorEmpty, #] &amp;amp; /@ Values[commentPerSub];&#xD;
&#xD;
The new association as values for each subreddit&#xD;
&#xD;
    First[commentPerSub]&#xD;
    Short[First[extendedCommentPerSub]]&#xD;
    &amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37|&amp;gt;&#xD;
    &amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37,nba-&amp;gt;0,&amp;lt;&amp;lt;1806&amp;gt;&amp;gt;,shorthairedhotties-&amp;gt;0,uwaterloo-&amp;gt;0|&amp;gt;&#xD;
&#xD;
    (*Create an empty user vector with zero comments for each sub and remove the \&#xD;
    subreddit names*)&#xD;
    userVectors = Values[Join[userVectorEmpty, #]] &amp;amp; /@ commentPerSub;&#xD;
    (*save the name of the users*)&#xD;
    userNames = Keys[userVectors];&#xD;
    (*remove also the keys with the users, now userVectors is just a normal \&#xD;
    matrix*)&#xD;
    userVectors = Values[userVectors];&#xD;
    (*normalize each vector user by dividing for the total number of comments per \&#xD;
    subreddit*)&#xD;
    userVectors = Transpose[Transpose[userVectors]/Values[allSubs]];&#xD;
&#xD;
This is a plot of all the users vectors.&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
##User classification&#xD;
&#xD;
We want to build a similarity function to identify users with common interests&#xD;
&#xD;
    similarity[v1_,v2_]:=v1.v2/(Norm[v1]Norm[v2])&#xD;
&#xD;
The norm at the denominator are computed separately for efficiency&#xD;
&#xD;
    norms=Norm/@N[userVectors];&#xD;
    normMatrix=Transpose[{norms}].{norms};&#xD;
&#xD;
This builds the similarity matrix&#xD;
&#xD;
    similarityMatrix=N[userVectors].Transpose[N[userVectors]]/normMatrix;&#xD;
&#xD;
I want all the values below a certain threshold to be zero. I.e. no connection between the users. I also subtract the diagonal not to connect users with themselves&#xD;
&#xD;
    similarityThreshold=.75;    &#xD;
    m2=Threshold[similarityMatrix-IdentityMatrix[Length[userVectors]],similarityThreshold];&#xD;
&#xD;
All the rest is set to one&#xD;
&#xD;
    m3=Ceiling[m2];&#xD;
&#xD;
Now the graph is build from the adjacency matrix&#xD;
&#xD;
    AdjacencyGraph[m3]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
In this graph there are 1625 disconnected components&#xD;
&#xD;
    graphComponents=ConnectedGraphComponents[fullGraph];&#xD;
    Length[graphComponents]&#xD;
    1625&#xD;
&#xD;
If I remove the components with only one element (i. e. the cluster of only one user) I am down to 592&#xD;
&#xD;
    graphComponents=Select[graphComponents,VertexCount[#]&amp;gt;1&amp;amp;];&#xD;
    Length[graphComponents]&#xD;
    592&#xD;
&#xD;
Each disconnected component represent now a group of users with similar commenting patterns---and hopefully similar interests.&#xD;
Here are five of them&#xD;
&#xD;
    Grid[{#,commentPerSub[[VertexList[#]]]}&amp;amp;/@RandomSample[graphComponents,5]]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
As we can see all these group of users have high activity on the same Subreddits.&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=UserClassifier.png&amp;amp;userId=900523&#xD;
  [2]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [3]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [4]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot_1.png&amp;amp;userId=900523&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Plorium.png&amp;amp;userId=900523&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-08-19at15.17.15.png&amp;amp;userId=900523&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=SqlExplore4.png&amp;amp;userId=900523&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=2410Final_05.png&amp;amp;userId=900523&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5examples.png&amp;amp;userId=900523</description>
    <dc:creator>Armen Barseghyan</dc:creator>
    <dc:date>2016-08-19T15:19:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/908332">
    <title>[WSSA16] Natural language compression Huffman Method</title>
    <link>https://community.wolfram.com/groups/-/m/t/908332</link>
    <description>**Abstract** &#xD;
&#xD;
   The goal of this project is to implement the Huffman lossless data compression algorithm which is a compression algorithm based on the frequency of data. The trick is that the words which are more commonly used must be shorter than the words which are less common. The English language already uses this approach, for example, the word &amp;#034;the&amp;#034; is frequently used and short but the word &amp;#034;approximation&amp;#034;, which is much less frequent is longer.&#xD;
&#xD;
 - Introduction to Huffman coding&#xD;
 - Word frequency data &#xD;
 - Huffman algorithm code in Mathematica and a few examples &#xD;
 - Correlation between words and Huffman codes&#xD;
&#xD;
**Introduction to Huffman coding**&#xD;
&#xD;
   Huffman coding is a statistical technique, which attempts to reduce the amount of bits required to represent a string or a symbol. The concept of Huffman algorithm is that the shorter binary codes are assigned to the most frequently used symbols and longer codes to the symbols which appear less frequently. The Huffman code for an alphabet (set of symbols or words) may be generated by constructing a binary tree with nodes containing the symbols to be encoded and their probabilities of occurrence (that&amp;#039;s where the statistical part comes in). This means that you must know all of the symbols that will be encoded and their probabilities prior to constructing a tree. In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The algorithm was originally developed by David A. Huffman.&#xD;
&#xD;
&#xD;
**Word frequency data:**&#xD;
&#xD;
As an input for the Huffman coding algorithm, we use the 5000 most frequently used words in English. See the database &#xD;
[Here][1].&#xD;
The following is the  visualization of most commonly used words,&#xD;
&#xD;
 $\qquad \qquad \qquad \qquad \qquad \qquad $![enter image description here][2]&#xD;
&#xD;
&#xD;
 **Examples of Huffman codes**&#xD;
&#xD;
&#xD;
    merge[k_] := &#xD;
      Replace[k, {{a_, aC_}, {b_, bC_}, rest___} :&amp;gt; {{{a, b}, aC + bC}, &#xD;
         rest}];&#xD;
    &#xD;
    mergeSort[d_List] := FixedPoint[merge @ SortBy[#, Last] &amp;amp;, d][[1, 1]];&#xD;
    &#xD;
    findPosition[l_List, k_List] := Map[&#xD;
        (# -&amp;gt; Flatten[Position[k, #] - 1]) &amp;amp;,&#xD;
        DeleteDuplicates[l]&#xD;
    ];&#xD;
    &#xD;
    huffman[l_List] := Module[{sortList, code, words},&#xD;
      words = l[[All, 1]];&#xD;
      sortList = mergeSort[l];&#xD;
      code = findPosition[words, sortList];&#xD;
      {Flatten[l /. code], code};&#xD;
      code&#xD;
    ]&#xD;
&#xD;
These are a few examples of encoded words using Huffman algorithm &#xD;
&#xD;
 $\qquad \qquad \qquad \qquad \qquad \qquad $![enter image description here][3]&#xD;
&#xD;
&#xD;
 **Correlation between words and Huffman codes**&#xD;
&#xD;
The following is the correlation plot of the numbers of letters in a word and number of bits produced by Huffman algorithm.&#xD;
As you can see from the plot the most commonly used words in English tend to be shorter and the overall the trend in English and in Huffman code is the same.&#xD;
&#xD;
&#xD;
 $\qquad \qquad \qquad \qquad \qquad \qquad $![enter image description here][4]&#xD;
&#xD;
The following plot represents the number of bits of English words and the number of bits of Huffman codes. The number of bits per English word was computed using a conversion factor of $\log_2(26) ~ 4.7$ bits per word, where 26 is the number of letters in the English alphabet.&#xD;
&#xD;
&#xD;
 $\qquad \qquad \qquad \qquad \qquad \qquad $![enter image description here][5]&#xD;
&#xD;
The blue line is a scatter plot of the number of bits in English versus the number of bits in the Huffman code. The red line is $y=x$. .As you can see the Huffman coding is much more  efficient and the slope of the curve tells us that the Huffman coding uses three times less space than the English language.&#xD;
&#xD;
  [1]: https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists/PG/2006/04/1-10000&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=wordcloud.png&amp;amp;userId=900670&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Matrix.PNG&amp;amp;userId=900670&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=corr.png&amp;amp;userId=900670&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5310corr.png&amp;amp;userId=900670</description>
    <dc:creator>Vahagn Hayrapetyan</dc:creator>
    <dc:date>2016-08-19T12:34:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/796831">
    <title>[Call] for talks at Oxford&amp;#039;s Digital Humanities Summer School [Oxford]</title>
    <link>https://community.wolfram.com/groups/-/m/t/796831</link>
    <description>[Martin Hadley][1] and I are organizing a 5-day Wolfram Language workshop at Oxfords [Digital Humanities Summer School][2] Analysing Humanities Data: An Introduction to Knowledge-Based Computing with the Wolfram Language. Heres a brief overview from the course description:&#xD;
&#xD;
&amp;gt; This example-led workshop will provide a comprehensive introduction to techniques for analysing a wide range of humanities data with the Wolfram Language; from text analysis, image processing, and visualization, to network analysis, time-related and geographic computation, and machine learning. The course assumes no prior knowledge of any programming language. Participants will learn the concepts needed to import, manipulate, and analyse humanities data using both the natural-language input and scripted interfaces to the Wolfram Language and to share their data and applications in the cloud. Part of the material in the course will be drawn from William Turkels open-access textbook, *[Digital Research Methods with Mathematica][3]* &#xD;
&#xD;
Were looking for one or two experienced WL users who would be interested in coming to Oxford between July 4th and 8th (at our expense, naturally) to give a c. 3/4 or hour long presentation/talk on some aspect of the WL relevant to the humanities. This need not be text related! Yes, we do more than just read old books :^) Potential topics for your presentation might include geodata &amp;amp; geocomputation, network analysis, general graphing &amp;amp; plotting, time series analysis, an intro. to machine learning, sound analysis &amp;amp; sonification, using MMA with R-Link etc. &#xD;
 &#xD;
Martin (who is a data scientist for Oxford University IT Services, and previously worked as a consultant for Wolfram Research,([https://uk.linkedin.com/in/martinjohnhadley][4]) will be teaching the course. My research background is in the humanities (Im digital project manager for [http://culturesofknowledge.org][5]) and I am still a WL beginner, so I&amp;#039;m collaborating with Martin to make our examples and data as relevant as possible to our predominantly &amp;#039;newbie&amp;#039; humanities/social sciences audience. &#xD;
&#xD;
If youre at all interested or curious to learn more, please let us know sooner rather than later, as wed like to firm up the syllabus quite soon. We can host you for one or two nights in Oxford (including travel) if youd like to give one presentation, or for as long as 5 days if youd like to stay longer and give two talks (or perhaps even assist us with running the class itself). &#xD;
&#xD;
Although we didnt plan this, this is a particularly auspicious time to be learning the WL for the first time, with lots of new resources newly available from WR and elsewhere, and huge potential for applying it in the humanities. &#xD;
&#xD;
&#xD;
  [1]: https://uk.linkedin.com/in/martinjohnhadley&#xD;
  [2]: http://digital.humanities.ox.ac.uk/dhoxss/2016&#xD;
  [3]: http://williamjturkel.net/digital-research-methods-with-mathematica&#xD;
  [4]: https://uk.linkedin.com/in/martinjohnhadley&#xD;
  [5]: http://culturesofknowledge.org</description>
    <dc:creator>Arno Bosse</dc:creator>
    <dc:date>2016-02-19T20:05:22Z</dc:date>
  </item>
</rdf:RDF>

