<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.2d1 20130915//EN" "http://jats.nlm.nih.gov/archiving/1.2d1/JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta id="journal-meta-1">
      <journal-title-group>
        <journal-title>The Academic Research Community Publication</journal-title>
      </journal-title-group>
      <publisher>
        <publisher-name>IEREK Press</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta id="article-meta-1">
      <title-group>
        <article-title id="at-ec40">[ANT]: A Machine Learning Approach for Building Performance Simulation: Methods and Development </article-title>
      </title-group>
      <contrib-group>
        <contrib id="c-b4fe">
          <name id="n-32d4">
            <given-names>Mahmoud M. Abdelrahman</given-names>
          </name>
          <xref id="x-5674" rid="a-5cc8" ref-type="aff">1</xref>
        </contrib>
        <contrib id="c-8469">
          <name id="n-bd98">
            <given-names>Ahmed Mohamed Yousef Toutou</given-names>
          </name>
          <xref id="x-437f" rid="a-ec5a" ref-type="aff">2</xref>
        </contrib>
        <aff id="a-5cc8">
          <institution>Kafrelsheikh University - Kafrelsheikh - Egypt. The American University in Cairo - Cairo – Egypt</institution>
        </aff>
        <aff id="a-ec5a">
          <institution>Master Student in Alexandria University, B.Sc. Mansoura University</institution>
        </aff>
      </contrib-group>
      <abstract id="abstract-1fef">
        <title id="abstract-title-d007">Abstract</title>
        <p id="p-87a6">In this paper, we represent an approach for combining machine learning (ML) techniques with building performance simulation by introducing four methods in which ML could be effectively involved in this field i.e. Classification, Regression, Clustering and Model selection . Rhino-3d-Grasshopper SDK was used to develop a new plugin for involving machine learning in design process using Python programming language and making use of scikit-learn module, that is, a python module which provides a general purpose high level language to non-specialist user by integration of wide range supervised and unsupervised learning algorithms with high performance, ease of use and well documented features. ANT plugin provides a method to make use of these modules inside Rhino<x>\</x>Grasshopper to be handy to designers. This tool is open source and is released under BSD simplified license. This approach represents promising results regarding making use of data in automating building performance development and could be widely applied. Future studies include providing parallel computation facility using PyOpenCL module as well as computer vision integration using scikit-image. </p>
      </abstract>
      <kwd-group id="kwd-group-1">
        <title>Keywords</title>
        <kwd>Machine Learning; ML; building performance simulation; Rhino3d; Python; Scikit-learn; grasshopper.</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec>
      <title id="t-e51a">Introduction</title>
      <sec>
        <title id="t-f1a1">Machine learning in architecture and design.  </title>
        <p id="p-54a0">Machine learning could be defined as: "Learning from data" (Abu-Mostafa, Magdon-Ismail, and Lin 2012) by considering a set of n samples of data which is used to predict properties of unknown data, each sample could have more than one variable (multivariable data), these variables are called features. Learning problems could be separated into two main categories i.e. supervised and unsupervised learning, the former consists of training data and targets set by users and the machine role is to classify a new unlabeled input data (classification) or to predict an output value of continuous data type (regression). While the latter only consists of data without targets and, in this case, the machine role is to predict a relation between these data (clustering) or determine the distribution of data within input space (density estimation) or to project data from multi-dimensional space into 2d or 3d space (Pedregosa et al. 2011).In architecture and design, machine learning has been increasingly used in several studies during the last two decades due to the complexity and non-linearity of real-world multi-variable relations. Its applications in architecture and design are rapidly mutating.</p>
        <p id="p-87ff">By reviewing the CumInCAD database ( a Cumulative Index about publications in Computer Aided Architectural Design supported by the sibling associations ACADIA, CAADRIA, eCAADe, SIGraDi, ASCAAD and CAAD futures ), it has been monitored that machine learning topics (including supervised, unsupervised and convolution neural networks CNN) are growing over the past few years. Figure (1) shows the number of papers which are related to this topic.</p>
        <fig id="f-9f5b" orientation="potrait" width="twocolumn" fig-type="graphic" position="anchor">
          <graphic id="g-99d2" xlink:href="https://typeset-prod-media-server.s3.amazonaws.com/article_uploads/ea57f091-2ad4-4fc4-810a-f7168d1b3b5b/image/59f9639c-14a1-4611-95ee-0a9f85e45aff-u1.jpg"/>
          <label>Figure 1 </label>
          <caption id="c-d6fd">
            <title id="t-9442">Machine learningrelated papers by year (collected from CumInCAD website).</title>
          </caption>
        </fig>
        <table-wrap id="tw-8c7b" orientation="potrait" width="twocolumn">
          <label>Table 1</label>
          <caption id="c-1b5f">
            <title id="t-2f99">Review of recent architecture-and-design-basedMachine Learning articles.  </title>
          </caption>
          <table id="table-1" rules="rows">
            <colgroup/>
            <tbody id="table-section-1">
              <tr id="table-row-1">
                <td id="table-cell-1" rules="bottom" align="left">Category</td>
                <td id="table-cell-2" rules="bottom" align="left">Reference</td>
              </tr>
              <tr id="table-row-2">
                <td id="table-cell-3" rules="bottom" align="left">Architecture and design</td>
                <td id="table-cell-4" rules="bottom" align="left">(Vardouli 2013, Paterson et al. 2013, Cutellic and Lotte 2013, Bernhard 2013, Fernando et al. 2010, Tamke et al. 2016, Silvestre, Ikeda, and Guéna 2016, Stasiuk, Thomsen, and Thompson 2014) </td>
              </tr>
              <tr id="table-row-3">
                <td id="table-cell-5" rules="bottom" align="left">Urban design</td>
                <td id="table-cell-6" rules="bottom" align="left">(Chen et al. 2017, Laskari 2014, Sokmenoglu, Cagdas, and Sarıyıldız 2010, Wassermann 2010, Stouffs et al. 2013, Carlos Sandoval Olascoaga 2016, Oh et al. 2006) </td>
              </tr>
              <tr id="table-row-4">
                <td id="table-cell-7" rules="bottom" align="left">Robotics, Automation and Fabrication</td>
                <td id="table-cell-8" rules="bottom" align="left">(Decker 2015, Pinochet 2016, Chi-Li Cheng 2016, Arenas and Falcón 2013, Harrison 2016) </td>
              </tr>
              <tr id="table-row-5">
                <td id="table-cell-9" rules="bottom" align="left">Building performance and Simulation</td>
                <td id="table-cell-10" rules="bottom" align="left">(Wilkinson et al. 2013, Merrick, Maher, and Saunders 2008, Mahalingam 2005, Khosrowpour, Gulbinas, and Taylor 2016, Davis 2016, Standfest 2014, de Wilde et al. 2013, Yildiz, Bilbao, and Sproul 2017, Paudel et al. 2017, Kontokosta and Tull 2017, Banihashemi, Ding, and Wang 2017, Deb et al. 2016, Cui et al. 2016, Chou and Ngo 2016, Zarkadis, Ridi, and Morel 2014) </td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <p id="p-8179">In spite of its emerging importance and popularity, Machine learning requires a good knowledge in programming languages which is not affordable to all designers and engineers. However, visual programming tools such as Rhino<x>\</x>Grasshopper recently has gained increasing interest by a large body of architects and designers as the most popular algorithmic modeling tool due to its ease of use, user-friendly interface, flexibility, scalability in addition to its ability to be functionally extended by its plugin ecosystem to interact with both other software and other hardware using its software development kit (SDK) e.g. C# and Python RhinoCommon and grasshopper sdk.</p>
      </sec>
      <sec>
        <title id="t-5ce3">  Scikit-learn. </title>
        <p id="p-2a47">Scikit-learn is a popular open-source machine learning module (Pedregosa et al. 2011) developed and distributed under simplified BSD license, coded in Python and written to be simple, efficient and handy to non-expert users, as well as , it brings high level machine learning algorithms i.e. supervised and unsupervised learning to be usable in different contexts. There are many other Python machine learning modules but in this project, scikit-learn has been chosen for the following reasons (Buitinck et al. 2013): Its ease of use, robustness i.e. (code has followed specific quality guidelines such as consistency and unit-testing), documentation and examples covering all features, efficiency (time and resources), table (2) summarizes a comparison between machine learning modules .However, this library and its classes and functions are designed to be integrated with scientific and numerical modules in python such as NumPy (Walt, Colbert, and Varoquaux 2011), and SciPy (Oliphant 2007) because datasets are represented as either Numpy arrays of Scipy sparse matrices (Buitinck et al. 2013).</p>
        <table-wrap id="tw-3c49" orientation="potrait" width="twocolumn">
          <label>Table 2</label>
          <caption id="c-fb68">
            <title id="t-c752">Comparison between Python-based ML modules (classes time efficiency andlicense) (Pedregosa et al. 2011).</title>
          </caption>
          <table id="t-5b8f" rules="rows">
            <colgroup/>
            <tbody id="ts-2a04">
              <tr id="tr-62a0">
                <td id="tc-d0c6" rules="bottom" align="left">Algorithm</td>
                <td id="tc-9942" rules="bottom" align="left">scikit-learn</td>
                <td id="tc-3c61" rules="bottom" align="left">mlpy</td>
                <td id="tc-c10f" rules="bottom" align="left">pybrain</td>
                <td id="tc-c702" rules="bottom" align="left">pymvpa</td>
                <td id="tc-ee56" rules="bottom" align="left">mdp</td>
                <td id="tc-0f1c" rules="bottom" align="left">shogun</td>
              </tr>
              <tr id="tr-9b2e">
                <td id="tc-b502" rules="bottom" align="left">Support vector classification</td>
                <td id="tc-9c4e" rules="bottom" align="left">5.2</td>
                <td id="tc-befc" rules="bottom" align="left">9.47</td>
                <td id="table-cell-11" rules="bottom" align="left">17.5</td>
                <td id="table-cell-12" rules="bottom" align="left">11.52</td>
                <td id="table-cell-13" rules="bottom" align="left">40.48</td>
                <td id="table-cell-14" rules="bottom" align="left">5.63</td>
              </tr>
              <tr id="tr-9642">
                <td id="table-cell-15" rules="bottom" align="left">Lasso (LARS)</td>
                <td id="table-cell-16" rules="bottom" align="left">1.17</td>
                <td id="table-cell-17" rules="bottom" align="left">105.3</td>
                <td id="table-cell-18" rules="bottom" align="left">-</td>
                <td id="table-cell-19" rules="bottom" align="left">37.35</td>
                <td id="table-cell-20" rules="bottom" align="left">-</td>
                <td id="table-cell-21" rules="bottom" align="left">-</td>
              </tr>
              <tr id="tr-0ec6">
                <td id="table-cell-22" rules="bottom" align="left">Elastic Net</td>
                <td id="table-cell-23" rules="bottom" align="left">0.52</td>
                <td id="table-cell-24" rules="bottom" align="left">73.7</td>
                <td id="table-cell-25" rules="bottom" align="left">-</td>
                <td id="table-cell-26" rules="bottom" align="left">1.44</td>
                <td id="table-cell-27" rules="bottom" align="left">-</td>
                <td id="table-cell-28" rules="bottom" align="left">-</td>
              </tr>
              <tr id="tr-5c4b">
                <td id="table-cell-29" rules="bottom" align="left">k-Nearest Neighbors</td>
                <td id="table-cell-30" rules="bottom" align="left">0.57</td>
                <td id="table-cell-31" rules="bottom" align="left">1.41</td>
                <td id="table-cell-32" rules="bottom" align="left">-</td>
                <td id="table-cell-33" rules="bottom" align="left">0.56</td>
                <td id="table-cell-34" rules="bottom" align="left">0.58</td>
                <td id="table-cell-35" rules="bottom" align="left">1.36</td>
              </tr>
              <tr id="table-row-6">
                <td id="table-cell-36" rules="bottom" align="left">PCA (9 components)</td>
                <td id="table-cell-37" rules="bottom" align="left">0.18</td>
                <td id="table-cell-38" rules="bottom" align="left">-</td>
                <td id="table-cell-39" rules="bottom" align="left">-</td>
                <td id="table-cell-40" rules="bottom" align="left">8.93</td>
                <td id="table-cell-41" rules="bottom" align="left">0.47</td>
                <td id="table-cell-42" rules="bottom" align="left">0.33</td>
              </tr>
              <tr id="table-row-7">
                <td id="table-cell-43" rules="bottom" align="left">k-Means (9 clusters)</td>
                <td id="table-cell-44" rules="bottom" align="left">1.34</td>
                <td id="table-cell-45" rules="bottom" align="left">0.79</td>
                <td id="table-cell-46" rules="bottom" align="left">*</td>
                <td id="table-cell-47" rules="bottom" align="left">-</td>
                <td id="table-cell-48" rules="bottom" align="left">35.75</td>
                <td id="table-cell-49" rules="bottom" align="left">0.68</td>
              </tr>
              <tr id="table-row-8">
                <td id="table-cell-50" rules="bottom" align="left">License</td>
                <td id="table-cell-51" rules="bottom" align="left">BSD</td>
                <td id="table-cell-52" rules="bottom" align="left">GPL</td>
                <td id="table-cell-53" rules="bottom" align="left">BSD</td>
                <td id="table-cell-54" rules="bottom" align="left">BSD</td>
                <td id="table-cell-55" rules="bottom" align="left">BSD</td>
                <td id="table-cell-56" rules="bottom" align="left">GPL</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
      </sec>
      <sec>
        <title id="t-ae28">Python for science and computation.</title>
        <p id="p-d06c">Python is one of the most popular programming languages among scientific computing community for its steadily expanding development ecosystem besides having a full range of sophisticated features such as first-class functions, garbage collection and expansion handling in addition to being an object oriented scripting language which can run on many platforms. Also it can be managed to make the best of the hardware speed available. Furthermore it is easy to use, subject to multidisciplinary large body of user community, above and beyond, it can be embedded into existing applications and interact with a variety of software. These reasons made this language rapidly gains interest by scientific computation users. </p>
        <p id="p-99f0">This research aims to make use of Python scikit-learn module and Rhino/Grasshopper for the sake of bringing sophisticated machine learning libraries to be manageable to architects and designers who are not specialized in machine learning but at the same time concerned with using its approaches in their work by introducing a plugin for Rhino<x>\</x>Grasshopper called Ant developed using C# and Python. </p>
      </sec>
    </sec>
    <sec>
      <title id="t-3627">Plugin structure.</title>
      <p id="p-7e9d">The structure of the plugin has followed a particular method consisted of three main segments, these are: 1) Data-sets such as data instances, targets and training data, 2) Grasshopper interaction such as components, numerical inputs etc… ,and 3) Python modules such as Numpy, SciPy and scikit-learn as shown in figure (2). </p>
      <fig id="f-45e2" orientation="potrait" width="twocolumn" fig-type="graphic" position="anchor">
        <graphic id="g-38c2" xlink:href="https://typeset-prod-media-server.s3.amazonaws.com/article_uploads/ea57f091-2ad4-4fc4-810a-f7168d1b3b5b/image/4b468098-959e-4a94-927e-f4a55f50a996-u2.jpg" width="89"/>
        <label>Figure 2 </label>
        <caption id="c-c360">
          <title id="t-e521">Structure of Antplugin.</title>
        </caption>
      </fig>
      <p id="p-f987"><x/> </p>
      <sec>
        <title id="t-4bf5">Input data</title>
        <p id="p-12ef">The data input is categorized into three main portions:</p>
        <p id="t-3a99">- <italic id="e-973b">Data instances</italic> i.e. the real-world data which are used for the fitting process, it comes in form of 2d array with shape <italic id="e-53a5">(#_samples</italic>, <italic id="e-a98f">#_features</italic>). The term "features" refers to the explanatory variables which are used for training, it should have a label and be of numerical data type either continuous, discrete or binary. </p>
        <p id="p-43aa">- <italic id="e-8350">Targets </italic>i.e. the response variables for each data sample, it comes in a form of vector <inline-formula id="if-15de"> <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>x</mi><mrow><mi>i</mi><mo> </mo></mrow></msub><mo>∈</mo><msup><mi mathvariant="normal">ℝ</mi><mo>+</mo></msup><mo>,</mo><mo> </mo><mi>i</mi><mo>=</mo><mn>1</mn><mo>,</mo><mo> </mo><mo>.</mo><mo>.</mo><mo>.</mo><mo> </mo><mi>n</mi><mo>:</mo><mi>n</mi><mo>=</mo><mo>#</mo><mo> </mo><mi>o</mi><mi>f</mi><mo> </mo><mi>s</mi><mi>a</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>s</mi></math></inline-formula> , that is each sample refers to one target as follows: </p>
        <p id="p-d6bf">Where i<sub id="s-aaeb">n</sub> refers to the input number, f<sub id="s-3123">n</sub> refers to the feature number and t<sub id="s-4944">n </sub>refers to the target number. </p>
        <p id="p-9639">The present plugin has been developed so that it is able to read data of different types such as comma separated values (CSV) file, Microsoft excel files (.xls, .xlsx) files or structured query language e.g. MySQL data file.</p>
        <p id="p-fdf6">- <italic id="e-cd5d">Data to predict: </italic>These data are the unknown data numeric variables are predicted for instance, given unlabeled observations X, returns the predicted labels y. It comes in a form of 1D array of shape (#_features, 1).</p>
        <p id="p-01fd">The grasshopper data-set components are shown in figure (3-a). The data input has been dsigned to follow an exact structure as shown in figure (3-b)</p>
        <fig id="f-097d" orientation="potrait" width="twocolumn" fig-type="graphic" position="anchor">
          <graphic id="g-a506" xlink:href="https://typeset-prod-media-server.s3.amazonaws.com/article_uploads/ea57f091-2ad4-4fc4-810a-f7168d1b3b5b/image/2c9834a1-4565-456e-b417-8085dbb76253-u3.jpg" width="65"/>
          <label>Figure 3 </label>
          <caption id="c-ac84">
            <title id="t-6a30">a.  Data sets' components</title>
            <p id="p-87b9">b.  The structure of input data</p>
          </caption>
        </fig>
        <disp-formula>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <mtable columnalign="left">
              <mtr>
                <mtd>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mi>F</mi>
                  <mi>e</mi>
                  <mi>a</mi>
                  <mi>t</mi>
                  <mi>u</mi>
                  <mi>r</mi>
                  <mi>e</mi>
                  <mi>s</mi>
                  <mo> </mo>
                  <mo>(</mo>
                  <mi>X</mi>
                  <mo>)</mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mo> </mo>
                  <mi>T</mi>
                  <mi>a</mi>
                  <mi>r</mi>
                  <mi>g</mi>
                  <mi>e</mi>
                  <mi>t</mi>
                  <mi>s</mi>
                  <mo> </mo>
                  <mo>(</mo>
                  <mi>Y</mi>
                  <mo>)</mo>
                </mtd>
              </mtr>
              <mtr>
                <mtd>
                  <mi>I</mi>
                  <mi>n</mi>
                  <mi>p</mi>
                  <mi>u</mi>
                  <mi>t</mi>
                  <mo> </mo>
                  <mi>d</mi>
                  <mi>a</mi>
                  <mi>t</mi>
                  <mi>a</mi>
                  <mo>=</mo>
                  <mfenced close="]" open="[">
                    <mtable>
                      <mtr>
                        <mtd>
                          <mo> </mo>
                          <msub>
                            <mi>i</mi>
                            <mn>0</mn>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mn>0</mn>
                          </msub>
                        </mtd>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mn>0</mn>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mn>1</mn>
                          </msub>
                        </mtd>
                        <mtd>
                          <mo>…</mo>
                        </mtd>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mn>0</mn>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mi>n</mi>
                          </msub>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mn>1</mn>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mn>0</mn>
                          </msub>
                        </mtd>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mn>1</mn>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mn>1</mn>
                          </msub>
                        </mtd>
                        <mtd>
                          <mo>…</mo>
                        </mtd>
                        <mtd>
                          <mo>⋮</mo>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <mo>⋮</mo>
                        </mtd>
                        <mtd>
                          <mo>⋮</mo>
                        </mtd>
                        <mtd>
                          <mo>⋱</mo>
                        </mtd>
                        <mtd>
                          <mo>⋮</mo>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mi>n</mi>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mn>0</mn>
                          </msub>
                        </mtd>
                        <mtd>
                          <mo>…</mo>
                        </mtd>
                        <mtd>
                          <mo>…</mo>
                        </mtd>
                        <mtd>
                          <msub>
                            <mi>i</mi>
                            <mi>n</mi>
                          </msub>
                          <mo> </mo>
                          <msub>
                            <mi>f</mi>
                            <mi>n</mi>
                          </msub>
                        </mtd>
                      </mtr>
                    </mtable>
                  </mfenced>
                  <mo> </mo>
                  <mo>⇒</mo>
                  <mfenced close="]" open="[">
                    <mtable>
                      <mtr>
                        <mtd>
                          <msub>
                            <mi>t</mi>
                            <mn>0</mn>
                          </msub>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <msub>
                            <mi>t</mi>
                            <mn>1</mn>
                          </msub>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <mo>⋮</mo>
                        </mtd>
                      </mtr>
                      <mtr>
                        <mtd>
                          <msub>
                            <mi>t</mi>
                            <mi>n</mi>
                          </msub>
                        </mtd>
                      </mtr>
                    </mtable>
                  </mfenced>
                </mtd>
              </mtr>
            </mtable>
          </math>
        </disp-formula>
      </sec>
      <sec>
        <title id="t-d9dc">Grasshopper interaction</title>
        <p id="p-a257">The plugin interface has been developed using C# grasshopper sdk. Machine learning components has been categorized into sets based on their functions e.g. (Linear Models, Support Vector Machines, Linear and quadratic discriminant analysis, Stochastic Gradient Descent, Nearest Neighbors… etc.) and each category consists of a group of components as shown in figure (5).</p>
        <fig id="f-d78c" orientation="potrait" width="twocolumn" fig-type="graphic" position="anchor">
          <graphic id="g-dd05" xlink:href="https://typeset-prod-media-server.s3.amazonaws.com/article_uploads/ea57f091-2ad4-4fc4-810a-f7168d1b3b5b/image/18033be9-704b-4c2d-92ca-9673aeda52ab-u4.png" width="40"/>
          <label>Figure 4 </label>
          <caption id="c-9fb7">
            <title id="t-4ba5">Machine learning categories based on their functions.</title>
          </caption>
        </fig>
        <p id="p-dff6">
          <x/>
        </p>
        <p id="p-62f0">On the other hand, the development of each ML component has followed certain steps following the same steps as scikit-learn module for example, Support Vector Classification (SVC) is shown in figure (5) and the main inputs and outputs are demonstrated in table (3). A pseudo code of the fitting algorithm is illustrated in listing (1). <bold id="strong-1"/></p>
        <table-wrap id="tw-08f1" orientation="potrait" width="twocolumn" autobreak="true">
          <label>Table 3</label>
          <caption id="c-f6a3">
            <title id="t-a39d">The required input and the output of the support vector classifier.</title>
          </caption>
          <table id="t-656c" rules="rows">
            <colgroup/>
            <tbody id="ts-067c">
              <tr id="tr-1546">
                <td id="tc-ccbf" rules="bottom" align="left">
                  <bold id="s-8635">Input </bold>
                </td>
                <td id="tc-9264" rules="bottom" align="left"> <bold id="s-b65d">Description </bold></td>
              </tr>
              <tr id="tr-0775">
                <td id="tc-00d2" rules="bottom" align="left">_Data</td>
                <td id="tc-8725" rules="bottom" align="left">Data (X) instances derived from any data set components as shown in figure 3</td>
              </tr>
              <tr id="tr-58b2">
                <td id="tc-53d1" rules="bottom" align="left">_Targets</td>
                <td id="tc-74d2" rules="bottom" align="left">Targets (y), derived from the dataset components [array]</td>
              </tr>
              <tr id="tr-b931">
                <td id="tc-8eb0" rules="bottom" align="left">_Working Folder</td>
                <td id="tc-6fc8" rules="bottom" align="left">[String] </td>
              </tr>
              <tr id="tr-334c">
                <td id="tc-8be1" rules="bottom" align="left">_Predict</td>
                <td id="tc-fbf4" rules="bottom" align="left">The data which is required to be fitted. [array of numerical variables]</td>
              </tr>
              <tr id="tr-06eb">
                <td id="tc-e084" rules="bottom" align="left">_Fit?</td>
                <td id="tc-65c4" rules="bottom" align="left">Boolean toggle to start fitting data.</td>
              </tr>
              <tr id="tr-234c">
                <td id="tc-2a0b" rules="bottom" align="left">Output</td>
                <td id="tc-b7dd" rules="bottom" align="left">Description </td>
              </tr>
              <tr id="tr-c645">
                <td id="tc-b8f0" rules="bottom" align="left">Data Log</td>
                <td id="tc-69ae" rules="bottom" align="left">Log console to report errors and exceptions. </td>
              </tr>
              <tr id="table-row-9">
                <td id="tc-3d2a" rules="bottom" align="left">Prediction Result</td>
                <td id="tc-efe9" rules="bottom" align="left">The resulted value [numerical value]</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="f-65ca" orientation="potrait" width="twocolumn" fig-type="graphic" position="anchor">
          <graphic id="g-ea38" xlink:href="https://typeset-prod-media-server.s3.amazonaws.com/article_uploads/ea57f091-2ad4-4fc4-810a-f7168d1b3b5b/image/6823c819-59de-4835-8c3d-55ba54c7d5f8-u5.png"/>
          <label>Figure 5 </label>
          <caption id="c-d532">
            <title id="t-8287">An example of classifier component (support vectorclassifier).</title>
          </caption>
        </fig>
        <p id="p-1d32">If <italic id="emphasis-1"><bold id="s-10c7">fit</bold></italic> is true:</p>
        <p id="p-086b"> Read data as <italic id="emphasis-2"><bold id="strong-2">d</bold></italic> </p>
        <p id="p-6981"> Read targets as <italic id="emphasis-3"><bold id="strong-3">t</bold></italic></p>
        <p id="p-e5e1"> Read working directory as <italic id="emphasis-4"><bold id="strong-4">dir</bold></italic></p>
        <p id="p-e057"> Read prediction data as p</p>
        <p id="p-c2e0"> Read data from stand-alone dummy python file as <italic id="emphasis-5"><bold id="strong-5">f</bold></italic>.</p>
        <p id="p-9543">Write <italic id="emphasis-6"><bold id="strong-6">d, t, dir, p</bold></italic> to <italic id="emphasis-7"><bold id="strong-7">f</bold></italic>. </p>
        <p id="p-e76e">Save <italic id="emphasis-8"><bold id="strong-8">f</bold></italic> at working <italic id="emphasis-9"><bold id="strong-9">dir</bold></italic> as <italic id="emphasis-10"><bold id="strong-10">nf.py</bold></italic></p>
        <p id="p-7f0d">Run <italic id="emphasis-11"><bold id="strong-11">nf.py</bold></italic> (<italic id="emphasis-12"><bold id="strong-12">nf.py</bold></italic> runs and saves results as <italic id="emphasis-13"><bold id="strong-13">Res</bold></italic>)</p>
        <p id="p-7ea4">While (<italic id="emphasis-14"><bold id="strong-14">nf.py</bold></italic> hasn't finished):</p>
        <p id="p-2418">    Wait </p>
        <p id="p-8906">Read <italic id="emphasis-15"><bold id="strong-15">Res</bold></italic> as output.</p>
        <p id="p-6488">If any changes happen to <bold id="strong-16">d or t or p</bold>:</p>
        <p id="p-0bc5"> Repeat.</p>
        <p id="p-b6e2">
          <bold id="s-933e">Listing 1. A pseudo code of the algorithm used in the classifier component. </bold>
        </p>
      </sec>
      <sec>
        <title id="t-2b99">Complexity and efficiency </title>
        <p id="p-ae99">The complexity of this tool is mainly derived from the complexity of the similar functions of scikit learn. For example: the complexity of the ordinary least square is: For X: X is a matrix of size (n, p) <inline-formula id="if-e91b"> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>→</mo></math></inline-formula> O(np<sup id="s-5771">2</sup>) assuming that n≥p (Pedregosa et al. 2011), while that of the support vector machines, the complexity scales between  O(n<sub id="s-d9a4">features</sub>* n<sup id="s-3bfd">2</sup><sub id="s-7570">samples</sub>)and (n<sub id="s-80f0">features</sub>* n<sup id="s-10e4">3</sup><sub id="s-2e50">samples</sub>). A detailed explanation and best practices are demonstrated by (Pedregosa et al. 2011).</p>
      </sec>
    </sec>
    <sec>
      <title id="t-4ad8">Future developments</title>
      <p id="p-082e">The current state of the ANT plugin could enable regular users to perform machine-learning estimations, and predictions. It also gives users the ability to update data instances in real-time in addition to update calculations automatically whenever any input changes. It also could be efficiently integrated with other plugins such as Galapagos, Ladybug and Honeybee, ButterFly, Octopus... as it depends on numerical variables as input and output. However, it is still under progress. Thus, Future development includes involving a wide range of supervised and unsupervised learning, providing well-structured documentation and including plotting facility based on matplotlib module(Hunter 2007). Furthermore, it is intended to add an image processing module components to be integrated with machine learning. This could be attained by adjoining the scikit-image module in addition to increasing efficiency by including parallel computing module i.e. PyOpenCL. </p>
    </sec>
    <sec>
      <title id="t-17f4">Conclusion</title>
      <p id="p-5110">This paper presents a method for benefiting from the potentials of Machine learning and Python scikit-learn to be handy to architects and designers who aren't specialists at Machine Learning and coding. Machine learning has become an active field of interest by a large portion of designers due to its potentials as well as the advancement in computer resources, efficiency and algorithms. Selecting scikit-learn for this purpose is justified due to its consistency, ease of use, efficiency and robust documentation. On the other hand, Rhino<x>\</x>Grasshopper has been selected as it is considered one of the most popular tools used by architects and designers, it also provides a wide range of flexibility such as the ability to be integrated with other software and hardware due to its robust sdk. The combination of these tools has led to developing a plugin called ANT which could be thought of as an open-source free platform which brings scikit-learn classes and functions in a form of components inside grasshopper. These components could be integrated with any other plugins and tools such as but not limited to: LadyBug and HoneyBee (a parametric environmental plugin for grasshopper) by (Roudsari, Pak, and Smith 2013), ButterFly (OpenFoam-based CFD plugin for grasshopper), Galabagos (Genetic algorithm plugin for grasshopper) etc… This plugin development is still in progress. Future works include adding image processing module scikit-image and parallel computing module PyOpenCL in addition to enhancing efficiency of the current components. </p>
    </sec>
    <sec>
      <title id="t-f4d8">
        <bold id="s-3308">References</bold>
      </title>
      <p id="p-a196">1.Abu-Mostafa, Yaser S, Malik Magdon-Ismail, and Hsuan-Tien Lin. 2012. Learning from data. Vol. 4: AMLBook New York, NY, USA:.<x>
</x>2.Arenas, Ubaldo, and José Manuel Falcón. 2013. "ALOPS Constructive Systems–Towards the Design and Fabrication of Unsupervised Learning Construction Systems."<x>
</x>3.Banihashemi, Saeed, Grace Ding, and Jack Wang. 2017. "Developing a Hybrid Model of Prediction and Classification Algorithms for Building Energy Consumption." Energy Procedia no. 110:371-376. doi: https://doi.org/10.1016/j.egypro.2017.03.155.<x>
</x>4.Bernhard, Mathias. 2013. Frequency Analysis of Wood Textures: Encoding of the grain pattern’s orientation distribution for classification, comparison and search queries. Paper read at eCAADe 2013: Computation and Performance–Proceedings of the 31st International Conference on Education and research in Computer Aided Architectural Design in Europe, Delft, The Netherlands, September 18-20, 2013.<x>
</x>5.Buitinck, Lars, Gilles Louppe, Mathieu Blondel, Fabian Pedregosa, Andreas Mueller, Olivier Grisel, Vlad Niculae, Peter Prettenhofer, Alexandre Gramfort, and Jaques Grobler. 2013. "API design for machine learning software: experiences from the scikit-learn project." arXiv preprint arXiv:1309.0238.<x>
</x>6.Carlos Sandoval Olascoaga, Wenfei Xu, Hector Flores. 2016. Crowd-Sourced Neighborhoods - User-Contextualized Neighborhood Ranking. In Proceedings of the 34th eCAADe Conference. University of Oulu, Oulu, Finland.<x>
</x>7.Chen, Nai Chun, Jenny Xie, Phil Tinn, Luis Alonso, Takehiko Nagakura, and Kent Larson. 2017. Data Mining Tourism Patterns - Call Detail Records as Complementary Tools for Urban Decision Making. In CAADRIA. Liverpool University, Suzhou, China.<x>
</x>8.Chi-Li Cheng, June-Hao Hou. 2016. Biomimetic Robotic Construction Process - An approach for adapting mass irregular-shaped natural materials. In Herneoja, Aulikki; Toni Österlund and Piia Markkanen (eds.), Complexity &amp; Simplicity - Proceedings of the 34th eCAADe Conference - Volume 1, University of Oulu, Oulu, Finland, 22-26 August 2016, pp. 133-142.<x>
</x>9.Chou, Jui-Sheng, and Ngoc-Tri Ngo. 2016. "Time series analytics using sliding window metaheuristic optimization-based machine learning system for identifying building energy consumption patterns." Applied Energy no. 177:751-770. doi: https://doi.org/10.1016/j.apenergy.2016.05.074.<x>
</x>10.Cui, Can, Teresa Wu, Mengqi Hu, Jeffery D. Weir, and Xiwang Li. 2016. "Short-term building energy model recommendation system: A meta-learning approach." Applied Energy no. 172:251-263. doi: https://doi.org/10.1016/j.apenergy.2016.03.112.<x>
</x>11.Cutellic, Pierre, and Fabien Lotte. 2013. Augmented Iterations: Integrating neural activity in evolutionary computation for design. Paper read at eCAADe 2013.<x>
</x>12.Davis, Daniel. 2016. "Evaluating Buildings with Computation and Machine Learning."<x>
</x>13.de Wilde, Pieter, Carlos Martinez-Ortiz, Darren Pearson, Ian Beynon, Martin Beck, and Nigel Barlow. 2013. "Building simulation approaches for the training of automated data analysis tools in building energy management." Advanced Engineering Informatics no. 27 (4):457-465. doi: https://doi.org/10.1016/j.aei.2013.05.001.<x>
</x>14.Deb, Chirag, Lee Siew Eang, Junjing Yang, and Mattheos Santamouris. 2016. "Forecasting diurnal cooling energy load for institutional buildings using Artificial Neural Networks." Energy and Buildings no. 121:284-297. doi: https://doi.org/10.1016/j.enbuild.2015.12.050.<x>
</x>15.Decker, Martina. 2015. Soft Robotics and Emergent Materials in Architecture. Paper read at Real Time—Proceedings of the 33rd eCAADe Conference.<x>
</x>16.Fernando, Ruwan, Robin Drogemuller, Flora Salim, and Jane Burry. 2010. Patterns, heuristics for architectural design support: making use of evolutionary modelling in design. Paper read at New Frontiers: Proceedings of the 15th International Conference on Computer-Aided Architectural Design Research in Asia.<x>
</x>17.Harrison, Paul. 2016. What Bricks Want: Machine Learning and Iterative Ruin. In [Proceedings of the 36th Annual Conference of the Association for Computer Aided Design in Architecture (ACADIA). Ann Arbor.<x>
</x>18.Hunter, John D. 2007. "Matplotlib: A 2D graphics environment." Computing In Science &amp; Engineering no. 9 (3):90-95.<x>
</x>19.Khosrowpour, Ardalan, Rimas Gulbinas, and John E. Taylor. 2016. "Occupant workstation level energy-use prediction in commercial buildings: Developing and assessing a new method to enable targeted energy efficiency programs." Energy and Buildings no. 127:1133-1145. doi: https://doi.org/10.1016/j.enbuild.2016.05.071.<x>
</x>20.Kontokosta, Constantine E., and Christopher Tull. 2017. "A data-driven predictive model of city-scale energy use in buildings." Applied Energy no. 197:303-317. doi: https://doi.org/10.1016/j.apenergy.2017.04.005.<x>
</x>21.Laskari, Anna. 2014. Multidimensional Comparative Analysis for the Classification of Residual Urban Voids'. Paper read at Proceedings of the 32nd eCAADe Conference.<x>
</x>22.Mahalingam, GANAPATHY. 2005. "A Computational Model of a Sensor Network for the Optimization and Control of Acoustical Performance Criteria in Spatial Enclosures." Proceedings of CAADRIA 2005:475-483.<x>
</x>23.Merrick, Kathryn, Mary Lou Maher, and Rob Saunders. 2008. "Achieving adaptable behaviour in intelligent rooms using curious supervised learning agents." Proc. CAADRiA 2008 Beyond Computer Aided Design:185-192.<x>
</x>24.Oh, Jean, Jie-Eun Hwang, Stephen F . Smith, and Kimberle Koile. 2006. "Learning from Main Streets - A machine learning approach identifying neighborhood commercial districts." Innovations in Design &amp; Decision Support Systems in Architecture and Urban Planning:325-340 <x>
</x>25.Oliphant, Travis E. 2007. "Python for scientific computing." Computing in Science &amp; Engineering no. 9 (3).<x>
</x>26.Paterson, G, SM Hong, D Mumovic, and J Kimpian. 2013. Real-time Environmental Feedback at the Early Design Stages. Paper read at eCAADe 2013: Computation and Performance–Proceedings of the 31st International Conference on Education and research in Computer Aided Architectural Design in Europe, Delft, The Netherlands, September 18-20, 2013.<x>
</x>27.Paudel, Subodh, Mohamed Elmitri, Stéphane Couturier, Phuong H. Nguyen, René Kamphuis, Bruno Lacarrière, and Olivier Le Corre. 2017. "A relevant data selection method for energy consumption prediction of low energy building based on support vector machine." Energy and Buildings no. 138:240-256. doi: https://doi.org/10.1016/j.enbuild.2016.11.009.<x>
</x>28.Pedregosa, Fabian, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, and Vincent Dubourg. 2011. "Scikit-learn: Machine learning in Python." Journal of Machine Learning Research no. 12 (Oct):2825-2830.<x>
</x>29.Pinochet, Diego. 2016. Making - Gestures: Continuous design through real time Human Machine interaction. In Proceedings of the 21st International Conference on Computer-Aided Architectural Design Research in Asia (CAADRIA 2016). Melbourne.<x>
</x>30.Roudsari, Mostapha Sadeghipour, Michelle Pak, and Adrian Smith. 2013. Ladybug: a parametric environmental plugin for grasshopper to help designers create an environmentally-conscious design. Paper read at Proceedings of the 13th International IBPSA Conference Held in Lyon, France Aug.<x>
</x>31.Silvestre, Joaquim, Yasushi Ikeda, and François Guéna. 2016. Artificial Imagination of Architecture with Deep Convolutional Neural Network. In Proceedings of the 21st International Conference on Computer-Aided Architectural Design Research in Asia (CAADRIA 2016). Melbourne.<x>
</x>32.Sokmenoglu, Ahu, Gulen Cagdas, and Sevil Sarıyıldız. 2010. Exploring the Patterns and Relationships of Urban Attributes by Data Mining. Paper read at Proceedings of the 28th eCAADe Conference, Zurich, Switzerland.<x>
</x>33.Standfest, Matthias. 2014. "Unsupervised Symmetric Polygon Mesh Mapping-The Dualism of Mesh Representation and Its Implementation for Many Layered Self-Organizing Map Architectures."<x>
</x>34.Stasiuk, D, MR Thomsen, and EM Thompson. 2014. "Learning to be a vault—implementing learning strategies for design exploration in inter-scalar systems." Newcastle upon Tyne, England:381-390.<x>
</x>35.Stouffs, R, P Janssen, S Roudavski, and B Tunçer. 2013. FEATURE RECOGNITION AND CLUSTERING FOR URBAN MODELLING. Paper read at Conference on Computer-Aided Architectural Design Research in Asia (CAADRIA 2013).<x>
</x>36.Tamke, Martin, Mateusz Zwierzycki, Henrik Leander Evers, Sebastian Ochmann, Richard Vock, and Raoul Wessel. 2016. "Tracking Changes in Buildings over Time-Fully Automated Reconstruction and Difference Detection of 3d Scan and BIM files."<x>
</x>37.Vardouli, Theodora. 2013. Performed by and Performative for Rethinking computational models for user participation in design. Paper read at eCAADe 2013: Computation and Performance–Proceedings of the 31st International Conference on Education and research in Computer Aided Architectural Design in Europe, Delft, The Netherlands, September 18-20, 2013.<x>
</x>38.Walt, Stéfan van der, S Chris Colbert, and Gael Varoquaux. 2011. "The NumPy array: a structure for efficient numerical computation." Computing in Science &amp; Engineering no. 13 (2):22-30.<x>
</x>39.Wassermann, Klaus. 2010. "SOMcity: Networks, Probability, the City, and its Context." Proceedings of eCAADe 2010:197-205.<x>
</x>40.Wilkinson, Samuel, Sean Hanna, Lars Hesselgren, and Volker Mueller. 2013. Inductive aerodynamics. Paper read at eCAADe 2013: Computation and Performance–Proceedings of the 31st International Conference on Education and research in Computer Aided Architectural Design in Europe, Delft, The Netherlands, September 18-20, 2013.<x>
</x>41.Yildiz, B., J. I. Bilbao, and A. B. Sproul. 2017. "A review and analysis of regression and machine learning models on commercial building electricity load forecasting." Renewable and Sustainable Energy Reviews no. 73:1104-1122. doi: https://doi.org/10.1016/j.rser.2017.02.023.<x>
</x>42.Zarkadis, N., A. Ridi, and N. Morel. 2014. "A Multi-sensor Office-building Database for Experimental Validation and Advanced Control Algorithm Development." Procedia Computer Science no. 32:1003-1009. doi: https://doi.org/10.1016/j.procs.2014.05.525.</p>
      <p id="p-a73b"/>
      <p id="p-c777"/>
      <p id="p-2c64"/>
      <p id="p-7d72"/>
      <p id="p-bb3c"/>
      <p id="p-f820"/>
      <p id="p-b5ca"/>
      <p id="p-f6af"/>
      <p id="p-6f44"/>
      <p id="p-aa85"/>
      <p id="p-db01"/>
      <p id="p-2740"/>
      <p id="p-75c6"/>
      <p id="p-770f"/>
      <p id="p-e9b2"/>
      <p id="p-4327"/>
      <p id="p-4fe2"/>
      <p id="p-6eb6"/>
      <p id="p-c6b3"/>
      <p id="p-1726"/>
      <p id="p-cfd8"/>
      <p id="p-f85e"/>
      <p id="p-e0f9"/>
      <p id="p-fc70"/>
      <p id="p-59dd"/>
      <p id="p-ead6"/>
      <p id="p-cd62"/>
      <p id="p-4194"/>
      <p id="p-e808"/>
      <p id="p-390f"/>
      <p id="p-6a1e"/>
      <p id="p-e33b"/>
      <p id="p-a468"/>
      <p id="p-66db"/>
      <p id="p-605d"/>
      <p id="p-56e1"/>
      <p id="p-66e1"/>
      <p id="p-709b"/>
      <p id="p-3f64"/>
      <p id="p-9468"/>
      <p id="p-4b16"/>
      <p id="p-dcc0"/>
      <p id="p-7dd2"/>
      <p id="p-70cb"/>
      <p id="p-7345"/>
      <p id="p-0b94"/>
      <p id="p-3922"/>
      <p id="p-5780"/>
      <p id="p-0280"/>
      <p id="p-a486"/>
      <p id="p-c6c7"/>
      <p id="p-81b9"/>
      <p id="p-1494"/>
      <p id="p-b372"/>
      <p id="p-b938"/>
      <p id="p-ee05"/>
      <p id="p-c423"/>
      <p id="p-9f9c"/>
      <p id="p-96af"/>
      <p id="p-490e"/>
      <p id="p-6483"/>
      <p id="p-1f3a"/>
      <p id="p-60be"/>
      <p id="p-a429"/>
      <p id="p-6190"/>
      <p id="p-9c61"/>
      <p id="p-7da2"/>
      <p id="p-61b5"/>
      <p id="p-6f66"/>
      <p id="p-c95b"/>
      <p id="t-3f03"/>
      <p id="paragraph-f82c"> </p>
      <p id="p-8861"/>
    </sec>
  </body>
  <back>
    <ref-list id="384582">
      <title>References</title>
    </ref-list>
  </back>
</article>
