# django_flatpage

url: /about/
title: About Miguel González-Fierro
template_name: flatpages/about.html
content:
  <h4 class="section">Bio</h4>

  <p>Miguel Gonz&aacute;lez-Fierro is a Principal&nbsp;Data Scientist Manager at <a href="https://www.microsoft.com/" target="_blank">Microsoft</a> UK, where his job consists of helping large companies to implement AI solutions using Microsoft&#39;s Cloud: Azure. His&nbsp;team supports multiple industries such as retail, CPG, finance, marketing, energy, media, car industries, and others, within&nbsp;a wide range of AI areas including recommendation systems, NLP, computer vision, time series forecasting, and other machine learning techniques.&nbsp;</p>

  <p>In addition, Miguel&nbsp;is serving as an Industry Advisory Board Member at <a href="https://www.imperial.ac.uk/design-engineering/" target="_blank">Dyson School of Design Engineering</a> at Imperial College London where he helps to drive the commercial strategy.</p>

  <p><br />
  Previously, he was CEO and founder of <a href="https://miguelgfierro.com/blog/2018/top-mistakes-and-learnings-from-my-startup-postmortem-samsamia/" target="_blank">Samsamia Technologies</a>, a company that created a visual search engine for fashion items allowing users to find products using images instead of words, and founder of the <a href="http://asrob.uc3m.es/" target="_blank">Robotics Society</a> of Universidad Carlos III of Madrid (UC3M), which developed different projects related to robotics and 3D printers.&nbsp;</p>

  <p><br />
  Miguel also worked in academia as a robotics scientist at <a href="https://roboticslab.uc3m.es/roboticslab/people/m-gonzalez-fierro" target="_blank">UC3M</a>, and collaborated with <a href="http://thrish.org/additional-researchers/miguel-gonzalez-fierro" target="_blank">King&#39;s College London</a>&nbsp;(KCL), where his research focused on machine learning and dynamic control of humanoid robots. He continues to actively contribute to the area of AI and robotics, and has more than 100 <a href="http://github.com/miguelgfierro/publications" target="_blank">publications</a> in these areas. &nbsp;<br />
  &nbsp;</p>

  <p>He holds an&nbsp;MSc in Electrical Engineering and&nbsp;an MSc in Robotics by UC3M, a PhD&nbsp;in Robotics by UC3M in collaboration with KCL and is a graduate&nbsp;of MIT Sloan School of Management.</p>

  <h4 class="section">Recognitions</h4>

  <p>Miguel was awarded a number of recognitions including Data Scientist of the Year (2019), UC3M Excellent Alumni Award (2019), Outstanding Thesis Award (2015), and several prizes related to entrepreneurship. The full list is available on&nbsp;<a href="http://www.linkedin.com/in/miguelgfierro/" target="_blank">Linkedin</a>.</p>

  <h4 class="section">Links</h4>

  <ol>
  	<li><a href="https://www.linkedin.com/in/miguelgfierro/" target="_blank">Linkedin</a></li>
  	<li><a href="https://twitter.com/miguelgfierro" target="_blank">Twitter</a></li>
  	<li><a href="https://github.com/miguelgfierro" target="_blank">GitHub</a></li>
  	<li><a href="mailto:info@miguelgfierro.com" target="_blank">Contact</a></li>
  </ol>


url: /privacy/
title: Privacy policy
template_name: flatpages/privacy.html
content:
  <p>This Application collects some Personal Data from its Users.</p>

  <h4 class="section">Owner and Data Controller</h4>

  <p>Miguel Gonz&aacute;lez-Fierro</p>

  <p>Owner contact email: <a href="mailto:info@miguelgfierro.com" target="_blank">info@miguelgfierro.com</a></p>

  <h4 class="section">Types of Data collected</h4>

  <p>Among the types of Personal Data that this Application collects, by itself or through third parties, there are Cookies, Usage Data, and email addresses.</p>

  <p>Complete details on each type of Personal Data collected are provided in the dedicated sections of this privacy policy or by specific explanation texts displayed prior to the Data collection. Personal Data may be freely provided by the User, or, in case of Usage Data, collected automatically when using this Application. Unless specified otherwise, all Data requested by this Application is mandatory and failure to provide this Data may make it impossible for this Application to provide its services. In cases where this Application specifically states that some Data is not mandatory, Users are free not to communicate this Data without consequences to the availability or the functioning of the Service. Users who are uncertain about which Personal Data is mandatory are welcome to contact the Owner. Any use of Cookies &ndash; or of other tracking tools &ndash; by this Application or by the owners of third-party services used by this Application serves the purpose of providing the Service required by the User, in addition to any other purposes described in the present document and in the Cookie Policy, if available.</p>

  <p>Users are responsible for any third-party Personal Data obtained, published or shared through this Application and confirm that they have the third party&#39;s consent to provide the Data to the Owner.</p>

  <h4 class="section">Mode and place of processing the Data</h4>

  <h5 class="subsection">Methods of processing</h5>

  <p>The Owner takes appropriate security measures to prevent unauthorized access, disclosure, modification, or unauthorized destruction of the Data. The Data processing is carried out using computers and/or IT-enabled tools, following organizational procedures and modes strictly related to the purposes indicated. In addition to the Owner, in some cases, the Data may be accessible to certain types of persons in charge, involved with the operation of this Application (administration, sales, marketing, legal, system administration) or external parties (such as third-party technical service providers, mail carriers, hosting providers, IT companies, communications agencies) appointed, if necessary, as Data Processors by the Owner. An updated list of these parties may be requested from the Owner at any time.</p>

  <h5 class="subsection">Legal basis of processing</h5>

  <p>The Owner may process Personal Data relating to Users if one of the following applies:</p>

  <ul>
  	<li>Users have given their consent for one or more specific purposes. Note: Under some legislations, the Owner may be allowed to process Personal Data until the User objects to such processing (&ldquo;opt-out&rdquo;), without having to rely on consent or any other of the following legal bases. This, however, does not apply, whenever the processing of Personal Data is subject to European data protection law;</li>
  	<li>provision of Data is necessary for the performance of an agreement with the User and/or for any pre-contractual obligations thereof;</li>
  	<li>processing is necessary for compliance with a legal obligation to which the Owner is subject;</li>
  	<li>processing is related to a task that is carried out in the public interest or in the exercise of official authority vested in the Owner;</li>
  	<li>processing is necessary for the purposes of the legitimate interests pursued by the Owner or by a third party.</li>
  </ul>

  <p>In any case, the Owner will gladly help to clarify the specific legal basis that applies to the processing, and in particular whether the provision of Personal Data is a statutory or contractual requirement, or a requirement necessary to enter into a contract.</p>

  <h5 class="subsection">Place</h5>

  <p>The Data is processed at the Owner&#39;s operating offices and in any other places where the parties involved in the processing are located.</p>

  <p>Depending on the User&#39;s location, data transfers may involve transferring the User&#39;s Data to a country other than their own. To find out more about the place of processing of such transferred Data, Users can check the section containing details about the processing of Personal Data.</p>

  <p>Users are also entitled to learn about the legal basis of Data transfers to a country outside the European Union or to any international organization governed by public international law or set up by two or more countries, such as the UN, and about the security measures taken by the Owner to safeguard their Data.</p>

  <p>If any such transfer takes place, Users can find out more by checking the relevant sections of this document or inquire with the Owner using the information provided in the contact section.</p>

  <h5 class="subsection">Retention time</h5>

  <p>Personal Data shall be processed and stored for as long as required by the purpose they have been collected for.</p>

  <p>Therefore:</p>

  <ul>
  	<li>Personal Data collected for purposes related to the performance of a contract between the Owner and the User shall be retained until such contract has been fully performed.</li>
  	<li>Personal Data collected for the purposes of the Owner&rsquo;s legitimate interests shall be retained as long as needed to fulfill such purposes. Users may find specific information regarding the legitimate interests pursued by the Owner within the relevant sections of this document or by contacting the Owner.</li>
  </ul>

  <p>The Owner may be allowed to retain Personal Data for a longer period whenever the User has given consent to such processing, as long as such consent is not withdrawn. Furthermore, the Owner may be obliged to retain Personal Data for a longer period whenever required to do so for the performance of a legal obligation or upon order of an authority.</p>

  <p>Once the retention period expires, Personal Data shall be deleted. Therefore, the right to access, the right to erasure, the right to rectification and the right to data portability cannot be enforced after the expiration of the retention period.</p>

  <h5 class="subsection">The purposes of processing</h5>

  <p>The Data concerning the User is collected to allow the Owner to provide its Services, as well as for the following purposes: Analytics, Contacting the User, Content commenting, and traffic optimization and distribution.</p>

  <p>Users can find further detailed information about such purposes of processing and about the specific Personal Data used for each purpose in the respective sections of this document.</p>

  <h4 class="section">Detailed information on the processing of Personal Data</h4>

  <p>Personal Data is collected for the following purposes and using the following services:</p>

  <h5 class="subsection">Data transfer outside the EU</h5>

  <p>The Owner is allowed to transfer Personal Data collected within the EU to third countries (i.e. any country not part of the EU) only pursuant to a specific legal basis. Any such Data transfer is based on one of the legal bases described below. Users can inquire with the Owner to learn which legal basis applies to which specific service. Data transfer abroad based on consent (this Application)</p>

  <p>If this is the legal basis, Personal Data of Users shall be transferred from the EU to third countries only if the User has explicitly consented to such transfer, after having been informed of the possible risks due to the absence of an adequate decision and appropriate safeguards. In such cases, the Owner shall inform Users appropriately and collect their explicit consent via this Application.</p>

  <p>Personal Data collected: various types of Data.</p>

  <h6 class="subsubsection">Data transfer abroad based on standard contractual clauses (this Application)</h6>

  <p>If this is the legal basis, the transfer of Personal Data from the EU to third countries is carried out by the Owner according to &ldquo;standard contractual clauses&rdquo; provided by the European Commission. This means that Data recipients have committed to processing Personal Data in compliance with the data protection standards set forth by EU data protection legislation. For further information, Users are requested to contact the Owner through the contact details provided in the present document.</p>

  <p>Personal Data collected: various types of Data.</p>

  <h6 class="subsubsection">Data transfer from the EU and/or Switzerland to the U.S based on Privacy Shield (this Application)</h6>

  <p>If this is the legal basis, the transfer of Personal Data from the EU or Switzerland to the US is carried out according to the EU - U.S. and Swiss - U.S. Privacy Shield. In particular, Personal Data is transferred to services that self-certify under the Privacy Shield framework and therefore guarantee an adequate level of protection of such transferred Data. All services are listed within the relevant section of this document and those that adhere to Privacy Shield can be singled out by checking their privacy policy and possibly also by specifically checking for Privacy Shield adherence in the official Privacy Shield List. Privacy Shield also specifically guarantees rights to Users which can be found in its most current form on the website run by the US Department of Commerce. Personal Data may be transferred from within the EU or Switzerland to the U.S. to services that are not, or not anymore, part of Privacy Shield, only based on other valid legal grounds. Users can ask the Owner to learn about such legal grounds.</p>

  <p>Personal Data collected: various types of Data.</p>

  <h6 class="subsubsection">Data transfer to countries that guarantee European standards (this Application)</h6>

  <p>If this is the legal basis, the transfer of Personal Data from the EU to third countries is carried out according to an adequate decision of the European Commission. The European Commission adopts adequacy decisions for specific countries whenever it considers that country to possess and provide Personal Data protection standards comparable to those set forth by EU data protection legislation. Users can find an updated list of all adequacy decisions issued on the European Commission&#39;s website.</p>

  <p>Personal Data collected: various types of Data.</p>

  <h6 class="subsubsection">Other legal bases for Data transfer abroad (this Application)</h6>

  <p>If no other legal basis applies, Personal Data shall be transferred from the EU to third countries only if at least one of the following conditions is met:</p>

  <ul>
  	<li>the transfer is necessary for the performance of a contract between the User and the Owner or of pre-contractual measures taken at the User&rsquo;s request;</li>
  	<li>the transfer is necessary for the conclusion or performance of a contract concluded in the interest of the User between - the Owner and another natural or legal person;</li>
  	<li>the transfer is necessary for important reasons of public interest;</li>
  	<li>the transfer is necessary for the establishment, exercise or defense of legal claims;</li>
  	<li>the transfer is necessary in order to protect the vital interests of the data subject or of other persons, where the data subject is physically or legally incapable of giving consent. In such cases, the Owner shall inform the User about the legal bases the transfer is based on via this Application.</li>
  </ul>

  <p>Personal Data collected: various types of Data.</p>

  <h5 class="subsection">Google Analytics (Google Inc.)</h5>

  <p>Google Analytics is a web analysis service provided by Google Inc. (&ldquo;Google&rdquo;). Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services. Google may use the Data collected to contextualize and personalize the ads of its own advertising network.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.google.com/intl/en/policies/privacy/" rel="nofollow">https://www.google.com/intl/en/policies/privacy/</a>) &ndash; Opt-Out (<a href="https://tools.google.com/dlpage/gaoptout?hl=en" rel="nofollow">https://tools.google.com/dlpage/gaoptout?hl=en</a>). Privacy Shield participant.</p>

  <p>Contacting the User</p>

  <h5 class="subsection">Mailing list or newsletter (this Application)</h5>

  <p>By registering on the mailing list or for the newsletter, the User&rsquo;s email address will be added to the contact list of those who may receive email messages containing information of commercial or promotional nature concerning this Application. Your email address might also be added to this list as a result of signing up for this Application or after making a purchase.</p>

  <p>Personal Data collected: email address.</p>

  <h6 class="subsubsection">Content commenting with Disqus</h6>

  <p>Content commenting services allow Users to make and publish their comments on the contents of this Application. Depending on the settings chosen by the Owner, Users may also leave anonymous comments. If there is an email address among the Personal Data provided by the User, it may be used to send notifications of comments on the same content. Users are responsible for the content of their own comments. If a content commenting service provided by third parties is installed, it may still collect web traffic data for the pages where the comment service is installed, even when Users do not use the content commenting service.</p>

  <p>Disqus is a content commenting service provided by Big Heads Labs Inc.</p>

  <p>Personal Data collected: Cookies, Usage Data and various types of Data as specified in the privacy policy of the service.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://help.disqus.com/customer/portal/articles/466259-privacy-policy" rel="nofollow">https://help.disqus.com/customer/portal/articles/466259-privacy-policy</a>) &ndash; Opt-out (<a href="https://help.disqus.com/customer/portal/articles/1657951" rel="nofollow">https://help.disqus.com/customer/portal/articles/1657951</a>).</p>

  <h5 class="subsection">Traffic optimization and distribution with Cloudflare</h5>

  <p>This type of service allows this Application to distribute its content using servers located across different countries and to optimize their performance. Which Personal Data are processed depends on the characteristics and the way these services are implemented. Their function is to filter communications between this Application and the User&#39;s browser. Considering the widespread distribution of this system, it is difficult to determine the locations to which the contents that may contain Personal Information User are transferred.</p>

  <p>CloudFlare is a traffic optimization and distribution service provided by CloudFlare Inc. The way CloudFlare is integrated means that it filters all the traffic through this Application, i.e., communication between this Application and the User&#39;s browser, while also allowing analytical data from this Application to be collected.</p>

  <p>Personal Data collected: Cookies and various types of Data as specified in the privacy policy of the service.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.cloudflare.com/security-policy/" rel="nofollow">https://www.cloudflare.com/security-policy/</a>).</p>

  <h5 class="subsection">Displaying content from external platforms</h5>

  <p>This type of service allows you to view content hosted on external platforms directly from the pages of this Application and interact with them. This type of service might still collect web traffic data for the pages where the service is installed, even when Users do not use it.</p>

  <h6 class="subsubsection">YouTube video widget (Google Inc.)</h6>

  <p>YouTube is a video content visualization service provided by Google Inc. that allows this Application to incorporate content of this kind on its pages.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.google.com/intl/en/policies/privacy/" rel="nofollow">https://www.google.com/intl/en/policies/privacy/</a>). Privacy Shield participant.</p>

  <h5 class="subsection">Interaction with external social networks and platforms</h5>

  <p>This type of service allows interaction with social networks or other external platforms directly from the pages of this Application. The interaction and information obtained through this Application are always subject to the User&rsquo;s privacy settings for each social network. This type of service might still collect traffic data for the pages where the service is installed, even when Users do not use it.</p>

  <h6 class="subsubsection">Facebook Like button and social widgets (Facebook, Inc.)</h6>

  <p>The Facebook Like button and social widgets are services allowing interaction with the Facebook social network provided by Facebook, Inc.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.facebook.com/privacy/explanation" rel="nofollow">https://www.facebook.com/privacy/explanation</a>). Privacy Shield participant.</p>

  <h6 class="subsubsection">Twitter Tweet button and social widgets (Twitter, Inc.)</h6>

  <p>The Twitter Tweet button and social widgets are services allowing interaction with the Twitter social network provided by Twitter, Inc.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://twitter.com/privacy" rel="nofollow">https://twitter.com/privacy</a>). Privacy Shield participant.</p>

  <h6 class="subsubsection">LinkedIn button and social widgets (LinkedIn Corporation)</h6>

  <p>The LinkedIn button and social widgets are services allowing interaction with the LinkedIn social network provided by LinkedIn Corporation.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.linkedin.com/legal/privacy-policy" rel="nofollow">https://www.linkedin.com/legal/privacy-policy</a>). Privacy Shield participant.</p>

  <h6 class="subsubsection">WhatsApp button and social widgets (Facebook, Inc.)</h6>

  <p>The WhatsApp button and social widgets are services allowing interaction with the WhatsApp social network provided by Facebook, Inc.</p>

  <p>Personal Data collected: Cookies and Usage Data.</p>

  <p>Place of processing: United States &ndash; Privacy Policy (<a href="https://www.whatsapp.com/legal/" rel="nofollow">https://www.whatsapp.com/legal/</a>). Privacy Shield participant.</p>

  <h5 class="subsection">RSS feed management</h5>

  <p>This type of service allows this Application to manage RSS feeds and the distribution of their content. Depending on the characteristics of the service used, these services may be used to insert ads within the content and to gather statistics data from them.</p>

  <h6 class="subsubsection">Feedburner (Google Inc.)</h6>

  <p>Feedburner is a service to manage RSS feeds provided by Google Inc. It allows the collection of statistics on what content is consumed.</p>

  <p>Personal Data collected: Usage Data.</p>

  <p>Place of processing: US &ndash; Privacy Policy (Feedburner is a service to manage RSS feeds provided by Google Inc.).</p>

  <h4 class="section">Further information about Personal Data</h4>

  <h5 class="subsection">Analysis and predictions based on the User&rsquo;s Data (&ldquo;profiling&rdquo;)</h5>

  <p>The Owner may use the Personal and Usage Data collected through this Application to create or update User profiles. This type of Data processing allows the Owner to evaluate User choices, preferences and behaviour for the purposes outlined in the respective section of this document. User profiles can also be created through the use of automated tools like algorithms, which can also be provided by third parties. To find out more, about the profiling activities performed, Users can check the relevant sections of this document. The User always has a right to object to this kind of profiling activity. To find out more about the User&#39;s rights and how to exercise them, the User is invited to consult the section of this document outlining the rights of the User.</p>

  <h5 class="subsection">Automated decision-making</h5>

  <p>Automated decision-making means that a decision that is likely to have legal effects or similarly significant effects on the User, is taken solely by technological means, without any human intervention. This Application may use the User&#39;s Personal Data to make decisions entirely or partially based on automated processes according to the purposes outlined in this document. This Application adopts automated decision-making processes as far as necessary to enter into or perform a contract between User and Owner, or on the basis of the User&rsquo;s explicit consent, where such consent is required by the law. Automated decisions are made by technological means &ndash; mostly based on algorithms subject to predefined criteria &ndash; which may also be provided by third parties. The rationale behind the automated decision making is:</p>

  <ul>
  	<li>to enable or otherwise improve the decision-making process;</li>
  	<li>to grant Users fair and unbiased treatment based on consistent and uniform criteria;</li>
  	<li>to reduce the potential harm derived from human error, personal bias and the like which may potentially lead to discrimination or imbalance in the treatment of individuals, etc.;</li>
  	<li>to reduce the risk of User&#39;s failure to meet their obligation under a contract. To find out more about the purposes, the third-party services, if any, and any specific rationale for automated decisions used within this Application, Users can check the relevant sections in this document.</li>
  </ul>

  <h6 class="subsubsection">Consequences of automated decision-making processes for Users and rights of Users subjected to it</h6>

  <p>As a consequence, Users subject to such processing, are entitled to exercise specific rights aimed at preventing or otherwise limiting the potential effects of the automated decisions taken. In particular, Users have the right to:</p>

  <ul>
  	<li>obtain an explanation about any decision taken as a result of automated decision-making and express their point of view regarding this decision;</li>
  	<li>challenge a decision by asking the Owner to reconsider it or take a new decision on a different basis;</li>
  	<li>request and obtain from the Owner human intervention on such processing. To learn more about the User&rsquo;s rights and the means to exercise them, the User is invited to consult the section of this document relating to the rights of the User.</li>
  </ul>

  <h4 class="section">The rights of Users</h4>

  <p>Users may exercise certain rights regarding their Data processed by the Owner.</p>

  <p>In particular, Users have the right to do the following:</p>

  <ul>
  	<li>Withdraw their consent at any time. Users have the right to withdraw consent where they have previously given their consent to the processing of their Personal Data.</li>
  	<li>Object to processing of their Data. Users have the right to object to the processing of their Data if the processing is carried out on a legal basis other than consent. Further details are provided in the dedicated section below.</li>
  	<li>Access their Data. Users have the right to learn if Data is being processed by the Owner, obtain disclosure regarding certain aspects of the processing and obtain a copy of the Data undergoing processing.</li>
  	<li>Verify and seek rectification. Users have the right to verify the accuracy of their Data and ask for it to be updated or corrected.</li>
  	<li>Restrict the processing of their Data. Users have the right, under certain circumstances, to restrict the processing of their Data. In this case, the Owner will not process their Data for any purpose other than storing it.</li>
  	<li>Have their Personal Data deleted or otherwise removed. Users have the right, under certain circumstances, to obtain the erasure of their Data from the Owner.</li>
  	<li>Receive their Data and have it transferred to another controller. Users have the right to receive their Data in a structured, commonly used and machine-readable format and, if technically feasible, to have it transmitted to another controller without any hindrance. This provision is applicable provided that the Data is processed by automated means and that the processing is based on the User&#39;s consent, on a contract which the User is part of or on pre-contractual obligations thereof.</li>
  	<li>Lodge a complaint. Users have the right to bring a claim before their competent data protection authority.</li>
  </ul>

  <h5 class="subsection">Details about the right to object to processing</h5>

  <p>Where Personal Data is processed for a public interest, in the exercise of an official authority vested in the Owner or for the purposes of the legitimate interests pursued by the Owner, Users may object to such processing by providing a ground related to their particular situation to justify the objection.</p>

  <p>Users must know that, however, should their Personal Data be processed for direct marketing purposes, they can object to that processing at any time without providing any justification. To learn, whether the Owner is processing Personal Data for direct marketing purposes, Users may refer to the relevant sections of this document.</p>

  <h5 class="subsection">How to exercise these rights</h5>

  <p>Any requests to exercise User rights can be directed to the Owner through the contact details provided in this document. These requests can be exercised free of charge and will be addressed by the Owner as early as possible and always within one month.</p>

  <h4 class="section">Additional information about Data collection and processing</h4>

  <h5 class="subsection">Legal action</h5>

  <p>The User&#39;s Personal Data may be used for legal purposes by the Owner in Court or in the stages leading to possible legal action arising from improper use of this Application or the related Services. The User declares to be aware that the Owner may be required to reveal personal data upon request of public authorities.</p>

  <h5 class="subsection">Additional information about User&#39;s Personal Data</h5>

  <p>In addition to the information contained in this privacy policy, this Application may provide the User with additional and contextual information concerning particular Services or the collection and processing of Personal Data upon request.</p>

  <h5 class="subsection">System logs and maintenance</h5>

  <p>For operation and maintenance purposes, this Application and any third-party services may collect files that record interaction with this Application (System logs) use other Personal Data (such as the IP Address) for this purpose. Information not contained in this policy</p>

  <p>More details concerning the collection or processing of Personal Data may be requested from the Owner at any time. Please see the contact information at the beginning of this document.</p>

  <h5 class="subsection">How &ldquo;Do Not Track&rdquo; requests are handled</h5>

  <p>This Application does not support &ldquo;Do Not Track&rdquo; requests. To determine whether any of the third-party services it uses honor the &ldquo;Do Not Track&rdquo; requests, please read their privacy policies.</p>

  <h5 class="subsection">Changes to this privacy policy</h5>

  <p>The Owner reserves the right to make changes to this privacy policy at any time by giving notice to its Users on this page and possibly within this Application and/or - as far as technically and legally feasible - sending a notice to Users via any contact information available to the Owner. It is strongly recommended to check this page often, referring to the date of the last modification listed at the bottom.</p>

  <p>Should the changes affect processing activities performed on the basis of the User&rsquo;s consent, the Owner shall collect new consent from the User, where required.</p>

  <h4 class="section">Definitions and legal references</h4>

  <h5 class="subsection">Personal Data (or Data)</h5>

  <p>Any information that directly, indirectly, or in connection with other information &mdash; including a personal identification number &mdash; allows for the identification or identifiability of a natural person. Usage Data</p>

  <p>Information is collected automatically through this Application (or third-party services employed in this Application), which can include: the IP addresses or domain names of the computers utilized by the Users who use this Application, the URI addresses (Uniform Resource Identifier), the time of the request, the method utilized to submit the request to the server, the size of the file received in response, the numerical code indicating the status of the server&#39;s answer (successful outcome, error, etc.), the country of origin, the features of the browser and the operating system utilized by the User, the various time details per visit (e.g., the time spent on each page within the Application) and the details about the path followed within the Application with special reference to the sequence of pages visited, and other parameters about the device operating system and/or the User&#39;s IT environment.</p>

  <h5 class="subsection">User</h5>

  <p>The individual using this Application who, unless otherwise specified, coincides with the Data Subject.</p>

  <h5 class="subsection">Data Subject</h5>

  <p>The natural person to whom the Personal Data refers.</p>

  <h5 class="subsection">Data Processor (or Data Supervisor)</h5>

  <p>The natural or legal person, public authority, agency or other body which processes Personal Data on behalf of the Controller, as described in this privacy policy.</p>

  <h5 class="subsection">Data Controller (or Owner)</h5>

  <p>The natural or legal person, public authority, agency or other body which, alone or jointly with others, determines the purposes and means of the processing of Personal Data, including the security measures concerning the operation and use of this Application. The Data Controller, unless otherwise specified, is the Owner of this Application.</p>

  <h5 class="subsection">This Application</h5>

  <p>The means by which the Personal Data of the User is collected and processed.</p>

  <h5 class="subsection">Service</h5>

  <p>The service provided by this Application is described in the relative terms (if available) and on this site/application.</p>

  <h5 class="subsection">European Union (or EU)</h5>

  <p>Unless otherwise specified, all references made within this document to the European Union include all current member states to the European Union and the European Economic Area.</p>

  <h5 class="subsection">Cookies</h5>

  <p>Small sets of data are stored in the User&#39;s device.</p>

  <h5 class="subsection">Legal information</h5>

  <p>This privacy statement has been prepared based on provisions of multiple legislations, including Art. 13/14 of Regulation (EU) 2016/679 (General Data Protection Regulation).</p>

  <p>This privacy policy relates solely to this Application, if not stated otherwise within this document.</p>

  <p><em>Latest update: February&nbsp;08, 2022</em></p>


url: /quiz/
title: Inner Circle Mastermind form
template_name: flatpages/canvas.html
content:
  <p><iframe frameborder="0" height="3257" scrolling="yes" src="https://docs.google.com/forms/d/e/1FAIpQLSdnwjU_-xAOo9LfcjimbFHtWoUcKF-fdecq9o5aIiPZDa8uGA/viewform?embedded=true" width="640">Loading&amp;hellip;</iframe></p>


url: /thank-you-optin/
title: Thank You
template_name: flatpages/generic.html
content:
  <h4 class="section" style="text-align:center"><span style="font-size:18px">Your report is flying to your email</span></h4>

  <p>&nbsp;</p>

  <p class="image-align-center"><img alt="Hoap flying" height="518" src="/img/upload/2022/hoap_flying.png" width="600" /></p>

  <h4 class="section" style="text-align:center">Check your inbox to get the report</h4>

  <p>&nbsp;</p>

  <p style="text-align:center"><a href="javascript:window.history.go(-1)">&larr;&nbsp;GO BACK</a></p>

  <p>&nbsp;</p>


url: /thank-you-newsletter/
title: Thank you for subscribing
template_name: flatpages/generic.html
content:
  <h4 class="section" style="text-align:center">Jump into Data Science!</h4>

  <h4 class="section" style="text-align:center">You will start receiving content soon!</h4>

  <p class="image-align-center"><img alt="" height="518" src="/img/upload/2022/hoap_flying.png" width="600" /></p>

  <h4 class="section" style="text-align:center">Remember to check the confirmation email to get the content</h4>

  <p style="text-align:center">&nbsp;</p>

  <p style="text-align:center"><a href="/">&larr;&nbsp;GO BACK</a></p>


# django_session

session_key: lbi7olgkjqkx4jsaa4lhb40g3hz9dlfv
expire_date: 2015-12-29 13:03:25.005198
session_data:
  ZWI1YWZjMzg1MDQ0NTUwNjg0MTFiMTVlODEzZjVmZWNmM2JjOTM0Yzp7Il9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIiwiX2F1dGhfdXNlcl9oYXNoIjoiMjg1ZTM3ZDBjMWIxYTQ4Y2UzZjNkNTU1NWQ1ZDhlOTk3ZmU0MWE3NSIsIl9hdXRoX3VzZXJfaWQiOiIxIiwiX21lc3NhZ2VzIjoiW1tcIl9fanNvbl9tZXNzYWdlXCIsMCwyNSxcIlRoZSBwb3N0IFxcXCJXaGF0IG1ha2VzIHRoZSBkaWZmZXJlbmNlIGlzIG5vdCB0aGUgZXhwZXJpZW5jZSwgYnV0IGl0cyBkZXJpdmF0aXZlXFxcIiB3YXMgY2hhbmdlZCBzdWNjZXNzZnVsbHkuIFlvdSBtYXkgZWRpdCBpdCBhZ2FpbiBiZWxvdy5cIl0sW1wiX19qc29uX21lc3NhZ2VcIiwwLDI1LFwiVGhlIHBvc3QgXFxcIldoYXQgbWFrZXMgdGhlIGRpZmZlcmVuY2UgaXMgbm90IHRoZSBleHBlcmllbmNlLCBidXQgaXRzIGRlcml2YXRpdmVcXFwiIHdhcyBjaGFuZ2VkIHN1Y2Nlc3NmdWxseS4gWW91IG1heSBlZGl0IGl0IGFnYWluIGJlbG93LlwiXSxbXCJfX2pzb25fbWVzc2FnZVwiLDAsMjUsXCJUaGUgcG9zdCBcXFwiRHJ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dXAgTWFkcmlkXFxcIiB3YXMgY2hhbmdlZCBzdWNjZXNzZnVsbHkuIFlvdSBtYXkgZWRpdCBpdCBhZ2FpbiBiZWxvdy5cIl1dIn0=


session_key: 5zthqbhahi5yfxjc4sa784c9yf49jm4c
expire_date: 2015-12-20 17:55:43.933735
session_data:
  ZmNlZjU5NjY0ZmE3YjA3ODdiY2ViNzI2MTQ5OTYwNmU4MTc5Mjc1Mjp7Il9hdXRoX3VzZXJfaGFzaCI6IjI4NWUzN2QwYzFiMWE0OGNlM2YzZDU1NTVkNWQ4ZTk5N2ZlNDFhNzUiLCJfYXV0aF91c2VyX2JhY2tlbmQiOiJkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZCIsIl9hdXRoX3VzZXJfaWQiOiIxIn0=


session_key: qhca7yuz3vw30bfs6mz79xn9326ciq3j
expire_date: 2016-02-01 21:59:18.164489
session_data:
  [encoded data, 6408 characters]


session_key: miqbz3pq1g0zd5157h4tb3ofefe8mb6h
expire_date: 2016-06-19 09:06:26.573603
session_data:
  ZjE1M2QyMmM2ZDMwZDgwZjcwNmNjNGMxZmUxZGNjOWVhNzBjZjg1Nzp7Il9hdXRoX3VzZXJfaGFzaCI6ImJkNDY1ZWM3Y2JmYTdkMzA3ODBhMGNmMDUzNGE4ZDY4NGMwMzBhOWIiLCJfYXV0aF91c2VyX2JhY2tlbmQiOiJkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZCIsIl9hdXRoX3VzZXJfaWQiOjF9


session_key: ohwknii2dgk724c1raza4oeqwr3j6cx2
expire_date: 2016-06-19 18:17:24.986439
session_data:
  OGVlNmQxOWEyOGU4ZGExNTk5ZDMxYWU2NmQxMzJiZTVlMDAyODc0Zjp7Il9hdXRoX3VzZXJfaGFzaCI6ImJkNDY1ZWM3Y2JmYTdkMzA3ODBhMGNmMDUzNGE4ZDY4NGMwMzBhOWIiLCJfbWVzc2FnZXMiOiJbW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Z1bGx5LiBZb3UgbWF5IGVkaXQgaXQgYWdhaW4gYmVsb3cuXCJdLFtcIl9fanNvbl9tZXNzYWdlXCIsMCwyNSxcIlRoZSBwb3N0IFxcXCJUb3AgMzUgQUkgc29sdXRpb25zIGZvciB0b2RheSdzIGtleSBpbmR1c3RyaWVzXFxcIiB3YXMgY2hhbmdlZCBzdWNjZXNzZnVsbHkuIFlvdSBtYXkgZWRpdCBpdCBhZ2FpbiBiZWxvdy5cIl0sW1wiX19qc29uX21lc3NhZ2VcIiwwLDI1LFwiVGhlIHBvc3QgXFxcIlRvcCAzNSBBSSBzb2x1dGlvbnMgZm9yIHRvZGF5J3Mga2V5IGluZHVzdHJpZXNcXFwiIHdhcyBjaGFuZ2VkIHN1Y2Nlc3NmdWxseS4gWW91IG1heSBlZGl0IGl0IGFnYWluIGJlbG93LlwiXV0iLCJfYXV0aF91c2VyX2lkIjoxLCJfYXV0aF91c2VyX2JhY2tlbmQiOiJkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZCJ9


session_key: 4jlmhzuiy9s1ify4639zdylm47pyn2kp
expire_date: 2021-03-28 11:18:47.765198
session_data:
  ZTBiZmM0YzZmZmJmOTFjZTc0ODE5ZDYxYmViOGRhZWVkY2EwN2RkMDp7Il9hdXRoX3VzZXJfaGFzaCI6IjRlNzY2Y2JhYjZjMWVlZjc2N2ViOWE5MGEwMThiMTgxZjJlMTJjZTAiLCJfYXV0aF91c2VyX2JhY2tlbmQiOiJkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZCIsIl9hdXRoX3VzZXJfaWQiOjF9


session_key: neg5ofhpdjxxk02pmjoqd1y82a7nv0i3
expire_date: 2021-04-04 22:04:23.117063
session_data:
  YTQ1ZWZkMjdiZGJkNzRhM2MzNWUxOTlkODJkMDhmOGM3NDAxMTdmMDp7Il9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGgu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b3N0IFxcXCJUaGUgU3Rvcnkgb2YgSG93IE5pa29sYW9zIEdvdCBhIERhdGEgU2NpZW5jZSBKb2IgaW4gSnVzdCAzIE1vbnRoc1xcXCIgd2FzIGNoYW5nZWQgc3VjY2Vzc2Z1bGx5LiBZb3UgbWF5IGVkaXQgaXQgYWdhaW4gYmVsb3cuXCJdLFtcIl9fanNvbl9tZXNzYWdlXCIsMCwyNSxcIlRoZSBwb3N0IFxcXCJUaGUgU3Rvcnkgb2YgSG93IE5pa29sYW9zIEdvdCBhIERhdGEgU2NpZW5jZSBKb2IgaW4gSnVzdCAzIE1vbnRoc1xcXCIgd2FzIGNoYW5nZWQgc3VjY2Vzc2Z1bGx5LiBZb3UgbWF5IGVkaXQgaXQgYWdhaW4gYmVsb3cuXCJdXSJ9


# blog_post

title: A blog with the appearance of a scientific paper in Latex
slug: a-blog-with-the-appearance-of-a-scientific-paper-in-latex
pub_date: 2015-11-28
keywords: blog; latex; paper
authors: Miguel González-Fierro
meta_description:
  This blog have the same design of a scientific research paper, writen in Latex. Here there will be entries about technology, startups, science and AI.

abstract:
  This blog intends to imitate the design of a scientific paper written in LaTeX. The idea is to not only use the beautiful LaTeX design and typography but also to organize each post like a scientific research paper. In this post, we will explain the basics of how to write a scientific paper and how to use the css classes to make it look like a LaTeX document.

content:
  <h4 class="section">Introduction</h4>

  <p>A scientific paper usually consists of 4 or more big sections: introduction, content, conclusions, and references.</p>

  <p>The introduction initially states the problem and introduces relevant information to the reader. Usually, inside the introduction, the scientist summarizes the related work or state of the art. After the state of the art, the scientist gives a brief explanation of the technique he or she proposes and what is the <em>contribution</em> to science or the new discovery made. This brief explanation introduces the next section: the content.</p>

  <h4 class="section">Content of the Paper</h4>

  <p>The content of the paper can be divided into several sections or subsections, each of them addressing a part of the scientific discovery.</p>

  <h5 class="subsection">Contributions to Science</h5>

  <p>There is a common feature to all scientific papers ever published, they all have a contribution to science. It can be a great contribution like Einstein&#39;s equation <span class="math-tex">$E=mc^2$</span> [1] or a small one like Fierro&#39;s PhD thesis [2]. However, all of them make a step further in the path of science.</p>

  <p>The numbers inside the square brackets are called the references, which have a different section located always at the end of the document. References are very important in science since it helps us to cite other authors and relate our work to theirs.</p>

  <h4 class="section">Conclusions and Future Work</h4>

  <p>The conclusions summarize the main aspects of the paper. Sometimes here can be included the future developments the researcher wants to perform. It may also include the acknowledgments. I would like to thank Jos&eacute; Ignacio Fern&aacute;ndez, CTO of Traity, this blog is based on his original idea&nbsp;[3].</p>

  <h4 class="section">References</h4>

  <ol>
  	<li>A. Einstein and A.H. Taub, &quot;The Meaning of Relativity&quot;, <em>American Journal of Physics</em>, vol. 18, num. 3, pp. 403-404, 1950.</li>
  	<li>M. Gonz&aacute;lez-Fierro, &quot;Humanoid Robot Control of Complex Postural Tasks Based on Learning From Demonstrations&quot;, <a href="https://miguelgfierro.com/blog/2014/a-humanoid-robot-phd-thesis-explained-to-non-scientists/" target="_blank">Ph.D. Thesis</a>, 2014.</li>
  	<li>J.I. Fern&aacute;ndez, &quot;A Scientific Paper Approach to a Personal Web Page&quot;, <a href="http://jose.sh/" target="_blank">http://jose.sh/</a></li>
  </ol>


title: The Spanish startup ecosystem will be more technological
slug: the-spanish-startup-ecosystem-will-be-more-technological
pub_date: 2015-05-19
keywords: startups; spanish ecosystem; investment
authors: Miguel González-Fierro
meta_description:
  The startup ecosystem in Spain is becoming more technological. The investment is growing in tech startups.

abstract:
  We are living a boost of startups in Spain. The startup ecosystem have change significantly in recent years, probably most experts would say in a good way. There are more and more money for investments and better projects to invest. Spain has talent and we are taking benefit from it.

content:
  <h4 class="section">The startup ecosystem</h4>

  <p>Startups in Spain usually grow near business schools, many of them are among the firsts in international ranks, and near accelerators, which are usually related with investment funds. There are multiple success cases: <a href="http://www.touristeye.com/">TouristEye</a>, <a href="https://www.laneveraroja.com">La Nevera Roja</a>, <a href="https://www.tuenti.com">Tuenti</a>, <a href="http://www.milanuncios.com/">Milanuncios</a>, <a href="http://www.ticketbis.com/en/">Ticketbis</a>. They all have in common an excellent execution, a validated business model and a great product.</p>

  <p>However, we are still very far from other ecosystems. In <a href="http://www.oecd-ilibrary.org/sites/factbook-2010-en/07/01/02/index.html?contentType=&amp;itemId=/content/chapter/factbook-2010-55-en&amp;containerItemId=%2Fcontent%2Fchapter%2Ffactbook-2010-55-en&amp;accessItemIds=&amp;mimeType=text/html&amp;_csp_=3605c6feb1d5b86d8e66e6fc392e2b27">Israel the per capita investment in startups</a> is $140, in the US is $70 while in Spain is $1. Most people would blame the market size. &ldquo;The US market is huge in comparison with the Spanish market&rdquo;. However, Spanish and US startups should address the same market, the entire world. &ldquo;Other ecosystems have more experience and maturity&rdquo;. However, Israel has taken the lead in a very few years. &ldquo;The Government does not support Spanish startups&rdquo;. Well, that is true. There is little to say here. However, we have Inditex, the biggest fashion company in the world. To comfort ourselves we could say that it is more beautiful to start a company in Spain since it is more difficult.</p>

  <h4 class="section"><img alt="" height="319" src="/img/upload/2021/03/17/1448897555.png" width="340" /></h4>

  <p>My personal opinion of the issue is that we are simply forgetting the other half of the pie. We create companies of financiers and not companies of engineers. That is, we innovate in business and we do not innovate in technology.</p>

  <h4 class="section">Big tech companies</h4>

  <p>Take a look at the biggest tech companies. Google with Larry Page and Sergey Brin (computer scientist and computer scientist), Tesla with Elon Musk (physicist), Apple with Steve Jobs and Steve Wozniak (electronic engineer and electronic engineer) and Microsoft with Bill Gates (computer scientist). That is geek, geek, cool geek, mega-cool geek, odd geek and hippie-philanthropist geek. All of them have created really innovative products, both in terms of technology and business. Where do we see something like that in Spain? There are some companies like that but not many. Few investors would think that these people don&rsquo;t know about business, they do know. And at the same time, they know about technology and product.</p>

  <h4 class="section">More investment is needed</h4>

  <p>I could say that it is necessary for investors to go to some research lab at specific Universities to determine if there is any business opportunity. I could say that it is necessary for scientists to leave their caves and relate to the business people of our business schools to look for synergies. But it is needless to say because it is something that is going to happen and is happening anyway. When the market has a shortage there is always somebody that see the opportunity and covers it.</p>

  <p>For me, the future of the Spanish ecosystem is very clear. Strong technical companies will appear, they will cover this shortage in the market and they will compete in technology with European and North American companies. At the same time, leaders with a strong technical background and not only business background will step forward. Finally, there will be more investment for projects that are innovative in technology and not only innovative in business.</p>


title: What color is this dress? The Dressgate explained
slug: what-color-is-this-dress-the-dressgate-explained
pub_date: 2015-02-28
keywords: dressgate; computer vision; white and gold; black and blue; optical illusion
authors: Miguel González-Fierro
meta_description:
  The explanation of the dressgate mistery is not in computer vision algorithm but in the way our intelligence perceives reality.

abstract:
  Is the dress white and gold? Is it black and blue? How is it possible that many people see one combination and some people the other combination. The answer is that our brain tricks us to adapt our reality.

content:
  <h4 class="section">Introduction</h4>

  <p>There has been a huge discussion on the Internet about the color of this <a href="https://en.wikipedia.org/wiki/The_dress_%28viral_phenomenon%29"> dress</a> that the user Skiwed uploaded to Tumblr. People went crazy.</p>

  <p>Some people saw the dress as white and gold, while others saw it as blue and black. Some people (which includes several computer vision engineers in our team) even saw it sometimes as white and gold and some other times as blue and black. It is completely crazy.</p>

  <p>Many people have been wondering why this is happening, and most importantly of all, who is right, those who see the dress as white and gold or those who see the dress as blue and black. The correct answer is that both groups are right and that your brain is messing with you.</p>

  <p>Our brain generalizes colors in a way that is easy to process for us. We classify colors with a semantic description, we give them a name. Usually women are better at identifying colors, they have salmon (for a man this is just orange) or gold (for a man this is just yellow). Even in Russia, there are two ways of saying blue, golub&oacute;i, which is a light blue, and s&iacute;ni, which is dark blue. For them those two kind of blue are completely different colors. So the conclusion is that the way we perceive the word is closely related to the language. Our intelligence is deeply related to semantics and language.</p>

  <p class="image-align-center"><img alt="Color constancy" height="204" src="/img/upload/2021/03/17/1448898540.jpg" width="300" /></p>

  <h4 class="section">Our brain plays with our minds</h4>

  <p>We suffer from a brain trick called color constancy. It means that the human being perceives a color in an object constant under varying illumination conditions. Take a look at this example of a black leather briefcase. You see it completely black. You even guess that the back part, which is concealed to the viewer&rsquo;s point of view, is also black. But if you compute the RGB (red, green, blue) values of each pixel you will find that there is a 87% component of black and a 13% component of white. The white component corresponds to the clasp and to the reflection of the leather. The funny thing is that our brain eliminates the white reflection because we really know that it is just a reflection and the leather is black.</p>

  <p>What happens in the mysterious dress is related to the color constancy and the way we perceive the background of the image. Some people perceives the bright background as blue, so they see the dress white and gold in contrast. Other people perceives the background as gold, so they see the dress as blue and black.</p>

  <p>The conclusion is that you cannot trust your senses.</p>

  <p style="text-align:center"><span style="font-size:12px"><em>What is life? a tale that is told;<br />
  What is life? a frenzy extreme,<br />
  A shadow of things that seem;<br />
  And the greatest good is but small,<br />
  That all life is a dream to all,<br />
  And that dreams themselves are a dream.</em></span></p>

  <p>Pedro Calder&oacute;n de la Barca in Life is a Dream</p>


title: What is scrum and how to apply it to a startup
slug: what-is-scrum-and-how-to-apply-it-to-a-startup
meta_description: Scrum is an agile development method that is usually implemented in software startups
pub_date: 2014-09-18
keywords: scrum; startups
authors: Miguel González-Fierro
abstract:
  Scrum is a method of agile development that can help any development team to ship a final product in a small period of time. It is widely used in startups and software companies around the world

content:
  <h4 class="section">Agile development</h4>

  <p>There are many techniques to boost productivity in a startup. One of the most complete and used methods is scrum. Scrum is a type of agile development that focuses on completing a new feature in the product in a short period. It enables to manage very efficiently development teams, it copes with uncertainty in the planning and it allows a high degree of flexibility.</p>

  <p>The main goal of scrum is to deliver a potentially shippable product increment in a fixed period. The process begins with a Product Backlog. The product backlog is a TODO list of all the tasks that have to be completed. Some of these tasks are included in the Sprint, which consists of a period between 2 and 4 weeks in which a new feature in the product is completed. Also, every day the team have a Daily Scrum Meeting, to see how the process is going.</p>

  <h5 class="subsection">Scrum roles</h5>

  <p>In scrum, there are different roles some members of the team must set, the product owner, the scrum master and the development team.</p>

  <p><img alt="Scrum process" height="341" src="/img/upload/2021/03/17/1448899656.jpg" width="340" /></p>

  <p>The Product Owner is a team member that has a complete vision of the business. This person is responsible for directing the team effort to get the largest business value and has to decide which feature is more important to develop.</p>

  <p>The Product Owner is also responsible for deciding the tasks that appear in the product backlog and what is the priority of each of them.</p>

  <p>The Scrum Master leads the development team. This person is responsible for removing any distraction from the team and help them to achieve the goal. The scrum master must make sure that each scrum iteration, called sprint, is successfully completed.</p>

  <p>The Development Team is responsible for developing each new feature in the product. Every day usually in the morning all team meet to do the daily meeting, where every member answer three questions: What did I do yesterday? What am I going to do today? Do I have any problem/issue?</p>

  <p>Maybe one of the most important features of this method is the daily meeting. It is a perfect way to plan the tasks of the team and a good way to know what everybody else is doing.</p>


title: What makes the difference is not the experience, but its derivative
slug: what-makes-the-difference-is-not-the-experience-but-its-derivative
pub_date: 2014-05-17
keywords: experience; rate of change; startups
authors: Miguel González-Fierro
meta_description:
  When applying for a jog in a startup or any company the experience should not be the most important factor

abstract:
  When somebody is looking for a job, the first question the employer asks the candidate is how many years of experience do you have. The candidate's salary is usually calculated in relation to the number of years of experience. Furthermore, we are used to assume that the more experience somebody has, the more suitable he or she is for the job. We take that for granted. However, is really the experience what makes the difference? 

content:
  <h4 class="section">Introduction</h4>

  <p>It is very common to hear that the most valuable trait in a professional career&nbsp;is experience. When you look for a job, they ask for 5 or 10 years of experience in some field. In the typical startup pitch, you may hear something like the CEO has 25 years of experience in management, the CFO another 25 in corporate finances, and the board, if they are put together, they sum up to 150 years of experience. So the company as a whole has 200 years of experience. Awesome. If we put together 10 of these companies, it&rsquo;s like going back in time to when Romans were hunting barbarians.</p>

  <p>But the funny thing is that, even though everybody thinks that experience is so valuable, everybody gets it. If somebody is in his fifties, he will probably have 25 years of experience. Why is it so valuable if almost everybody gets it anyway?</p>

  <p>It is true that experience is important. The older you get, the more problems you face and the more knowledge you acquire. Your mistakes make you stronger for future experiences. Experience lets you make wiser decisions about a similar problem that has happened before.</p>

  <p>However, we are living in exponential times. There is a good <a href="https://www.youtube.com/watch?v=cL9Wu2kWwSY">video on youtube</a> talking about this. The rules are not the same as in the old times. Technology is growing so fast that the software people are using in the first years of college will be obsolete when they finish it. It happens the same with the methods used in business or marketing. The rate of change is huge.</p>

  <h4 class="section">The rate of experience change</h4>

  <p>Therefore, experience is no longer the most important thing. It is more important to be able to adapt to the speed of the world, to understand changes and be part of them. If you are not able to learn fast, you will be put aside by the system. It is more important to be a student (in the sense that you have a lot to learn) than to be a professor (in the sense that you know everything).</p>

  <p>What really matters right now is not the experience, but the rate you acquire that experience. What really matters today is the <em>derivative of the experience</em>.</p>


title: The best image recognition system for fashion
slug: the-best-image-recognition-system-for-fashion
meta_description: Our startup Samsamia is working on a visual search algorithm to recognize fashion garments
pub_date: 2013-12-05
keywords: image recognition; visual search; fashion recognition
authors: Miguel González-Fierro
abstract:
  The future of internet will rely on the development and integration of visual search engines. Google will make room for a search engine capable of understanding what is happening in an image. The visual search algorithm we developed at Samsamia is able to recognize an image and compare it with a big product database to obtain associated information.

content:
  <h4 class="section">Computer vision for fashion</h4>

  <p>We have worked very hard during the past several months in <a href="http://www.samsamia.com">Samsamia</a>. We were working a lot on improving the accuracy of our visual search system. We have minimized the false positive results. If we are looking for a red bag it is unacceptable to obtain a black bag. The hard work has produced the results we were looking for and we can now say that we are very proud of the precision of our search engine.</p>

  <h4 class="section">How our visual search system works</h4>

  <p>Identifying a garment in a picture is not an easy task. There are many problems that have to be addressed.</p>

  <p>From the point of view of computer vision, first, it is necessary to remove the background and clean the image. If there is an occlusion in the image, such as when a hand is hiding part of the garment, it has to be detected and fixed. Then we perform a first analysis to obtain a signature that takes into account low-level features like color, shape, relative position or texture.</p>

  <p><img alt="" height="228" src="/img/upload/2021/03/17/1448970256.jpg" width="340" /></p>

  <p>The second part is to perform a high-level analysis. This analysis tries to imitate the generalization process that appears in the consumer mind when he or she compares several images. The goal is to compose a high-level classifier for every kind of object. This classifier has to be able to recognize the garment type, the use we usually give to the garment and, what is more difficult, the style or subjective perception. The style differs from one person to another. If a person prefers a classic dress style, we will try to obtain results that fits that style. For that purpose, we included a machine learning process in the system to be able to understand the user style and learn from his choices. The more our system is used the more it learns from the user behaviour.</p>


title: Dresscovery, the visual search app is working with Google Glass
slug: dresscovery-the-visual-search-app-is-working-with-google-glass
pub_date: 2014-03-29
keywords: dresscovery; visual search; google glass
authors: Miguel González-Fierro
meta_description:
  The last technological advance of computer vision and visual search app Dresscovery is to work with Google Glass

abstract:
  At the beginning of this year Dresscovery was released. The app, that is available in iPhone and Android, allows to identify a purse using a picture of it. In a new line of research, our team is working on an identification system that can be implemented in Google Glass. The new application will allow to obtain information of a garment and buy it online instantaneously.

content:
  <h4 class="section">Possibilities of computer vision</h4>

  <p>Computer vision field has advanced a lot in recent years. We are closer to understanding what is happening in an image.</p>

  <p>In that sense, Google Glass will allow interacting with the environment in a completely different way. It will lead to the development of visual search engines, allowing to create hundreds of apps that were impossible before. A visual search engine analyses an image and extracts useful information.</p>

  <p>Its applications in different markets are extremely huge. Some examples are product recognition, consumer desire identification, protection against inadequate contents, artwork identification, etc. The future of the Internet will be the development and integration of visual search engines.</p>

  <h4 class="section">Dresscovery, the app that recognizes garments, for Google Glass</h4>

  <p>Dresscovery, created by a scientist of University Carlos III of Madrid (<a href="http://roboticslab.uc3m.es/">Robotics Lab</a>) and King&rsquo;s College London (<a href="http://www.thrish.org/">Thrish&#39;s lab</a>), has developed a visual search engine adapted to fashion products, called Fashion Recognition.</p>

  <p>Its integration with Google Glass is very easy and they are working to have it available as soon as possible.</p>

  <p>The search engine is the brain of <a href="https://miguelgfierro.com/blog/2013/dresscovery-app-is-out/" target="_blank">Dresscovery app</a>. The app, available for iPhone and Android, allows identifying a purse instantaneously using a picture taken by a smartphone. It finds the most similar products that are available for sale right now among hundreds of different brands. The app will soon include other types of garments.</p>

  <p><img alt="Dresscovery for Google Glass" height="191" src="/img/upload/2021/03/17/1448971120.png" width="340" /></p>

  <h4 class="section">&nbsp;</h4>


title: Dresscovery app is out
slug: dresscovery-app-is-out
meta_description: Dresscovery is a visual search app for identify and recognize fashion garments
pub_date: 2013-12-16
keywords: dresscovery; visual search; garment recognition
authors: Miguel González-Fierro
abstract:
  Dresscovery is an smartphone app that allows to identify a garment instantaneously using a picture. The app finds the most similar products that are available for sale right now among hundreds of different brands. Dresscovery is an app aimed to be the future driver of online retail growth through the connection of the textile brands online retail business with the real world. We are the Shazam of Fashion.

content:
  <p>Finally! We were waiting a long time for this day to come. We worked very hard on the image recognition system, on the app usability, on the design&hellip; Now we are very proud of our child.</p>

  <p>Dresscovery is a smartphone app that allows finding a fashion item you like using a picture. Let&rsquo;s say you like the bag a celebrity is wearing and you would like to find something similar but cheaper. Dresscovery discovers the fashion for you and give you the option of buying it instantaneously. In the first version of the app you can find bags, but there will be any kind of garment. The app is available in Google Play for Android, you can <a href="https://play.google.com/store/apps/details?id=es.samsamia.dresscovery">download it here</a>.</p>

  <p>With Dresscovery, a user would find the purse if it is available in our database and they will be able to find its price. But even more importantly, with our Visual Search Engine, she would find very similar purses too and could choose (among the range of purses) the one more suited to her needs in relation to her purchase power thus matching all the factors or variables included in a purchase decision: beauty, price, reputation, brand, time, craving, etc.</p>

  <p>Technologically, Dresscovery matches any picture of apparel or accessory with a large database of online brands stock.</p>

  <p><img alt="Example of Dresscovery finding a bag" height="255" src="/img/upload/2021/03/17/1448973064.jpg" width="340" /></p>

  <p>It allows the user to buy the targeted object in the respective online store.</p>

  <p>Right now we have a database of more than 10000 bags from hundreds of brands. You can find some of the brands on our web page.</p>

  <p>Dresscovery is a strong name that shows the idea that we want to share. Using a smartphone you can discover the fashion you see on the street and you can get a similar and cheaper product. The way to buy fashion will never be the same.</p>


title: Samsamia is about AI, pattern recognition and machine learning
slug: samsamia-is-about-ai-pattern-recognition-and-machine-learning
meta_description: Our startup Samsamia works on artificial intelligence, pattern recognition and machine learning
pub_date: 2013-07-21
keywords: samsamia; artificial intelligence; pattern recognition; machine learning
authors: Miguel González-Fierro
abstract:
  Samsamia Technologies S.L. is a spin-off of Robotics Lab at Universidad Carlos III of Madrid, one of the most advanced research group of robotics in Spain. Its fields of expertise cover computer vision, machine learning, Big Data and artificial intelligence. The company mission is to transfer high quality scientific knowledge to the market through solutions related to robotics and technology.

content:
  <h4 class="section">Introduction</h4>

  <p><a href="http://www.samsamia.com">Samsamia Technologies</a> is a startup that applies robotics to the fashion market. The goal of robotics is to create autonomous robots that help us in tasks we do not want to perform, like walking the dog, ironing, wash the dishes, ironing, make the bed and some other dangerous tasks like ironing.</p>

  <h4 class="section">Company background</h4>

  <p>Robotics is a very young science, we could say that it begun in the 1970s, and was born as mix of another three sciences: mechanics, electronics and computer science. As a baby branch of science, it has many challenges to solve. Right now we are very far from what we see in movies and it will pass many years until we could have in our houses humanoid robots like HOAP-3 helping us.</p>

  <p>Due to the difficulty of the problems robotic scientists address, it is usually divided in small parts. It is not easy to distinguish between these parts since many of them are very similar.</p>

  <h5 class="subsection">Artificial Intelligence</h5>

  <p>A very popular part is the Artificial Intelligence or AI. AI has to do with taking decisions.</p>

  <p>Things like how can I go from the room I am right now to another room or which tool should I use if I need to clean a room.</p>

  <p>All these actions require a high capacity of learning and a deep understanding of the environment. The ability to learn is studied in Machine Learning and the ability to understand the environment is studied in Pattern Recognition.</p>

  <h5 class="subsection">Machine Learning</h5>

  <p>Machine Learning tries to imitate the amazing human capacity of learning. We are learning machines and our immense capacity to adapt to different situations has allowed us to evolve to what we are right now. The current capacity of robots to learn is very limited. However, some awesome advances are being made in the last years. A research performed by the CEO of Samsamia and scientists of Universidad Carlos III de Madrid and King&rsquo;s College of London made a humanoid robot to imitate a behavior demonstrated by a human teacher and improve the learned behavior just like we human beings do.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=CSB8vTjFkGY">
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/CSB8vTjFkGY?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>

  <h5 class="subsection">Pattern Recognition</h5>

  <p>Pattern recognition has to do with the ability of generalizing. For us it is easy to recognize a glass and that we usually use it to drink. If we don&rsquo;t have a glass, we can even use a bottle to drink or any other recipient. But there are a million shapes of glasses or bottles and for a robot it is very difficult to recognize a glass, a cup or a bottle and that all of them are recipients and can be used to drink. There are many applications of pattern recognition, like fashion recognition, object and face detection and even emotion recognition. A cool development that our CEO, Miguel Gonz&aacute;lez-Fierro, did was a system that recognized&nbsp;not only the face of a person but also the emotion that this person is feeling, allowing a humanoid robot to reply in accordance.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=dVhte6e7bn0">
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/dVhte6e7bn0?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>

  <h4 class="section">Conclusion</h4>

  <p>Robotics is an amazing science and it has awesome applications. In Samsamia, we desire to show people how robotics, technology and science can be used in their life.</p>


title: Demoday of 2020 for 2020 startup Madrid
slug: demoday-of-2020-for-2020-startup-madrid
meta_description: Our startup Samsamia won the startup contest 2020 for 2020 startup Madrid
pub_date: 2013-06-15
keywords: demoday; 2020 for 2020; startup contest
authors: Miguel González-Fierro
abstract:
  On February 2013 Samsamia were selected as one of the twelve winner startups for the acceleration program 2020 for 2020 Startup Madrid. The program is led by a company specialised in startup acceleration, Cink Emprende, with the collaboration of the Economic Development Agency "Madrid Emprende" and a number of experts in representation of Madrid 2020, Madrid Emprende, and Bid sponsors.

content:
  <p>2020 Startup Madrid programme was created in the context of the Olympic candidature of Madrid 2020 with the purpose of leaving a legacy of opportunities to Madrid and to Spain that shall serve to promote higher enthusiasm among young people and the entire population.</p>

  <h4 class="section">Demo Day in Retrospective</h4>

  <p>Since the beginning of the acceleration with <a href="http://www.cink-emprende.es/">Cink Emprende</a>, we felt that things were going to change, we met Ra&uacute;l del Pozo and his team before, and we knew they are excellent professionals. We decided to get fully involved with the process. On the first day we found 11 other awesome projects to share dreams and illusion. We felt that we were going to get along very well.</p>

  <p>As weeks passed by, we attended to different lectures about finances, marketing, management, law, blogs, etc, all of them surpassed our expectations. Finally, the date of the event arrived. Everything was planned to perfection. Every project was presented one by one with a huge amount of motivation and inspiration. All of us did our best.</p>

  <p>When the event was over we went to celebrate the results and realized the time we had shared. We all come to the same conclusion, we had grown as a team, as a company and as persons. We had reduced our weaknesses and enhanced our strengths.</p>

  <p><img alt="Miguel González-Fierro" height="252" src="/img/upload/2021/03/17/1448975076.jpg" width="340" /></p>

  <p>After everything we have lived, we can only express our gratitude for those who have supported us, removed our doubts and helped us start. The best of all is that we are not going to look back. If we fall, we will stand up, retake control and keep pursuing our dreams. Entrepreneurship is to make mistakes, learn, think, take all the experiences of our life and use them to reach an objective. To be an entrepreneur is not an election but a way of life that we all carry in our hearts.</p>


title: Samsamia at BBVA OpenTalent event in Buenos Aires
slug: samsamia-at-bbva-opentalent-event-in-buenos-aires
meta_description: Our startup Samsamia wins the BBVA OpenTalent contest
pub_date: 2013-06-30
keywords: bbva opentalent; startup contest
authors: Miguel González-Fierro
abstract:
  We were finalist of BBVA OpenTalent startup contest, among more than 900 startups, which is the most important startup contest in Spain. The bank, which is the one of the biggest financial entities in Europe, wants to promote entrepreneurship by giving 200.000€ in prizes. We are delighted for being among the finalists. The experience was awesome and the friends we met there unforgettable.  

content:
  <h4 class="section">OpenTalent</h4>

  <p>BBVA <a href="https://openinnovation.bbva.com/en/open-talent" target="_blank">OpenTalent</a> contest is a startup competition hosted by BBVA. The bank&nbsp;seeks to discover and promote talent from whom they can learn and share knowledge. It is aimed at ideas in e-commerce, security, mobile payments, data and others.</p>

  <p>When we were told that we were the&nbsp;<a href="https://openinnovation.bbva.com/en/open-talent/ediciones/2013" target="_blank">finalist of BBVA OpenTalent</a> among more than 900 startups of 25 countries, we really freaked out. It was an incredible honor.</p>

  <p>We were not sure about traveling to Buenos Aires. It is a 12 hours flight from Madrid and very expensive for a startup like us. It took us some time to decide. We had the opportunity of doing the pitch on Skype, but of course, it wouldn&rsquo;t be the same. Finally, we thought that any time we go to an event we are happy in the end.</p>

  <h4 class="section">More than a prize</h4>

  <p>We had to compete with 13 teams in the technology category to win 100.000&euro;, but we were 20 teams in total. The other 7 competed in the fintech category. It was stunning to read about the projects we are competing with, some of them had risen millions.</p>

  <p><img alt="" height="255" src="/img/upload/2021/03/17/1448984056.jpg" width="340" /></p>

  <p>But the first day when we met them at Endeavor office, everything changed. They changed from being competitors to being persons, with the same problems, fears and dreams.</p>

  <p>We had the great opportunity to meet Sergio of <a href="http://en.paugarciamila.com/bananity/">Bananity</a>, he has built two startups but he seems to have built thousands, Juanma of Quonf, an amazing speaker, Daniel of Rocket, an amazing person, David of <a href="http://www.unicoos.com/">Unicoos</a>, very funny, Jose and Borja, of <a href="https://traity.com/">Traity</a>, one of the winner projects, Rub&eacute;n of Twittflow, who did an incredible pitch, and up to 20 projects more.</p>

  <p>It was only three days but we had an amazing time and we made awesome friends.</p>


title: A humanoid robot Ph.D. thesis explained to non scientists
slug: a-humanoid-robot-phd-thesis-explained-to-non-scientists
meta_description: Explanation of a PhD thesis in humanoid robotics and machine larning to non scientific people
pub_date: 2014-10-07
keywords: ph.d. thesis; humanoid robot; machine learning
authors: Miguel González-Fierro, Thrishantha Nanayakkara and Carlos Balaguer
abstract:
  It is sometimes difficult for us as scientist to explain our research to the general public. The aim of this post is to throw some light on what I did in my Ph.D. thesis in a easy to understand language. The purpose of the research was to make a small humanoid robot perform a series of complex postural tasks using a machine learning technique called learning from demonstration.

content:
  <h4 class="section">Introduction</h4>

  <p>The title of the <a href="https://miguelgfierro.com/docs/gonzalez-fierro2014thesis.pdf" target="_blank">thesis</a> was <em>Humanoid Robot Control of Complex Postural Tasks based on Learning from Demonstration</em> [1] and it was directed by <a href="http://roboticslab.uc3m.es/roboticslab/people/c-balaguer">Prof. Carlos Balaguer</a>, from Universidad Carlos III of Madrid, and <a href="http://thrish.org/research-team/thrish">Dr. Thrishantha Nanayakkara</a>, from King&#39;s College London. Its objective is to make an advancement in the development of complex behaviors in humanoid robots, in order to allow them to share our environment in the future. The experimental justification of this thesis was developed using the humanoid robot HOAP-3.</p>

  <h4 class="section">Human Learning: Imitation and Innovation</h4>

  <p>It is widely known by psychologists and neuroscientists that imitation learning is one of the first methods toddlers use to develop their skills. Furthermore, there is evidence that justifies that the imitation between humans is goal-directed.</p>

  <p>Recent studies show that apes are more suitable to imitate while children show more tendency to over-imitate, in the sense that children make an attempt to improve the optimality of the learned skills. In that sense, skill innovation is, therefore, an essential part of human behavior [2].</p>

  <p><img alt="HOAP-3 humanoid robot" height="313" src="/img/upload/2021/03/17/1449342977.png" width="340" /></p>

  <p>Consider a child learning motor skills based on demonstrations performed by his parent. In this case, the problem of relating demonstrations performed by the parent to the child&rsquo;s own kinematic scale, weight and height, known as the <em>correspondence problem</em>, would be one of the complex challenges that should be solved first. The correspondence problem is one of the crucial problems of imitation and can be stated as the mapping of action sequences between the demonstrator and the imitator.</p>

  <p>From that perspective, the child could find a solution that fits his own muscular strength, size, reachable space, and kinematic characteristics which somehow match the level of optimality of demonstrations performed by the parent. This problem can be solved by mapping movements made in a different kinematic scale to a common domain, such as a set of optimal criteria that defines the goal of the action.</p>

  <h4 class="section">Learning from Demonstration and Skill Innovation in Robots</h4>

  <p>The thesis proposed a novel method for humanoid robots to acquire optimal behaviors based on human demonstrations. We solved the correspondence problem by making comparisons in a common domain, a reward space defined by a multi-objective reward function. The experimental results show advancement in how a humanoid robot can learn to imitate and innovate motor skills from demonstrations of human teachers of larger kinematic structures and different actuator constraints.</p>

  <h5 class="subsection">Behavior Representation in the reward domain</h5>

  <p>The representation of the behavior goal is made through a reward function. The shape of the reward functions is selected in accordance with the task. In the case of standing up from a chair, where it is important to maintain stability, the reward value would be high when the robot is in a stable position and would be low when the robot is unstable.</p>

  <p>In a similar way, if the task is important to minimize the effort, the reward value would be high when the robot actuators have a small torque (therefore a small effort) and would be low when the torque is high (therefore a great effort). Consequently, the reward function acts as an attractor of the behavior&#39;s goal.</p>

  <p>The reward function is formed by different components, depending on the objective of the action in every moment. This agrees with the theory of Marvin Minsky, one of the founders of Artificial Intelligence, which proposes that our brain manages different resources that compete with each other to fulfill different goals [3].</p>

  <h4 class="section">Experimental Results</h4>

  <p>We collected 3D motion data of a group of human subjects performing several behaviors, the first one was a stand-up movement, and the second one was a sequence of behaviors such as walking to a door and open it.</p>

  <p>Then we defined a multi-objective reward function as a measurement of the goal optimality for both humans and robots, which is defined in each subtask of the global behavior.</p>

  <p>Finally, we optimized a policy to generate whole-body movements for the robot that produces a reward profile that is compared and matched with the human reward profile, producing an imitative behavior. Furthermore, we can search in the proximity of the solution space to improve the reward profile and innovate a new solution, which is more beneficial for the humanoid.</p>

  <p>In order to generate the movement, we used a genetic algorithm called Differential Evolution. A genetic algorithm is an optimization method that is used to generate candidate robot movements whose reward is matched to the human&#39;s reward. The matching of the reward profiles is performed using Kullback-Liebler divergence.</p>

  <h4 class="section">References</h4>

  <ol>
  	<li>M. Gonz&aacute;lez-Fierro, &quot;Humanoid Robot Control of Complex Postural Tasks based on Learning from Demonstration&quot;, Ph.D. thesis, 2014.</li>
  	<li>M. Nielsen, I. Mushin, K. Tomaselli and A. Whiten, &quot;Where culture takes hold: overimitation and its flexible deployment in western, aboriginal, and bushmen children&quot;, <em>Child development</em>, vol. 85, num. 6, pp. 2169&ndash;2184, 2014.</li>
  	<li>M. Minsky, &quot;The emotion machine&quot;, <em>New York: Pantheon</em>, 2006.</li>
  </ol>


title: The science behind the new Star Wars robot: BB-8
slug: the-science-behind-the-new-star-wars-robot-bb-8
pub_date: 2016-01-07
keywords: star wars; bb-8 robot; science
authors: Alejandro Malmierca and Miguel González-Fierro
meta_description:
  The science behind BB-8, the robot of the new Star Wars movie The Force Awakens. How it works and how it was used in the movie.

abstract:
  Everybody is excited about the new Star Wars movie: The Force Awakens. One of the most exciting new characters is the robot BB-8. This new character has enchanted everyone with his modern design and his new features. If you know it, you probably love it, if you don’t, you will. In this article we will introduce the new Star Wars robot, how it works and why J.J. Abrams added this character to the new saga. 

content:
  <h4 class="section">Meeting BB-8</h4>

  <p>We have all waiting too long for the new movie of the Star Wars saga: <a href="https://www.youtube.com/watch?v=sGbxmsDFVnE">The Force Awakens</a>. And now it&rsquo;s here and it is breaking all records. In the first twelve days of its release, the movie already hit <a href="http://www.theguardian.com/film/2015/dec/27/star-wars-the-force-awakens-box-office-record">$1bn at the box office</a>. This hasn&#39;t been seen since the release of Jurassic World.</p>

  <p>J.J. Abrams begins the new trilogy introducing new characters but preserving the taste of the Star Wars Universe. Robots are a main component in the saga. Just to cite some of them, we have the droid army of Star Wars: The Phantom Menace, or the famous C3PO or R2D2 in all the first six movies. R2D2 in fact acts as one of the central characters in many movies, saving the main ones more than a couple of times.</p>

  <p>One of the most difficult challenges in the new movie was to create a new robot as lovely as C3PO or R2D2, but completely new. BB-8 was a deal for the Force Awakens team. J.J. Abrams discovered some drafts from <a href="http://www.sideshowtoy.com/blog/how-original-ralph-mcquarrie-concept-art-inspired-star-wars-the-force-awakens">Ralph Mcquarrie made in the 70&rsquo;s</a> and took them for his movie. BB-8 is completely new but always has been a part of the Star Wars cast.</p>

  <p><img alt="" height="191" src="/img/upload/2021/03/17/bb8.jpg" width="340" /></p>

  <h4 class="section">How BB-8 works</h4>

  <p>BB-8 is a spherical robot that moves by rolling. One of its main component to control stability is a gyroscope, which is one of the most used sensors in robotics (and other devices like ships, aircrafts or the Hubble telescope). A gyroscope measures angular velocity, or in plain words, the turning speed. The gyroscope is usually mixed with an accelerometer, which is a sensor that measures the acceleration in the three axes. Together they provide the robot with the necessary measurements to maintain stability.</p>

  <p>Another special feature of our little friend is his head. It is always at the top of the body. As it is explained in <a href="http://techcrunch.com/2015/12/22/how-bb-8-works/">Techcrunch</a>, the head uses a series of magnets that avoids it to roll off. As it can be seen in Fig. 2, the magnet of the head and one of the top of the body attract themselves, while the ones located to the sides repel each other. This mechanism allows the head to be always on top.</p>

  <p>A very interesting detail is how the spherical body moves. Inside the body there is a wheeled mechanism. When these wheels are moved through remote control, there is a change in the center of mass position. This variation produces a loss of stability that generates the movement.</p>

  <p>The action is similar as when a person is leaning forward. If the person leans forward too much, he will lose stability and he will need to take a step forward if he doesn&rsquo;t want to crash his face with the floor.</p>

  <p>The math is very straightforward. If the projection of the center of mass in the floor is inside the shade of the feet (what is called the stability region), the person is stable. If the projection is outside the stability region, then you go down like a brick. It is the same with BB-8. The difference is that in the robot case the stability region is a point, the contact point between the sphere and the floor. That way the movement is easier.</p>

  <p>BB-8 is a real robot. In fact, there are already two toys available, a smaller version from <a href="http://www.hasbro.com/en-us/brands/starwars/videos?bctid=4498661918001">Hasbro</a>, and bigger version from <a href="http://www.sphero.com/starwars">Sphero</a>. You can have it in your house and the most exciting thing is that not only humans enjoy them, cats also love these robots and they would try to play with them as John Boyega says: &ldquo;My cat is always trying to catch BB-8 in my house, I like to wind him up with this toy&rdquo;.</p>

  <h4 class="section">The use of robots in Star Wars movies</h4>

  <p>During the past few years, Hollywood changed the way they produced visual effects (VFX). Puppets and robots were substituted by chroma and computer designs. When J.J. Abrams faced the Star Wars VFX, he was convinced to go back and use the puppets again. Even though there are still digital characters, like Snoke or Maz.</p>

  <p>You will appreciate this is in Jaku, that planet has a lot of creatures. It really feels that all of them are completely real. The starships are also similar to the ones in the old movies because they were created the same way. Digital creations are just visual support but not the center of visual effects as happens in films nowadays.</p>

  <blockquote>
  <p>&ldquo;In the first Star Wars movies you felt that you could touch every character, I wanted the same in the Force Awakens&rdquo; J.J. Abrams.</p>
  </blockquote>

  <p>Another good example was the scene when Finn turns on the Dejarik holochess board by accident, this game was shown in &quot;A New Hope&quot; and returns again in this movie created with a technique called stop motion. This is more difficult because you can create that game using computers, faster and with better results, but with less reality. J.J. decided to give us the same view as in &ldquo;A New Hope&rdquo; creating the holochess with the same method, using toys and picture by picture.</p>

  <p>Furthermore, BB-8 is the definitive example that shows that this movie is made to give us a trip to the past. &ldquo;It was very important to make BB-8 as real as possible&rdquo; J.J. Abrams, and he succeeded. BB-8 is completely real. We saw him in the London premiere, rolling through the red carpet as a part of the cast. In the filming, BB-8 was there with the actors, running with them, being a part of the scenes and making the playing easier for the actors. They didn&rsquo;t need to imagine him. Check out this video to meet how he got on with their colleagues.</p>

  <div data-oembed-url="https://youtu.be/RqSOo5reNO8">
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/RqSOo5reNO8?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>

  <p>You can find this article in Spanish at <a href="http://www.septimacaja.com/conoce-al-bb8-por-dentro-y-por-fuera/">www.laseptimacaja.com</a></p>


title: Why math is so important in everyone's life
slug: why-math-is-so-important-in-everyones-life
pub_date: 2016-01-23
keywords: math; science; decision process
authors: Miguel González-Fierro
meta_description:
  Why math is so important in everyones life. It's the language of science and it allows to take logical decisions

abstract:
  Most people hate math. However we are force to study mathematics since we are very young. There is a reason for that. Math is the base of the scientific thought and the language of science. It allows to express the behavior of our environment in a logical manner, independently of what our senses perceives or what our mind desires.     

content:
  <h4 class="section">What is math</h4>

  <p>Math is the language of science. It is a combination of symbols and numbers that not many people understand and only a few master. Like any other language, it allows us to talk about past phenomenons, describe present situations and predict future events.</p>

  <p>We have 4000 years of <a href="https://en.wikipedia.org/wiki/History_of_mathematics" target="_blank">math history</a>. During all these years we have created really extraordinary things thanks to math like the pyramids, the Empire State, the International Space Station and the dishwasher (question 1: can somebody live without a dishwasher? question 2: is that a life?).</p>

  <h4 class="section">A mathematical World</h4>

  <p>Mathematics is the elementary tool to take logical decisions. It is based on what&nbsp;is called <strong>mathematical models</strong>. A model allows describing the true behavior of a phenomenon under certain conditions. A famous example is Einstein&#39;s equation <span class="math-tex">$E=mc^2$</span>, that relates the energy <span class="math-tex">$E$</span> of a mass <span class="math-tex">$m$</span> in a proportional way with the light speed <span class="math-tex">$c$</span>. This simple formula means a lot of things. One of them is that an average human body holds the energy of around 30 hydrogen bombs. That could be dangerous if you know how to trigger it.</p>

  <p>Our <a href="https://miguelgfierro.com/blog/2015/what-color-is-this-dress-the-dressgate-explained/" target="_blank">minds can trick us</a> making us believe that we are seeing something that is not real. It took us 3500 years since the beginning of math to realise that the Earth spins around the Sun. In the words of Isaac Asimov:</p>

  <blockquote>
  <p>I believe in evidence. I believe in observation, measurement, and reasoning, confirmed by independent observers. I&#39;ll believe anything, no matter how wild and ridiculous, if there is evidence for it.</p>
  </blockquote>

  <p>Check out this video of <a href="https://twitter.com/neiltyson">Neil deGrasse Tyson</a>, <a href="https://twitter.com/BillNye">Bill Nye</a>, and <a href="https://twitter.com/bgreene">Brian Green</a> about math.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=bBfkAuenQJo">
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/bBfkAuenQJo?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>


title: Is it Possible for a Robot to Have Emotions?
slug: is-it-possible-for-a-robot-to-have-emotions
pub_date: 2016-02-09
keywords: robot; artificial intelligence; emotions
authors: Miguel González-Fierro
meta_description:
  Is it possible for a robot to have emotions. This article analyzes the science behind the lasts advances in artificial intelligence and emotions for robots

abstract:
  A robot is a machine whose main purpose is to help us. In order to accomplish that, a robot needs to have a hight level of intelligence, it has to be skilful enough to be able to interact with us and it has to be autonomous. Artificial Intelligence is a field that has made amazing advances since the appearance of Deep Learning. However, is it possible for a robot to have real emotions? And maybe more important, should a robot have emotions?    

content:
  <h4 class="section">The Emotion Machine</h4>

  <p>A few days ago one of the most eminent roboticists pasted away. Professor Marvin Minsky was a pioneer. He was the cofounder of MIT Artificial Intelligence Laboratory (<a href="https://www.csail.mit.edu/">CSAIL</a>).&nbsp; CSAIL and its members have played a key role in the computer revolution. The Lab&rsquo;s researchers have been key movers in developments like time-sharing, massively parallel computers, public-key encryption, the mass commercialization of robots, and much of the technology underlying the Artificial Intelligence (AI), robotics, Internet and the World Wide Web.</p>

  <p>Prof. Minsky was the inspiration of many young researchers. I was one of them. Part of my <a href="https://miguelgfierro.com/blog/2014/a-humanoid-robot-phd-thesis-explained-to-non-scientists/">PhD thesis</a> is based on their view of how to create a real AI. He suggested that the way to create a machine that imitates human behavior is not by constructing a unified compact theory of AI, like physicists constructed during the XIX and XX century.&nbsp; These last two centuries were very successful for Physics. Scientists discovered Electromagnetism in just four equations or Relativity in just one.</p>

  <p>On the contrary, he argues that its really unlikely to find a unified theory of AI, like psychologists and neuroscientists haven&#39;t found a unified theory of the human brain. He suggests that our brain contains resources that compete between each other to satisfy different goals at the same moment. He calls this <em>Ways to Think</em>. Here there is a <a href="http://web.media.mit.edu/~push/WaysToThink.pdf">publication</a> that summarizes his theory.</p>

  <p class="image-align-center"><img alt="Six level model of Mind of Minsky" height="400" src="/img/upload/2021/03/18/minsky.png" width="340" /></p>

  <p>Also, he published a book called <a href="http://www.amazon.es/The-Emotion-Machine-Commonsense-Intelligence/dp/0743276647">The Emotion Machine</a> that, in my personal view, is one of the most important books on Artificial Intelligence of all time. In this book, Minsky proposed a six-level model of the mind. He explained the different levels this way:</p>

  <p><strong>Instinctive Reactions</strong>: Joan hears a sound and turns her head. All animals are born equipped with &lsquo;instincts&rsquo; that help them to survive.</p>

  <p><strong>Learned Reactions</strong>: She sees a quickly oncoming car. Joan had to learn that conditions like this demand specific ways to react.</p>

  <p><strong>Deliberative Thinking</strong>: To decide what to say at the meeting, she considers several alternatives, and tries to decide which would be best.</p>

  <p><strong>Reflective Thinking: </strong>Joan reflects on what she has done. She reacts, not just to things in things in the world, but also to recent events in her brain.</p>

  <p><strong>Self-Reflective Thinking: </strong>Being &ldquo;uneasy about arriving late&rdquo; requires her to keep track of the plans that she&rsquo;s made for herself.</p>

  <p><strong>Self-Conscious Emotions: </strong>When asking what her friends think of her, she also asks how her actions concord with ideals she has set for herself.</p>

  <p>In his book, Minsky doesn&#39;t propose a way to transfer this model to a robot. But he gives us a hint, we could state the problem as a network of different <em>Ways To Think</em> (that would be the actions or behaviors the robot performs) that compete with each other depending on the relative importance inside the model (that would be like weights giving priorities to the actions). This structure is very similar to <a href="https://en.wikipedia.org/wiki/Artificial_neural_network">Artificial Neural Netwoks</a>.</p>

  <h4 class="section">The current state of Artificial Intelligence</h4>

  <p>We are very far from making robots with emotions following Minsky&#39;s model or any other. Certainly we have made amazing advances thanks to Deep Learning. Right now a robot can surpass human performance in <a href="http://fortune.com/2015/03/17/google-facenet-artificial-intelligence/">face recognition</a>, <a href="http://microsoft-news.com/microsoft-research-surpasses-human-level-performance-on-imagenet-classification-dataset/">image recognition</a> or <a href="http://www.wired.com/2016/01/in-a-huge-breakthrough-googles-ai-beats-a-top-player-at-the-game-of-go/">playing the game of Go</a>.</p>

  <p>It is really remarkable that we surpassed human performance even though we know for sure that we do not behave that way. In Deep Learning, we train a network with millions or billions of examples, but a human does not need that many examples to learn something. In fact, we are very efficient and need very few examples to learn anything.</p>

  <p>The reason is that the human brain is really good at generalizing concepts and making relationships between ideas. This is something no robot is able to accomplish (right now). Therefore, this is a great challenge for AI: how to generalize ideas as the human brain does.</p>

  <p>So far we have robots like <a href="https://www.aldebaran.com/en/cool-robots/pepper">Pepper</a> that can identify emotions and act in consequence. In fact, I did a couple of years ago an <a href="https://miguelgfierro.com/docs/bueno2013facial.pdf">algorithm</a> for the humanoid HOAP-3 that perceives sadness of happiness in a person and reacts accordingly. But these are not real emotions.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=dVhte6e7bn0&amp;list=UUQvJe9CLvqMI0yav_kbfVaw&amp;index=16">
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/dVhte6e7bn0?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>

  <p>To be honest we are really far from making robots intelligent enough to have emotions or a high level of intelligence.</p>

  <p>Lately, there has been an intense debate about whether&nbsp;we should create intelligent machines. People like Elon Musk or Stephen Hawking created an <a href="http://futureoflife.org/ai-open-letter/">open letter</a> proposing to invest more in AI, having in mind that it could be dangerous if we misuse it. This letter was signed by thousands of scientists including myself.</p>

  <p>The truth is that it is a problem that we will have far in the future. In the words of one of the top Deep Learning experts, <a href="https://www.quora.com/Is-AI-an-existential-threat-to-humanity-2?no_redirect=1">Andrew Ng</a>: &quot;Worrying about evil superintelligence today is like worrying about overpopulation on Mars&quot;.</p>


title: The growth of Artificial Intelligence in the new economy
slug: the-growth-of-artificial-intelligence-in-the-new-economy
pub_date: 2016-03-06
keywords: growth; artificial intelligence; new markets
authors: Miguel González-Fierro
meta_description:
  The growth of Artificial Intelligence market. New trends in artificial intelligence startups and science related companies

abstract:
  There is an increasing interest for Artificial Intelligence (AI). AI is no longer something you can see on science fiction movies, it's real. It's affecting markets like finance, marketing, e-commerce and many other industries. Big technical corporations such as Google, Facebook or Microsoft are investing millions of dollars on AI and they are hiring some of the most important scientists on the field. The 21st century is the time of AI. 

content:
  <h4 class="section">Artificial Intelligence as the Origin of the New Economy</h4>

  <p>Artificial Intelligence (AI) is the field of robotics that aims to provide a high level of intelligence to machines. The term was coined in 1955 by <a href="https://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29">John McCarthy</a> as the <em>science and engineering of making intelligent machines</em>.</p>

  <p>There have been huge advances in the field since then. Some examples are <a href="http://www.ibm.com/smarterplanet/us/en/ibmwatson/">IBM Watson</a>, an AI famous for being the first machine to beat a human in the contest Jeopardy. <a href="http://www.apple.com/ios/siri/">Siri</a>, the personal assistant of Apple&#39;s iPhone. Or <a href="http://arxiv.org/abs/1503.03832">FaceNet</a>, Google&#39;s computer vision system that was able to beat the human accuracy in&nbsp;face recognition.</p>

  <p>Even though these are well-known examples of AI, the field is becoming essential in many industries. In finance, many companies are starting to use AI algorithms to predict financial projections or changes in the stock market. In medicine, deep learning is used to detect cancer or research new medications. In marketing, machine learning is used to cluster those buyers that can be convinced before making a personalized promotion. The capabilities of smart machines help to enhance human experience and expertise. AI allows examining huge sets of data, finding patterns to get the maximum outcome and saving us time.</p>

  <p>Therefore, we could reach a point where people working in finance, marketing, medicine or other industries change how they work completely. Instead of relying on personal expertise in finance, marketing or medicine, they will need to learn how to code and develop AI algorithms, as people had to learn to use a computer 30 years ago. Coding will become a basic tool to do any kind of job.</p>

  <h4 class="section">The Growth of AI</h4>

  <p>All these changes are starting to happen, and big corporations are trying to be first movers. Google bought <a href="https://deepmind.com/">DeepMind</a>, one of the most advanced deep learning companies. They also hired <a href="http://www.cs.toronto.edu/~hinton/">Geoffrey Hinton</a> and <a href="http://www.kurzweilai.net/ray-kurzweil-biography">Ray Kurzweil</a>, probably the two most important scientist on AI right now. Facebook hired <a href="http://yann.lecun.com/">Yann LeCun</a> and Baidu <a href="http://www.andrewng.org/">Andrew Ng</a>, and all of them plus Microsoft, Twitter and Yahoo have bought many AI startups.</p>

  <p>There is no doubt that AI is going to change everything. I believe it is really exciting to be living these amazing changes.</p>


title: Lessons learned about marketing while building a startup
slug: lessons-learned-about-marketing-while-building-a-startup
pub_date: 2016-04-15
keywords: marketing; startups
authors: Miguel González-Fierro
meta_description:
  Lessons learned about marketing while creating a startup. You have to create a story framed in the wordview of your customer

abstract:
  Everything is marketing in a business. Your web page is marketing; your deals are marketing; your conferences are marketing and your tweets are marketing. Many tech startups don't pay attention to it because they are too busy programming the product. However, if you don't communicate, you don't sell. A great marketer is able to frame a story into the world view of the customer. At the end of the day, to do marketing is just to tell a great story.

content:
  <h4 class="section">A New Meaning of Marketing</h4>

  <p>Before the Internet era, it was really difficult for customers to share their view of a specific product. Using word of mouth, a customer could reach a small number of relatives and friends.</p>

  <p>Now things have dramatically changed. We live in a connected world. We are social animals and love to share experiences and stories. That is why Facebook is such a great product. Nowadays, marketing is completely about sharing stories.</p>

  <h5 class="subsection">Everyone Has Their Own World View</h5>

  <p>All of us have different beliefs, opinions, views of the world or as I wrote in a previous post, different <a href="https://miguelgfierro.com/blog/2016/is-it-possible-for-a-robot-to-have-emotions/">Ways to Think</a>. Some of them are commonly accepted. Like home cooking is better or natural food is healthier.</p>

  <p>Besides, we don&#39;t like to change our world views and therefore, we don&#39;t like people that try to make us change them. There is a scientific reason behind this. Generally speaking, we learn in two ways: <a href="https://miguelgfierro.com/blog/2014/a-humanoid-robot-phd-thesis-explained-to-non-scientists/">imitation and innovation</a>. We acquire knowledge by imitation when looking or listening to others. On the contrary, we obtain knowledge by innovation when we alone create something new.</p>

  <p>Our brain has evolved to be very efficient and fast when doing comparisons and generalizations. So our main way to learn is by imitation. It is not a coincidence that we start our lives attending a school to learn how the world works, instead of trying to guess it by ourselves.</p>

  <p>Furthermore, we spend less energy when imitating, so genetically we prefer it since energy is the currency of the Universe. Everything, from human beings to animals to plants, is designed to spend as less energy as possible. So it is not a good idea to try to market something that does not fit in the world view of your customer.</p>

  <h5 class="subsection">Decisions Are Sentimental</h5>

  <p>Our decisions are sentimental and our justification is logical. That is why Coca-Cola sells happiness and not its alleged benefits. They say <a href="http://www.coca-cola.com/global/glp.html">taste the feeling</a>. If a car is used to transfer people from one place to another, it would be logical to choose any car, however you care. It&#39;s not the same to drive a Ferrari than a Toyota. Even though I&#39;m really happy with my Toyota Yaris, it&#39;s small, cheap and doesn&#39;t break too much.</p>

  <p>The following video explains quite well how great leaders are able to inspire people and make us feel good when buying their product.</p>

  <div data-oembed-url="https://www.ted.com/talks/simon_sinek_how_great_leaders_inspire_action?language=en">
  <div>
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://embed-ssl.ted.com/talks/simon_sinek_how_great_leaders_inspire_action" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>
  </div>

  <p>Marketing therefore should be focused on creating stories of a product that fit our world view and make us feel good.</p>

  <h4 class="section">How to Create Great Stories</h4>

  <p>As Seth Godin writes in their blog, a <a href="http://sethgodin.typepad.com/seths_blog/2006/04/ode_how_to_tell.html">great story</a> needs several components. I will just state those which I think are the most important:</p>

  <p><strong>A great story makes you feel good</strong>. We make decisions based on our senses and we all like stories that make us feel good and special. One of the greatest stories I&#39;ve ever heard is&nbsp;the speech Steve Jobs gave at Stanford. He was able to connect with everybody and make us believe in the impossible because all of us have felt rejected some time in our life.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=UF8uR6Z6KLc">
  <div>
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;"><iframe allowfullscreen="true" frameborder="0" mozallowfullscreen="true" src="https://www.youtube.com/embed/UF8uR6Z6KLc?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;" webkitallowfullscreen="true"></iframe></div>
  </div>
  </div>

  <p><strong>A great story agrees with people&#39;s world view</strong>. It is very difficult and time consuming to change people&#39;s minds. A good marketer should be able to detect the groups that share similar thoughts and values and speak to them in their own language.</p>

  <p><strong>A great story is authentic</strong>. If you are a cheater, people will know. If you are a lier, people will know. The only way to succeed is to be honest and live your story. Everything in your company has to be consistent with the story you create.</p>

  <h5 class="subsection">Experience with a Real Customer</h5>

  <p>When I was trying to sell my company&#39;s <a href="https://miguelgfierro.com/blog/2013/the-best-image-recognition-system-for-fashion/">visual recommendation system</a>, nobody was doing something like that. Fashion e-commerce recommendation systems used only user data and didn&#39;t pay attention to the visual part of the product.</p>

  <p>Our first client was a big corporation and I was able to sell the product because I created a great story that agreed with their view of the fashion e-commerce market. It makes sense to think that the appearance of a garment is a very important component when somebody wants a recommendation.</p>

  <p>Furthermore, I never lied in terms of product performance. I could have told them that the product was perfect with an accuracy of almost 100% like many people do. But I was fair. I told them that the product was great but not perfect, and explained to them how we could improve it. They were really supportive.</p>

  <p>Finally, I was able to create a feeling that we were creating a good thing for the customer. Not because I said it, but because I really believed that we were doing something that could benefit the customer. In the end, the experience was amazing.</p>

  <p>The conclusion was that I didn&#39;t convince them to buy my visual recommender. I told them a story that was framed in their world view, so they convinced themselves that the product made sense and was beneficial for their users.</p>

  <p>Many of the ideas of this post are taken from several books that I strongly recommend reading. <a href="http://www.amazon.com/All-Marketers-Are-Liars-Works/dp/1591845335">All marketers are liars</a> by Seth Godin, <a href="http://www.amazon.com/Rework-Jason-Fried/dp/0307463745/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1460720225&amp;sr=1-1&amp;keywords=rework">Rework</a> by Jason Fried and David Heinemeier Hansson and <a href="http://www.amazon.com/Contagious-Things-Catch-Jonah-Berger/dp/1451686579/ref=tmm_hrd_swatch_0?_encoding=UTF8&amp;qid=&amp;sr=">Contagious</a> by Jonah Berger.</p>


title: A Gentle Introduction to the Basics of Machine Learning
slug: a-gentle-introduction-to-the-basics-of-machine-learning
pub_date: 2016-06-05
keywords: machine learning; introduction; artificial intelligence
authors: Miguel González-Fierro
meta_description:
  Introduction to Machine Learning for non-technical people. What is a model, what is machine learning, what is optimization and other subjects of AI.

abstract:
  Machine Learning is one of the most important technologies nowadays. It is the key element that allows a computer to learn. It is in fact a subfield of Artificial Intelligence (AI). Right now AI is affecting all industries, from finance to medicine, from aerospace to e-commerce. All technological giants such as Microsoft, Google, Amazon, etc. are investing large amounts of money in the area. This post intends to explain the main concepts of Machine Learning to the general public.

content:
  <h4 class="section">What is math</h4>

  <p>Before starting to address the subject of Machine Learning, it is essential to understand first what is mathematics and <a href="https://miguelgfierro.com/blog/2016/why-math-is-so-important-in-everyones-life/" target="_blank">why it is&nbsp;so important</a>. Math is the language of science. It allows scientist and engineers to express the Universe and the phenomenons that happen inside it.</p>

  <p>Like any language, it has tenses: past, present and future, so we can explain what happened in the past, we can describe what is happening in the present, and we can predict what will happen in the future. The most useful tense in math is the future, i.e. the prediction of events.</p>

  <p>We are very interested in predicting the future, or knowing how a system will evolve over time starting from an initial state. We can predict the future trajectory of a meteorite to know if it will hit the Earth (so we can call Bruce Willis) or we can predict the sales of a product in Amazon (so we can make Jeff Bezzos happy). Anyhow, predicting is important. and Machine Learning is a really good way of predicting things.</p>

  <p>In order to play with math, we need numbers and variables (which are just letters that represent different values). These numbers and variables create the most important mathematical resource to talk about the Universe, the model. A model is just an equation that represents a concept or event in the mathematical language. Some famous models are <span class="math-tex">$x^2+y^2=r^2$</span>, which means a circle of radius <span class="math-tex">$r$</span>; <span class="math-tex">$F=ma$</span>, also known as Newton&#39;s Second Law of Motion, it states that the force,&nbsp;<span class="math-tex">$F $</span>, is proportional to the acceleration,&nbsp;<span class="math-tex">$a$</span>, in a quantity called mass, <span class="math-tex">$m$</span>; or the famous Einstein equation <span class="math-tex">$E=mc^2$</span>, which states that all mass, <span class="math-tex">$m$</span>, has an amount of energy,&nbsp;<span class="math-tex">$E$</span>, proportional to the square of the speed of light,&nbsp;<span class="math-tex">$c$</span>.</p>

  <p>There are two kinds of models, analytical models, like the ones previously mentioned and learned models. Until the computer era, most scientists used analytical models, mainly because in order to develop learned models it is necessary to compute many operations. Other significant difference between analytical and learned models is that, usually, analytical models are derived using a mathematical demonstration, which is a set of steps that reach a final equation. On the contrary, learned models are obtained via a process called training or optimization, and need many examples of inputs-outputs pairs to obtain the equation. For this reason, analytical models tend to be compact and beautiful equations, while learned models tend to have hundreds of parameters, generating very complex and large equations.</p>

  <h4 class="section">What is Machine Learning</h4>

  <p>Machine Learning is a technique that allows obtaining learned models to generate predictions. It has a huge advantage in comparison with analytic models, you don&#39;t need to derive a formula, therefore you don&#39;t really need to have a deep understanding of math.</p>

  <p>The only thing you need to have is a group of input and output pairs. The model is just the relationship between inputs and outputs.</p>

  <p class="image-align-center"><img alt="Machine Learning optimization process" height="158" src="/img/upload/2021/03/18/ml.png" width="320" /></p>

  <p>In the image, the inputs correspond to the points <span class="math-tex">$(x,y)$</span>, the outputs are the color red and blue, meaning that the inputs are divided into two different classes, and the model is the line that divides both classes. This specific problem is called classification.</p>

  <p>The model we obtained follow this equation, <span class="math-tex">$y=wx+b$</span>, where <span class="math-tex">$w$</span>, is the slope, and <span class="math-tex">$b$</span> is the bias, they are both numbers. The equation could be something like: <span class="math-tex">$y=-1.3x+1.6$</span></p>

  <p>Once we have the model, we can make predictions. For example, given a new input point <span class="math-tex">$(x,y)=(0.2,0.3)$</span>, what would be the output? If the new point is below the line, it will belong to the output blue, otherwise, it will be red. We can also have a multi-class classification problem, as shown in the picture.</p>

  <h4 class="section">The concept of optimization</h4>

  <p>The last key concept to understand is optimization, which in the machine learning nomenclature is called training.</p>

  <p>To explain the concept of optimization let&#39;s imagine a football player taking a penalty like in the next image. The player hits the ball with the intention that it follows a trajectory that ends up in goal, but many times the ball doesn&#39;t follow the trajectory the player desired. So there are two trajectories, the desired one and the actual one.</p>

  <p class="image-align-center"><img alt="Football player taking a penalty" height="227" src="/img/upload/2021/03/18/cristiano_small.png" width="340" /></p>

  <p>Optimization is the process of tuning the parameters of the model to make the desired and the actual output as similar as possible. The parameters of the model, in the case of the previous equation, are <span class="math-tex">$w$</span> and <span class="math-tex">$b$</span>. The difference between the desired and actual output is called the error. Therefore, optimization is equivalent to minimize the error.</p>

  <p>The training process of a machine learning algorithm is the optimization of the parameter&#39;s model so the desired output (which is the output we know from the data), and the actual output (which is the output predicted by the model equation) are as similar as possible. This process is simulated in the first image, when the line is moving. Initially the line doesn&#39;t divide the classes very well, there is a high error. Later, as the parameters change, the line divides the classes perfectly, reaching a minimal error.</p>

  <p>There are many ways to train a machine learning model, such as <a href="https://en.wikipedia.org/wiki/Gradient_descent">gradient descent</a> or <a href="https://en.wikipedia.org/wiki/Genetic_algorithm">genetic algorithms</a>, and there are many different&nbsp; algorithms, such as <a href="https://en.wikipedia.org/wiki/Support_vector_machine">support vector machines</a>, <a href="https://en.wikipedia.org/wiki/Artificial_neural_network">neural networks</a> or <a href="https://en.wikipedia.org/wiki/Random_forest">random forests</a>. But they all follow the same basic principles addressed in this post. All this compose the big world of <a href="https://en.wikipedia.org/wiki/List_of_machine_learning_concepts">machine learning algorithms</a>.</p>

  <p>&nbsp;</p>


title: How human intelligence works and why that makes us racists
slug: how-human-intelligence-works-and-why-that-makes-us-racists
pub_date: 2016-06-25
keywords: intelligence; human behavior; imitation; innovation
authors: Miguel González-Fierro
meta_description:
  How human intelligence works and why that makes us racists. Our learning process is based on imitation and innovation.

abstract:
  Have you ever stopped to think how people can be so stupid? Lately, it looks like the world is going crazy. More and more people are supporting radical views. But this is not new, our history is full of atrocities that can be summarized in one simple reason: hatred of the different. The bad news is that our intelligence is optimized to detect differences. The bigger the difference, the higher the effort our brain makes. And many people don't like efforts.

content:
  <h4 class="section">Human stupidity</h4>

  <p>We are so stupid. If you don&#39;t trust me please switch on your TV and see the news. You can also read a history book. As Douglas Adams said in his book <a href="https://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy">The Hitch-hiker Guide to the Galaxy</a>: &quot;Many [human beings] were increasingly of the opinion that they&rsquo;d all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move and that no one should ever have left the oceans.&quot;</p>

  <p>We all humans tend to share the same ideas, depending on the culture and the time in history. A few centuries ago people were really worried about their honor. Now it is not that important, this has changed. If you had said to a man from the fifteenth century that honor is not important, he would have thought that you are a coward or bad in some sense. This behavior, the hatred of the different, has been always the same. And it is still the same nowadays. In North Europe and North America, fascists movements are growing and it is happening the same with communists movements in South Europe and South America.&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;</p>

  <p>This hatred of the different has been studied by many philosophers, psychologists and other scientists. Many of them agree that human beings are like sheep. The sheep is probably the most stupid animal in nature. If a sheep starts to move, all the rest follows. If all sheep are seated and one gets up, all of them get up. I really recommend you to go to the countryside and observe their behavior, it&#39;s really hilarious.</p>

  <p class="image-align-center"><img alt="Idiot sheep" height="250" src="/img/upload/2021/03/18/sheep.jpg" width="250" /></p>

  <h4 class="section">How human learning works</h4>

  <p>Generally speaking, we have two ways of learning, <a href="https://miguelgfierro.com/blog/2014/a-humanoid-robot-phd-thesis-explained-to-non-scientists/" target="_blank">imitation and innovation</a>. We imitate when we acquire knowledge from others. We innovate when we generate knowledge by ourselves.</p>

  <p>It turns out that the most common way of learning is imitation. It is how children learn in their first years. It is how we acquire knowledge when we are in school or University. And it is also the main learning method during our careers. Imitation is so common in human behavior that a scientist <a href="https://www.amazon.co.uk/Social-Learning-Psychological-Perspectives-Neuroscience/dp/0805801049">suggested</a> changing the name of our species from <em>hommo sapiens</em>, which means &quot;man who thinks&quot; to <em>homo imitans</em>, which means &quot;man who imitates&quot;.&nbsp;</p>

  <p>Imitation is also very common among animals. But a <a href="http://rstb.royalsocietypublishing.org/content/364/1528/2417.short">recent study</a> showed that apes are more suitable to imitate while children show more tendency to over-imitate, in the sense that children make an attempt to improve the learnt skills. Innovation is therefore an essential part of human behavior.&nbsp;</p>

  <p>There is a biological reason that explains why we tend to imitate rather than innovate. Imitation costs us less energy than innovation. Energy is the money of the Universe and nobody wants to spend their money.</p>

  <h4 class="section">Generalization</h4>

  <p>One of the main features that make us more intelligent than animals and machines is our ability to generalize. In fact, generalization is the only obstacle that <a href="http://www.wsj.com/articles/whats-next-for-artificial-intelligence-1465827619">Artificial Intelligence</a> needs to achieve in order to surpass human intelligence.</p>

  <p>We don&#39;t fully understand how the human brain works, but we have some ideas. We know that we create <em>representations</em> of our environment. These representations are flexible models of things together with their relationships.</p>

  <p>Let&#39;s put as an example of the concept of a table. In our minds, a table can have many different shapes and colors. It can be used to place objects over it or to have lunch. All of us are able to identify any table without a doubt, even if we have never seen a particular one. This is because we have a flexible concept of what a table is.</p>

  <p>This leads us to a very important feature of our intelligence, our ability to understand differences between representations. And we can identify them really fast. As an example let&#39;s say that somebody removes the computer from our room. We will be able to notice it instantaneously. What is really happening inside our heads is that we compare our representation of the room with what we currently see. But we don&#39;t analyze the room object by object, we just perceive that the computer is gone.</p>

  <p>Therefore, we have evolved to be able to store little information of the representations, in a very flexible way. And at the same time, we are able to understand the differences between these representations very quickly. This is what makes us more intelligent than any animal or machine. But we have to pay a price for having our superior intelligence. We have to pay in energy.</p>

  <h4 class="section">The hatred of the different</h4>

  <p>Every time somebody tells you something that is not what you think, you have to spend energy. And that is why it pisses you off. It is cheaper to agree than to disagree.</p>

  <p>That is why so many people tend to racism (here I use the word racism in a general way, in the sense of hating the different) because people are stupid and don&#39;t want to make an effort to accept the different. Imitation is easier than innovation. Imitation implies doing the same as other people say. Innovation implies making an effort to think different. There is a reason why there are so few innovators in this world and there is a reason why those innovators are rejected by the majority. The reason is energy.</p>

  <p>To be honest, I don&#39;t know the solution to this. Maybe one possibility is scientific thought. Scientists reject imitation by default. We only accept what can be proved and confirmed by evidence. But maybe it is not the <a href="http://thrish.org/lab-meetings/lets-not-be-pompous-scientists" target="_blank">best solution</a>.</p>

  <p>Maybe it is time for all of us to admit that to some degree we are intolerant to what other people think and that we are not as smart as we think we are. Maybe it is time to deeply analyze our believes and start innovating instead of imitating. If we do that I&#39;m sure that the radicalisms that we are experiencing will go down.</p>


title: When to use Deep Learning in a Data Science Problem
slug: when-to-use-deep-learning-in-a-data-science-problem
pub_date: 2016-08-10
keywords: deep learning; big data; data science
authors: Miguel González-Fierro
meta_description:
  How deep learning is impacting Big Data and Data Science and companies analytics. When to use Deep Learning.

abstract:
  Deep Learning has been around since 2006 and has produced some of most exciting advances in Machine Learning. However, it is not widely used in the industry by Data Scientists yet. In this post we will discuss this business opportunity and when Deep Learning can be used in a Data Science problem. 

content:
  <h4 class="section">Data Science</h4>

  <p>We could divide a Data Science project&nbsp;into three big phases: data managing, model training and analysis. Data managing has to do with cleaning the data, engineering features and managing databases. Model training requires Machine Learning to create a model of the data. Finally, there has to be an analysis of the results, showing the predictions of the model in an understandable way to the customer, usually performed via reports or dashboards.</p>

  <p>Regarding Machine Learning, people use different algorithms depending on the problem. In the industry, probably the most used algorithm in Data Science is Decision Trees. Curiously, until 2006, the most popular Machine Learning algorithm in the scientific community was&nbsp;Support Vector Machines. But 2012&nbsp;brought one of the most successful <a href="https://papers.nips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf" target="_blank">breakthroughs</a> in Artificial Intelligence: Deep Learning, improving previous performances by more than 20%. Since then, a lot of researchers turned to Deep Neural Networks. However, it doesn&rsquo;t happen the same in the industry. Data Scientists keep using Decision Trees or Logistic Regression in their day to day problems.</p>

  <h4 class="section">When to use Deep Learning</h4>

  <p>Here some of the key use cases:</p>

  <ul>
  	<li>Computer vision: many difficult object identification problems can be solved using Convolutional Neural Networks.</li>
  	<li>Natural Language Processing: Recurrent Neural Networks, specifically LSTM, are the current state of the art in this area.</li>
  	<li>Time series forecasting: problems such as predictive maintenance and financial forecasting can be solved with Deep Learning.</li>
  	<li>Problems with big datasets: Deep Learning is especially strong when the training set is in the order of millions or more.</li>
  	<li>When you have access to GPUs: the same algorithm in a GPU can be 1000 times faster.</li>
  	<li>When you don&rsquo;t need to look into the intermediate process: Neural Networks are black boxes, only the input and the output is understandable.</li>
  </ul>

  <p>There is a big business opportunity around Deep Learning and it will come to Data Science very soon. Furthermore, there is a wide suite of open-source libraries: <a href="https://github.com/Microsoft/CNTK">CNTK</a> from Microsoft, <a href="https://github.com/tensorflow/tensorflow">TensorFlow</a> from Google, <a href="https://github.com/fchollet/keras">Keras</a>, <a href="https://github.com/pfnet/chainer">Chainer</a>, <a href="https://github.com/Theano/Theano">Theano</a>, and <a href="https://github.com/dmlc/mxnet">MXNet</a>.</p>


title: A Gentle Introduction to Convolutional Neural Networks
slug: a-gentle-introduction-to-convolutional-neural-networks
pub_date: 2016-09-30
keywords: convolutional neural networks; cnn; deep learning; artificial intelligence
authors: Miguel González-Fierro
meta_description:
  A gentle introduction to convolutional neural networks (CNN). Why deep learning is a success in Artificial Intelligence and examples of code in mxnet

abstract:
  Convolutional Neural Networks (CNN) are one of the key components in the success of Deep Learning and the new Artificial Intelligence revolution. They are specially advantageous in tasks such as object detection, scene understanding and, recently, natural language processing. In this post I will explain what are CNN, what is the intuition behind them and provide an example of its performance in character recognition.

content:
  <h4 class="section">Why Deep Learning</h4>

  <p>Deep learning is the key technology that is revolutionizing AI. For the first time in history, a computer is able to surpass human intelligence in some tasks that were very difficult to solve before. These tasks are related to <a href="https://miguelgfierro.com/blog/2016/how-human-intelligence-works-and-why-that-makes-us-racists/">generalization</a>, which is one of the most advanced human intelligence features and one of our main differences with animals.</p>

  <p>One recent example is object recognition. In 2015 a Convolutional Neural Network (CNN) designed by Microsoft, named <a href="https://arxiv.org/abs/1502.01852">ResNet</a>, was the first system to surpass the human performance&nbsp;level in the computer vision competition <a href="http://image-net.org/">ImageNet</a>. In this competition, the system has to correctly identify an object among&nbsp;1000 categories. ResNet, a CNN composed of 152 layers, was able to achieve a top 5 error of 4.94%, slightly better than a trained human. Since then, other architectures have achieved better results.</p>

  <p>Another recent achievement of CNN was the system <a href="https://deepmind.com/research/alphago/">AlphaGo</a>, designed by DeepMind (Google). It became the first computer program to defeat a professional player in the game of Go, a strategy game similar to chess but much more difficult.&nbsp;</p>

  <p>Deep learning can be applied to many problems: image understanding, natural language processing, risk detection, recommendation system, financial forecasting and <a href="https://miguelgfierro.com/blog/2016/when-to-use-deep-learning-in-a-data-science-problem/">many more</a>. However, current CNNs needs millions of examples to train and lots of computational power to run. The curious thing is that we were able to surpass parts of human intelligence without imitating human intelligence. Humans&nbsp;don&#39;t need millions of examples to recognize an object in an image. Nevertheless, deep learning&nbsp;is so promising and attracts so much interest for one simple reason: it is the best bet we currently have to solve <a href="http://www.nature.com/nature/journal/v521/n7553/full/nature14539.html">artificial intelligence</a>.&nbsp;</p>

  <h4 class="section">What is a CNN</h4>

  <p>CNN are a&nbsp;key resource in deep learning. They are based on a mathematical operation called <a href="https://render.githubusercontent.com/view/ipynb?commit=fb4b1584ddedc7b1cea09b51e181dcd34a734299&amp;enc_url=68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f686f617068756d616e6f69642f736369626c6f675f737570706f72742f666234623135383464646564633762316365613039623531653138316463643334613733343239392f415f47656e746c655f496e74726f64756374696f6e5f746f5f434e4e2f496e74726f5f434e4e2e6970796e62&amp;nwo=hoaphumanoid%2Fsciblog_support&amp;path=A_Gentle_Introduction_to_CNN%2FIntro_CNN.ipynb&amp;repository_id=69788507#Convolution">convolution</a>. A convolution is just a multiplication of an input image (which is a matrix) times a kernel (which is another matrix). This operation generates a different image as it can be shown next, where a kernel called Sobel has been applied over the Y axis. The output image enhances the borders in the Y axis (normally, in computer vision, the X axis corresponds to the height and the Y axis to the width).</p>

  <p class="image-align-center"><img alt="Sobel filter" height="162" src="/img/upload/2021/03/18/lenna_sobely.png" width="340" /></p>

  <p>Therefore, the key advantage of convolutions is that they produce new images, related to the original one, that enhance different areas of the input. They are featuarizers, automatic feature generators. And that is the key concept that makes deep learning so powerful.</p>

  <p>A CNN is a <a href="https://en.wikipedia.org/wiki/Artificial_neural_network">neural network</a> with many hidden layers that use convolutions to generate features hierarchically. The first layer or input layer convolves the input image to another set of images, usually called feature maps, generating a different representation of the input. The second layer, or first hidden layer, convolves the first feature maps to another set of feature maps, which are representations of the first hidden layer, and so on until we reach the output layer. Finally, we obtain a hierarchical structure where each layer contains images that are representations of the previous ones.&nbsp;</p>

  <h4 class="section">Character recognition</h4>

  <p>Let&#39;s see an example of how a CNN can recognize handwriting characters. <a href="http://yann.lecun.com/exdb/mnist/">MNIST</a> dataset contains a training set of 60,000 examples and a test set of 10,000 examples of handwriting characters. It is one of the most famous datasets of character recognition and was very popular in the 2000s.</p>

  <p class="image-align-center"><img alt="MNIST" height="57" src="/img/upload/2021/03/18/mnist.png" width="340" /></p>

  <p>In 1998, Prof. Yann LeCun, now the head of Facebook Research, published a <a href="http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf">CNN</a> that achieved a 99% accuracy in the task of character recognition using MNIST dataset. He named the architecture LeNet. LeNet architecture uses convolutions and pooling operations to increase performance. For many years, LeNet was the most accurate algorithm for character recognition and supposed a great advance in deep neural networks, long before the appearance of GPUs and CUDA.</p>

  <p>As can be seen in the following image, LeNet has several groups of hidden layers. The original image&nbsp;is first transformed using convolutions into&nbsp;<span class="math-tex">$c_1$</span> that has 20 feature maps. These feature maps are the hierarchical representations that we were talking about before. Next, there is a pooling operation,&nbsp;<span class="math-tex">$p_1$</span>, this operation produces a dimensionality reduction, to decrease the number of parameters to optimize. Afterwards, there is another group of convolution and pooling,&nbsp;<span class="math-tex">$c_2$</span> and&nbsp;<span class="math-tex">$p_2$</span>. Here the number of feature maps is 50. Finally, there are two fully connected layers,&nbsp;<span class="math-tex">$fc_1$</span>, that has 500 units and&nbsp;<span class="math-tex">$fc_2$</span> that has 10. A fully connected layer is a layer with all the units connected to each other. It is usually added at the end of the network. The second fully connected has 10 units corresponding to the 10 outputs of MNIST dataset, from 0 to 9.&nbsp;</p>

  <p class="image-align-center"><img alt="LeNet architecture" height="94" src="/img/upload/2021/03/18/lenet_qYn0ohF.png" width="340" /></p>

  <p>If you are into coding, I created a jupyter notebook with a tutorial on <a href="https://github.com/hoaphumanoid/sciblog_support/blob/master/A_Gentle_Introduction_to_CNN/Intro_CNN.ipynb" target="_blank">how to train CNN</a>. It is written in python and uses <a href="http://opencv.org/">OpenCV</a> and <a href="https://github.com/dmlc/mxnet">MXNet</a>&nbsp;libraries. It explains how to create simple convolutions and how to train the LeNet architecture on MNIST dataset.</p>

  <p>If you want to go deeper in knowing how CNN work, check out this video of my colleague Brandon Rohrer from Microsoft.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=FmpDIaiMIeA">
  <div>
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" frameborder="0" src="https://www.youtube.com/embed/FmpDIaiMIeA?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>
  </div>

  <p>&nbsp;</p>

  <p>&nbsp;</p>


title: How to Develop a Data Science Project using the Lean Startup Method
slug: how-to-develop-a-data-science-project-using-the-lean-startup-method
meta_description: How to create a Data Science project using the Lean Startup method.
pub_date: 2016-11-27
keywords: data science; lean startup; football; visualization
authors: Miguel González-Fierro
abstract:
  Lean Startup has been a breakthrough during the last years in the entrepreneurial landscape. But this movement is not only a methodology that can be used to create successful businesses, it can also be applied to other domains like Data Science. In this post, I will discuss how to apply the Lean Startup method to a Data Science project. As an example, I created a project that visualizes all football matches that took place in the UEFA Champions League since 1955.

content:
  <h4 class="section">What is Lean Startup</h4>

  <p><a href="http://theleanstartup.com/">Lean Startup</a> is a methodology for developing successful business and products by eliminating uncertainty via process iteration and customer development. The term was coined by <a href="https://en.wikipedia.org/wiki/Eric_Ries">Eric Ries</a>, and comes from the idea of <a href="https://en.wikipedia.org/wiki/Lean_manufacturing">Lean Manufacturing</a> developed by Toyota, whose objective is to minimize the <em>waste </em>in their car production chain.&nbsp;</p>

  <p class="image-align-center"><img alt="" height="313" src="/img/upload/2021/03/18/lean_startup.png" width="300" /></p>

  <p>Lean Startup method is based on a&nbsp;cycle of three steps. The first step is <em>Learn</em>, where you propose your ideas, set out your hypothesis and decide to pivot or persevere in your strategy. The next step is <em>Build</em>, where you turn your ideas into products or make an iteration to further develop your product. Finally, the next step is to <em>Measure</em>, where you validate your hypothesis and see how your audience responds. This is an iterative process whose main focus is to develop products or business that people actually want and minimize the expenditure of time, money and effort while managing uncertainty. This method can be applied when developing a Data Science project.</p>

  <h4 class="section">A Lean Data Science Process</h4>

  <p>There are several methodologies to develop data science projects. At Microsoft, we developed and intensively use the <a href="https://azure.microsoft.com/en-us/documentation/learning-paths/data-science-process/">Team Data Science Process</a> (TDSP). This methodology enables us to effectively implement projects while collaborating between teams inside and outside the company.&nbsp;</p>

  <p>The TDSP is composed of a data science lifecycle definition, a standard project structure, publicly available in <a href="https://github.com/Azure/Azure-TDSP-Utilities">GitHub</a>, a shared and distributed analytics infrastructure, provided by <a href="https://azure.microsoft.com/en-gb/">Azure</a>&nbsp;and productivity tools and utilities for data scientists. A full description of the method is explained in this <a href="https://blogs.technet.microsoft.com/machinelearning/2016/10/11/introducing-the-team-data-science-process-from-microsoft/">post</a>.</p>

  <p>In some situations, when starting a Data Science project, we have a clear view of the business case, access to all customer data and a clear roadmap of what the customer wants. In that situation, the Lean Startup process has little value. However, when there is uncertainty when the customer doesn&#39;t know what he wants or when we don&#39;t know if a product is going to be successful, then the Lean Startup method can prove its benefit.</p>

  <p>Implementing the Lean Startup method in the TDSP is easy, we can use all the tools TDSP proposes. In the Lean Startup method, the priority is to reduce (or eliminate) the uncertainty to understand what the customer really wants. So following the 3 steps of the Lean Startup method, first we have to set the hypothesis. The next step is to build a Minimum Viable Product (MVP), using the TDSP. The MVP has two important features, it helps us to validate the hypothesis or ideas we proposed and it is a complete, end to end product with the minimum number of features. The final step is to show the MVP to the customer and measure its impact.</p>

  <p>This process should be ideally completed in days or weeks. The sooner we show the MVP to the customer, the sooner we get feedback, reduce the uncertainty and can iterate in our project. Next, I&#39;m going to show a practical example of how to create a data science project using the Lean Startup method.</p>

  <h4 class="section">Visualization of Champions Football Matches since 1955</h4>

  <p>My lean project starts with a hypothesis: &quot;my blog readers would like to see a post about visualization&quot;. In the <a href="https://github.com/miguelgfierro/sciblog_support/blob/e620abfd24a42fd5d1abcca49ea815e10516792d/Visualization_in_Data_Science/visualization_datashader.ipynb" target="_blank">initial commits</a>, I focused on visualization using the library <a href="https://github.com/bokeh/datashader">datashader</a>. This was my first MVP, a notebook where I showed two visualization examples. The next step is to get metrics from my audience. That&#39;s difficult because sometimes the audience just doesn&#39;t reply and it is not always straightforward to attract their attention. Luckily, I have geek friends and relatives that are interested (or have been forced) to give me feedback. After some thoughts, I realized that speaking only about visualization has not much value.</p>

  <p>So I decided to set a second hypothesis: &quot;my blog readers would like to read about how to apply lean startup to data science and see an end to end example related to visualization&quot;. The <a href="http://github.com/miguelgfierro/sciblog_support/blob/master/Visualization_of_Football_Matches/visualization_football.md" target="_blank">project</a> will consist of a visualization of all the football matches in the Champions League since 1955 where each match will be represented as a line between the coordinates of each team&#39;s stadium.</p>

  <p>The first step is to gather the data. I was able to get a dataset of all football <a href="https://github.com/jalapic/engsoccerdata/blob/master/data-raw/champs.csv">matches</a> and the <a href="http://opisthokonta.net/?cat=34">stadium</a> coordinates from Spanish, English, French and German clubs. There was obviously not enough teams, there were important teams from Italy, Portugal, Netherlands and others that were <a href="https://en.wikipedia.org/wiki/List_of_European_Cup_and_UEFA_Champions_League_finals">winners</a> in several years. However, they are enough to create a second MVP.</p>

  <p>The next iteration (third MVP) needed all the teams that actually participated in the competition. The <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Visualization_of_Football_Matches/stadiums_champions_filtered.csv">data</a> was gathered from wikidata and filtered afterwards. Finally, I ended up with this visualization.</p>

  <p class="image-align-center"><img alt="" height="302" src="/img/upload/2021/03/18/map3.jpg" width="320" /></p>

  <p>Each MVP has been published on different webs&nbsp;such as Reddit, HackerNews or StumbleUpon to get feedback. Developing the project using Lean Startup helped me to realize that people are interested in learning about a new methodology rather than learning about visualization in general. I was able to detect problems in the whole pipeline at the very beginning since I had an end to end version of the project very soon. Finally, this post is my fourth MVP, so I&#39;m waiting for your comments.&nbsp;</p>


title: Learnings from AI & Machine Learning Conference NIPS 2016
slug: learnings-from-ai-machine-learning-conference-nips-2016
meta_description: Highlights from NIPS. What are the new advances in artificial intelligence and machine learning
pub_date: 2016-12-22
keywords: nips; machine learning; artificial intelligence
authors: Andreas Argyriou, Miguel González-Fierro
abstract:
  NIPS conference has become one of the most important events for machine learning research. With a record participation of more than 6000 attendees this year, the field consolidates its importance in both academia and industry. In this post we will discuss the highlights of this year's NIPS conference.

content:
  <h5 class="subsection">Top AI Conference</h5>

  <p>This year, the Thirtieth Annual Conference on Neural Information Processing Systems (NIPS)&nbsp;took place&nbsp;in Barcelona, Spain. More than 6000 people attended, which was a record for NIPS.</p>

  <p>The reason&nbsp;for this success and visibility could be related to the impressive results that deep learning has achieved in the last decade. Another reason could be the growing interest from the industry, especially big technology companies such as Microsoft, Google or Facebook, that are actively contributing to machine learning research. In a conference of such magnitude, it is really easy to miss some interesting talks, but a great feature of NIPS is that you can access in advance the papers in the <a href="http://papers.nips.cc/book/advances-in-neural-information-processing-systems-29-2016">pre-proceedings</a>. There is a thread in Reddit with a <a href="https://www.reddit.com/r/MachineLearning/comments/5hwqeb/project_all_code_implementations_for_nips_2016/" style="text-decoration:none;"><u>compilation</u></a> of some papers and code.</p>

  <p>Among the talks, maybe the most discussed one in social networks was LeCun&rsquo;s keynote. He presented The Cake. The cake represents the current knowledge of artificial intelligence (AI). In LeCun&rsquo;s words: &ldquo;if intelligence was a cake, unsupervised learning would be the cake, supervised learning would be the icing on the cake, and reinforcement learning would be the cherry on the cake. We know how to make the icing and the cherry, but not the cake&rdquo;. So that&#39;s the major obstacle, at least that we currently know of, to achieving strong AI.</p>

  <p>Maybe one of the most impressive demos in the conference was the presentation of SpotMini from Boston Dynamics. They showed how the robot&nbsp;can walk, run, jump and grasp an object. Here is&nbsp;the video:</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=SvEs_hhb0sI">
  <div>
  <div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" frameborder="0" src="https://www.youtube.com/embed/SvEs_hhb0sI?wmode=transparent&amp;rel=0&amp;autohide=1&amp;showinfo=0&amp;enablejsapi=1" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>
  </div>

  <p><a href="http://rocketai.org/" style="text-decoration:none;"><u>RocketAI</u></a> was the Easter Egg of the conference. Sandberg of Oxford University presented to the press the patent-pending &ldquo;Temporally Recurrent Optimal Learning&rdquo; (TROL) algorithm, while Goodfellow from OpenAI <a href="https://twitter.com/goodfellow_ian/status/807721903976841216" style="text-decoration:none;"><u>tweeted</u></a> that the company had the best &ldquo;Jacobian-Optimized Kernel Expansion&rdquo; (JOKE). Many people believed the <a href="https://www.reddit.com/r/MachineLearning/comments/5hmdty/discussion_rocketai/" style="text-decoration:none;"><u>joke</u></a>. It looks that they received emails from <a href="https://medium.com/the-mission/rocket-ai-2016s-most-notorious-ai-launch-and-the-problem-with-ai-hype-d7908013f8c9#.nrgilj3bk" style="text-decoration:none;"><u>5 VC funds</u></a> showing interest in investing in the fictitious company.</p>

  <h5 class="subsection">Generative Adversarial Networks</h5>

  <p>One way forward is being able to model the world, and for that Generative Adversarial Networks (GANs) are becoming more and more popular. GANs, proposed in 2014 by <a href="https://arxiv.org/abs/1406.2661"><u>Goodfellow et al</u></a>, are neural networks that allow for generating data via adversarial training. GANs therefore should internally learn a good model representation of what an image or a sentence is. On the first day of the conference, he gave a nice <a href="https://arxiv.org/abs/1701.00160">tutorial</a> explaining in detail GANs.</p>

  <p>Regarding new ideas about GANs that appeared&nbsp;in NIPS, there was a workshop on <a href="https://sites.google.com/site/nips2016adversarial/" style="text-decoration:none;"><u>adversarial training</u></a> and many papers using this methodology. It is interesting how researchers from OpenAI implemented an algorithm for Imitation Learning (<a href="https://arxiv.org/abs/1606.03476" style="text-decoration:none;"><u>paper</u></a> and <a href="https://github.com/openai/imitation" style="text-decoration:none;"><u>code</u></a>). Other examples were multi-class classifications (<a href="https://www.cs.uic.edu/~rfathony/pdf/fathony2016adversarial.pdf" style="text-decoration:none;"><u>paper</u></a> and <a href="https://github.com/rizalzaf/adversarial-multiclass" style="text-decoration:none;"><u>code</u></a>) and&nbsp;text to image synthesis (<a href="https://arxiv.org/pdf/1612.03242v1.pdf" style="text-decoration:none;"><u>paper</u></a>).&nbsp;Xi Chen presented <a href="https://arxiv.org/abs/1606.03657" style="text-decoration:none;"><u>InfoGAN</u></a>, which is a new type of generative adversarial network (GAN),&nbsp;based on mutual information. In some experiments it&nbsp;generates more structured and interpretable image representations; for example, latent variables capture characteristics similar to pose, lighting, rotation, width etc. Soumith Chintala from Facebook Research talked about various <a href="http://github.com/soumith/ganhacks">practical tricks and heuristics </a>for training GANs, e.g. stability issues, avoiding sparse gradients (such as ReLU), noisy labels etc. Sebastian Nowozin from Microsoft Research talked about recent work on generalizing GANs using f-divergences. He also explains this in his blog <a href="http://www.nowozin.net/sebastian/blog/nips-2016-generative-adversarial-training-workshop-talk.html" style="text-decoration:none;"><u>post</u></a>. This generalization allows for replacing the Jensen-Shannon divergence (used in the original GAN) with anyone from the family of f-divergences.&nbsp;He also showed a connection with convex duality and proposed a new gradient-based algorithm.</p>

  <h5 class="subsection">Deep Learning Methodologies</h5>

  <p>Another especially interesting area is Deep Reinforcement Learning (DRL), a&nbsp;field in which <a href="https://people.eecs.berkeley.edu/~pabbeel/" style="text-decoration:none;"><u>Pieter Abbeel</u></a> and <a href="http://incompleteideas.net/sutton/" style="text-decoration:none;"><u>Richard Sutton</u></a> have made important contributions. Abbeel gave a very comprehensive <a href="http://people.eecs.berkeley.edu/~pabbeel/nips-tutorial-policy-optimization-Schulman-Abbeel.pdf">tutorial</a> about policy optimization in DRL.</p>

  <p>Richard Sutton <a href="https://arxiv.org/abs/1612.02879" style="text-decoration:none;"><u>presented</u></a> &quot;Learning representations by stochastic gradient descent in cross-validation error&rdquo;. He proposed to optimize the cross-validation error instead of the training error by replacing backpropagation with a new algorithm called <em>crossprop</em>, within an online learning setting. Some experiments indicate that <em>crossprop </em>may have advantages&nbsp;in non-stationary settings.</p>

  <p>Another interesting contribution came from Killian Weinberger, who presented a new training method called Stochastic Depth (<a href="https://arxiv.org/abs/1603.09382" style="text-decoration:none;"><u>paper</u></a> and <a href="https://github.com/yueatsprograms/Stochastic_Depth" style="text-decoration:none;"><u>code</u></a>) for convolutional networks. The idea is similar to dropout, but instead of dropping connections,&nbsp;they drop a random number of layers in each iteration. This trick reduces the training time substantially for networks with many layers. It also avoids overfitting in some cases by reducing overparameterization. For example, they obtained an improved test error on CIFAR-10 with 1200 layers. In the ImageNet dataset, they achieved a similar error rate on the same architecture when&nbsp;comparing stochastic depth with a constant depth, but&nbsp;in a shorter time.&nbsp;</p>

  <p>There were also interesting ideas in recurrent neural nets, like the <a href="https://arxiv.org/abs/1610.09513" style="text-decoration:none;"><u>Phased LSTM</u></a>. The authors added a new time gate to traditional LSTMs. With it, the computation time is reduced by an order of magnitude and the network is suitable for inputs with different sampling rates.</p>

  <h5 class="subsection"><strong>Intelligent Bots</strong></h5>

  <p>Gartner sees <a href="http://www.gartner.com/smarterwithgartner/the-abc-technologies-will-change-future-customer-experience/">Chatbots</a> as one of the most important technologies for the next years. They <a href="http://www.openmarket.com/blog/will-facebook-chat-bots-trustworthy/">predict</a> that by 2020, customers will manage 85% of their relationships with the enterprise without interacting with a human. Microsoft&#39;s CEO Satya Nadella is positioning the company to prevail in a future filled with <a href="http://knowledge.wharton.upenn.edu/article/rise-chatbots-time-embrace/">bots</a>. &ldquo;As an industry, we are on the cusp of a new frontier that pairs the power of natural human language with advanced machine intelligence&rdquo;. At NIPS, there was an&nbsp;interesting&nbsp;<a href="http://letsdiscussnips2016.weebly.com/">workshop</a> about chatbots.</p>

  <p><img alt="" height="214" src="/img/upload/2021/03/18/adopting-ai-chatbot-customer-employee-experience-e1568016643365-699x440.jpeg" width="340" /></p>

  <p>Helen Hastie talked about <a href="https://github.com/pmineiro/ldlmd2016/blob/master/NIPSDec2016H.Hastie.pdf" style="text-decoration:none;"><u>social chatbots</u></a>, which are finding more and more applications in business scenarios, as assistants, customer representatives, etc. There are several challenges in building good bots, an important one being how to evaluate their quality. There are extrinsic and intrinsic measures; for example, fulfilment of a task or a goal is extrinsic, fluency is intrinsic. Some can be assessed automatically, others by experts, <a href="https://www.mturk.com/mturk/welcome" style="text-decoration:none;"><u>Turkers</u></a> (not very trustworthy) or customers. Qualities that need to be measured may include engagement, flow, personalization, turn level, dialogue level, system-level (continuation, trust, &quot;personality&quot;). Another important point is the need to communicate a clear mental model to the user at the start, about how to interact with the bot.</p>

  <p>Julien Perez presented an <a href="https://github.com/pmineiro/ldlmd2016/blob/master/letsdiscuss-gmemn2n-julienperez.pdf" style="text-decoration:none;"><u>end-to-end dialog system</u></a> for text understanding and reasoning. He proposed a network architecture (gated memory network) that uses elements from highway networks and also related to residual networks. This network performs well on the Facebook bAbI tasks.</p>

  <p>Iulian Serban presented work on <a href="https://github.com/pmineiro/ldlmd2016/blob/master/IulianSerban_DialogueWorkshopPresentation_Final.pdf" style="text-decoration:none;"><u>generative DNNs</u></a> for dialogue systems that require state, policy and action. An example application is the Ubuntu task of helping users resolve technical problems. He described three generative models created for this problem: hierarchical recurrent encoder-decoder, multiresolution RNNs, latent variable recurrent encoder-decoders. Of these, the multiresolution RNNs performed better on the Ubuntu data.</p>

  <h5 class="subsection"><strong>Learning in High Dimensions with Structure</strong></h5>

  <p>Recently, there has been an interest in the theoretical study of properties of DNNs (such as the oral presentation &quot;<a href="https://nips.cc/Conferences/2016/Schedule?showEvent=7467">Deep Learning without Poor Local Minima</a>&quot;, or the AISTATS paper <a href="http://cims.nyu.edu/~achoroma/NonFlash/Papers/PAPER_AMMGY.pdf">connecting DNNs to spin glasses</a>). Along these lines, in this <a href="https://sites.google.com/site/structuredlearning16/schedule" style="text-decoration:none;"><u>workshop</u></a>, Rene Vidal presented theoretical results applicable to some frameworks for <a href="https://arxiv.org/pdf/1506.07540v1.pdf" style="text-decoration:none;"><u>matrix/tensor factorization</u></a> or deep learning (networks constructed from parallel subnetworks, with ReLU activation functions and max pooling). The implication is that if the number of subnetworks is large enough then local descent will reach a global minimizer. This motivates a &ldquo;meta-algorithm&rdquo; that performs local descent and keeps adding subnetworks until the criterion is satisfied.</p>

  <p>Guillaume Obozinski presented a broad view of many <a href="https://hal-enpc.archives-ouvertes.fr/hal-01412385" style="text-decoration:none;"><u>regularization methods</u></a> that are used to learn structured and sparse models. This view is based on a general form for combinatorial problems and the corresponding convex relaxations.</p>

  <h5 class="subsection" dir="ltr" style="text-align:justify"><strong>Learning with Tensors</strong></h5>

  <p>This <a href="http://tensor-learn.org/" style="text-decoration:none;"><u>workshop</u></a> also included theoretical contributions, some of them relevant to deep learning. Amnon Shashua presented recent work that uses tensor decompositions to study the properties of certain types of deep networks. In particular, he and collaborators have shown that convolutional networks with ReLU are universal with max-pooling but not with average pooling; that the depth efficiency is better with linear than rectified activation function;&nbsp;and why contiguous pooling may be appropriate for learning natural images.</p>

  <p>In another talk, Lek-Heng Lim introduced a new concept, related to tensor network states, which are tensors associated with graphs (used in condensed matter physics). The tensor network rank or G-rank is a generalization of the notion of rank of matrices. One advantage is that, unlike the standard rank of a tensor, this new type of rank is computable in polynomial time for acyclic graphs. This concept could be used in current applications of tensor approximations in machine learning.</p>


title: A Gentle Introduction to Text Classification and Sentiment Analysis
slug: a-gentle-introduction-to-text-classification-and-sentiment-analysis
pub_date: 2017-01-31
keywords: text classification; sentiment analysis; machine learning; artificial intelligence
authors: Miguel González-Fierro
meta_description:
  Introduction to Text Classification and Sentiment Analysis using Machine Learning and Artificial Intelligence.

abstract:
  The area of text classification has attracted a lot of interest from both the machine learning research community and the industry. One popular application of text classification is sentiment analysis, whose objective is to guess the positive or negative attitude of a user towards a topic given a sentence. In this post I will give an overview of how to apply machine learning techniques to text classification and sentiment analysis. 

content:
  <h4 class="section">Natural Language Processing</h4>

  <p>Natural Language Processing (NLP) is the area of machine learning that studies the generation and understanding of language, both in writing and speaking. Its main objective is to create machines able to understand and communicate with us in a natural way.</p>

  <p>Some subareas of NLP are machine translation, speech recognition, topic modeling,&nbsp;Q&amp;A, information retrieval, optical character recognition (OCR), text classification and sentiment analysis.&nbsp;Of all of them, machine translation is my favorite, it consists of automatic translation between different languages, like the <a href="https://en.wikipedia.org/wiki/List_of_races_and_species_in_The_Hitchhiker%27s_Guide_to_the_Galaxy#Babel_fish">Babel fish</a> in a Hitchhiker&#39;s Guide to the Galaxy. A technology like this will, hopefully, reduce the hate between people speaking different languages, but maybe&nbsp;I&#39;m a&nbsp;dreamer. Speech recognition has to do with recognizing&nbsp;spoken language. In this area, there&nbsp;was an important advance in October 2016, when&nbsp;<a href="http://blogs.microsoft.com/next/2016/10/18/historic-achievement-microsoft-researchers-reach-human-parity-conversational-speech-recognition">Microsoft Research</a> achieved human parity in conversational speech recognition. Topic modeling is used to extract the topics in a document and it is generally used&nbsp;in text mining to&nbsp;discover similarities&nbsp;between documents.&nbsp;Q&amp;A&nbsp;took a good deal&nbsp;of relevance thanks to IBM Watson and its <a href="http://www.bbc.co.uk/news/technology-12491688">victory in Jeopardy</a>. Now this area is extensively used by companies in their customer services. Information retrieval is at the core of one of the most profitable business in the world, Google. OCR&nbsp;has the objective to provide a machine with reading capabilities.&nbsp;</p>

  <h4 class="section">Text Classification</h4>

  <p>In this post, I will&nbsp;focus&nbsp;on text classification and sentiment analysis. Text classification, also called topic classification,&nbsp;is a methodology to categorize pieces of text into classes. It has a very interesting business&nbsp;application that some companies are&nbsp;taking advantage of. When a customer&nbsp;communicates with&nbsp;the company asking for a service or just&nbsp;for customer support, the system has to redirect the customer to the correct department (or even to the final solution). In that situation, a text classifier can save a lot of money.</p>

  <p>A very interesting business application of text classification is sentiment analysis. It is a method to automatically understand the perception of customers towards a product or service based on their comments. The input text is classified into positive, negative, and in some situations, neutral. It is extensively used by companies to track user behavior on Twitter. Sentiment analysis can strongly&nbsp;influence the marketing strategy of a company,&nbsp;improving the&nbsp;customer experience and defining the advertising roadmap.</p>

  <p>In this <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_NLP_with_fastText/Intro_to_NLP.ipynb">notebook</a>,&nbsp;I&nbsp;give a tutorial on how to quickly implement text classification in python using <a href="https://github.com/facebookresearch/fastText">fastText</a> library. Using <a href="https://drive.google.com/drive/folders/0Bz8a_Dbh9Qhbfll6bVpmNUtUcFdjYmF2SEpmZUZUcVNiMUw1TWN6RDV3a0JHT3kxLVhVR2M">DBPedia</a> dataset we can classify a sentence like the following:</p>

  <p><span style="font-size:11px"><span style="font-family:Courier New,Courier,monospace">Sentence:&nbsp; One of my favourite tennis players in the world is Rafa Nadal.<br />
  Label: 4; label name: Athlete; certainty: 0.904297</span></span></p>

  <p>As can be seen, the model classifies the sentence as Athlete with a certainty of 90.429%.</p>

  <h4 class="section">Word Featurization</h4>

  <p>Most text classification techniques use some kind of word featurization. It transforms the text into a&nbsp;numeric representation. This numeric representation allows&nbsp;machine learning algorithms to easily computing models using the words or characters as inputs. Two&nbsp;notable techniques are <a href="https://en.wikipedia.org/wiki/Bag-of-words_model">bag of words</a> and <a href="https://en.wikipedia.org/wiki/Word_embedding">word embedding</a>.</p>

  <p>Bag of words consists of computing the frequency of&nbsp;each word in the text as a histogram. Sometimes, instead of getting the frequency of single words,&nbsp;you can compute&nbsp;the&nbsp;method for pairs of words, often referred to as bi-grams, or triplets of words referred to as tri-grams. The&nbsp;general case is called n-grams. Once the text is mapped as a histogram, other techniques can be applied. One example is text comparison, the bag of words of two&nbsp;sentences can be computed and&nbsp;subsequently compared using a metric like quadratic difference or <a href="https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence">Kullback-Liebler</a> divergence. &nbsp;&nbsp;&nbsp;</p>

  <p>Word embeddings was an idea introduced by <a href="http://www.iro.umontreal.ca/~lisa/publications2/index.php/publications/show/64">Bengio in 2001</a>. Basically,&nbsp;the method&nbsp;maps each word to a high dimensional vector of perhaps 50 to&nbsp;300 dimensions. The algorithm learns simultaneously a distributed representation for each word along with a probability function for word sequences. Therefore the method can understand that the sentence &quot;the cat is playing with a toy&quot; and &quot;the cat is playing with an object&quot; are equivalent and have a high probability to be consistent. However, in the sentence &quot;the cat is flying with a toy&quot;, the method would produce a low probability. Of all word embedding algorithms, maybe the most popular is <a href="https://en.wikipedia.org/wiki/Word2vec">word2vec</a> created by <a href="https://arxiv.org/abs/1301.3781">Mikolov</a>.</p>

  <p>Another property of word embeddings is that&nbsp;we can compute the similarity between words, as we did in the <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_NLP_with_fastText/Intro_to_NLP.ipynb">notebook</a>&nbsp;(in the word representations section). In the multidimensional&nbsp;space, the difference between king and queen, 12.58,&nbsp;will be smaller than between king and woman, 20.16. Makes sense, right? At the same time, the difference between king and queen will be&nbsp;similar to the difference between man and woman, 11.27.</p>

  <p><img alt="" height="330" src="/img/upload/2021/03/18/tsne.png" width="340" /></p>

  <p>Finally, we can represent the words in a reduced dimensional space. For that, we&nbsp;used the&nbsp;<a href="http://jmlr.org/papers/volume9/vandermaaten08a/vandermaaten08a.pdf" target="_blank">t-SNE algorithm</a>. The results can be visualized in the section word space visualization of the <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_NLP_with_fastText/Intro_to_NLP.ipynb" target="_blank">notebook</a>. After the computation, we can see that the words bird and dove are clustered together, also sister and brother, and mother and father.</p>


title: The Sorcerer's Apprentice
slug: the-sorcerers-apprentice
meta_description: The sorcerer's apprentice
pub_date: 2017-03-04
keywords: sorcerer's apprentice; learning
authors: Miguel González-Fierro
abstract:
  The Sorcerer's Apprentice was a tale written by Goethe in 1797, popularized by Disney in the 1940 animated film Fantasia. In it, a young sorcerer wants to seize the power of his old master but realizes that he lacks the knowledge to control it. The story teaches us a lesson about the perils of a student thinking he has knowledge when he doesn't, however, when does an apprentice become a master? In this post we will address that question.

content:
  <p>The Sorcerer&#39;s Apprentice was a poem written by Goethe in 1797, this is the <a href="http://germanstories.vcu.edu/goethe/zauber_e3.html">translation from German</a>. In 1940, the tale was included in the Disney animated movie <a href="https://www.youtube.com/watch?v=Ait_Fs6UQhQ">Fantasia</a>.</p>

  <p class="image-align-center"><img alt="The Sorcerer's Apprentice delivering the magic hat" height="238" src="/img/upload/2021/03/18/sorcerer.jpg" width="340" /></p>

  <p>In the tale, there was a sorcerer who had an apprentice. The apprentice was very anxious to learn the secrets of his master. When he was told by his master to carry water to fill a cauldron, he stole the&nbsp;sorcerer&#39;s magic hat and enchanted a broom to carry the water for him. This worked at first, but soon the broom got out of control and flooded the room. The apprentice didn&#39;t know how to make it stop, so desperately he decided to hack the broom with an axe. Unfortunately, each of the splinters of the broom becomes a broom, and the apprentice&rsquo;s troubles intensified. Finally, the master appeared to fix the situation and asked the apprentice to return his magic hat.&nbsp;</p>

  <p>To me, the most important moment of the story is when Mickey returns the hat. This is the exact moment when he is acknowledging that he is an apprentice, not a master, that he is ignorant.&nbsp;</p>

  <p>The world is full of people that think they are masters, but that&#39;s an illusion.&nbsp;There are too many people claiming they know about a subject, but they are completely clueless. Too many people in a meeting trying to be the smartest guy in the room.</p>

  <p>In my view, there are two kinds of people: those who don&#39;t know and those who don&#39;t know they don&#39;t know. The moment you internalize that you are ignorant and mix that with a fervent curiosity, you start listening to other people and start learning. When I was young and was asked what I wanted to be when I grew up,&nbsp;I always answered that I wanted to be a wise man. To be honest, I don&#39;t know how to become a wise man, but I know that a good way to start is by not becoming a master, but being a lifelong apprentice. That&#39;s why on my Twitter I say that <a href="https://twitter.com/miguelgfierro/" target="_blank">I am a sorcerer&#39;s apprentice</a>.</p>


title: How to deploy an Image Classification API based on Deep Learning
slug: how-to-deploy-an-image-classification-api-based-on-deep-learning
pub_date: 2017-04-17
keywords: api; deep learning; deployment; image classification
authors: Ilia Karmanov and Miguel González-Fierro
meta_description:
  Introduction to image classification with deep learning and Convolutional Neural Networks CNNs using an API. Deployment of infrastructure in the cloud

abstract:
  Deep learning is notable for surpassing human level performance in image classification. In this post we will explain how to use a pretrained Convolutional Neural Network to classify images and how to deploy this classifier to the cloud through an API.

content:
  <p>This post comes with a python notebook where&nbsp;we explain all the steps you need to follow&nbsp;for <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Machine_Learning_API/Intro_to_Cloud_ML_with_Flask_and_CNTK.ipynb" target="_blank">deploying a deep neural network through an API to perform image classification</a>.</p>

  <h4 class="section">Deploying deep learning on the cloud</h4>

  <p>In a previous post, we saw how to train a <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/">Convolutional Neural Network</a>&nbsp;(CNN), now we are going to see how to create an API that classifies images in the cloud. The frameworks used in the solution are:</p>

  <ul>
  	<li><a href="https://github.com/Microsoft/CNTK/">CNTK</a>: Microsoft&#39;s Cognitive Toolkit is the deep learning library we used to compute the CNN model that identifies images.</li>
  	<li><a href="http://flask.pocoo.org/">Flask</a> is one of the most popular frameworks to develop APIs in python.</li>
  	<li><a href="http://cherrypy.org/">CherryPy</a> is a lightweight web framework for python. We use it as a web server to host the machine learning application.</li>
  </ul>

  <p>The main procedure is executed by a CNTK CNN. The network is a <a href="https://www.cntk.ai/Models/Caffe_Converted/ResNet152_ImageNet.model">pretrained ResNet with 152 layers</a>. The CNN was trained on <a href="http://www.image-net.org/">ImageNet dataset</a>, which contains 1.2 million images divided into 1000 different classes.</p>

  <p><img alt="" height="279" src="/img/upload/2021/03/18/the-representation-of-model-architecture-image-for-resnet-152-vgg-19-and-two-layered.png" width="300" /></p>

  <p>The CNN is accessible through the flask API, which provides an endpoint <span style="font-family:Courier New,Courier,monospace"><code>/api/v1/classify_image</code> </span>that can be called to classify an image. CherryPy is the server framework where the application is hosted. It also balances the load, in such a way that several concurrent queries can be executed. Externally, there is the client, which can be any desktop or mobile.&nbsp;It sends an image to the application&nbsp;for analysis and receives the response.</p>

  <p>If you want to understand the end to end process, take a look at this <strong><a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Machine_Learning_API/Intro_to_Cloud_ML_with_Flask_and_CNTK.ipynb" target="_blank">notebook</a></strong>.</p>


title: Laplace's Demon and the Scientific Method
slug: laplaces-demon-and-the-scientific-method
meta_description: Laplace's Demon and the Scientific Method.
pub_date: 2017-05-28
keywords: laplace demon; scientific method
authors: Miguel González-Fierro
abstract:
  In 1814, Laplace described an entity that would be able to calculate any future event if it knew the precise location and speed of every atom in the Universe, based on the principle of cause and effect. This will be known as Laplace's Demon. At that time, scientists believed that they could solve all the mysteries of the Universe. Decades later, with Heisenberg's uncertainty principle and other advances, that dream became to an end. 

content:
  <h4 class="section">The Dead of Laplace&#39;s Demon</h4>

  <p>Causal <a href="https://en.wikipedia.org/wiki/Determinism">determinism</a> is a philosophical theory that defends that events are bound by causality, which&nbsp;is generally known as cause and effect. Laplace&#39;s Demon is described as an intellect that would be able to know all past and future events if it knew the positions and velocities of all atoms in the Universe. The Demon would be able to embrace in a single formula the movement of the greatest bodies and those of the tiniest atom. For the Demon, nothing would be undetermined.</p>

  <p>Laplace&#39;s Demon was a symbol of the ultimate goal of science, the pursuit of truth. And at that time, scientists were confident that humanity will unveil all the secrets of the Universe, it was just a matter of time.</p>

  <p>The last years of the nineteenth century put an end to this confidence. The <a href="https://en.wikipedia.org/wiki/Second_law_of_thermodynamics">second law of thermodynamics</a> states that all natural processes are irreversible, in other words, the Universe tends to automatically degenerate into a more disordered state.</p>

  <p><span class="math-tex">$$dS \gt \frac{\partial Q}{T}$$</span></p>

  <p>This formula was the first blow to Laplace&#39;s Demon since it was based on the premise of reversibility in classical mechanics.&nbsp;But very soon another blow was presented by Heisenberg in 1927.</p>

  <p><span class="math-tex">$$\sigma_x \sigma_p \ge \frac{\hslash}{2}$$</span></p>

  <p>The <a href="https://en.wikipedia.org/wiki/Uncertainty_principle">Uncertainty Principle</a> states that is not possible to measure the position of an atom and its velocity with infinite precision. In other words, if we want to measure the position of an atom with high precision, we will have a high error in measuring its velocity. This simple formula might be the saddest achievement of human thought.&nbsp;In 1927, the humanity realized that we will never be able to know all the truth, the Universe has an intrinsic limitation to what we can observe.</p>

  <p>Not only that, Einstein&#39;s Relativity Theory discovered that time and space were not absolute, as it was believed since <a href="https://en.wikipedia.org/wiki/Aristotelian_physics">Aristotle</a>. This contributed to higher disbelief in science that still persist in our days. For some people, time and space being relative means that <em>everything </em>is relative, therefore there is no truth&nbsp;but&nbsp;views or opinions, each of them as valid as the others.&nbsp;&nbsp;</p>

  <h4 class="section">The Pursuit of Truth</h4>

  <p>It is paradoxical that the second law of thermodynamics, the uncertainty principle and the relativity theory created such social disbelief in science. The truth nowadays is either unattainable or unreal. Some politicians and journalists took advantage of this situation, if everybody has their own truth then it is easier to lie and manipulate people. Fake news or <em>alternative truths</em> are something that we see every day in our society.</p>

  <p>The pursuit of truth based on evidence is the ultimate goal of science. It is an innate desire of the human being to understand why events happen. From ancient Greeks until the modern era, human knowledge has grown to limits never imagined before. But how was this possible? The answer is the scientific method.</p>

  <h4 class="section">The Scientific Method</h4>

  <p>The <a href="https://blogs.scientificamerican.com/illusion-chasers/the-delusion-of-alternative-facts/">scientific method</a> is the methodology science uses to distinguish between what is true and what is not. A scientist proposes a theory with evidence that supports it. In a different lab, a rival scientist replicates the experiment, and the theory is verified based on independent calculations. This process is replicated across different labs and countries until the scientific community accepts the theory. That is how science can grow strong:</p>

  <blockquote>
  <p>&quot;If I have seen further than others, it is by standing on the shoulders of giants&quot;. Isaac Newton</p>
  </blockquote>

  <p>In the scientific method it is extremely difficult to accept a theory, it takes a tedious process of replication and verification, whereas it is extremely easy to refute. A single contradictory proof will dismantle the theory. If there is a single thing that the scientific method excels at, it is at disproving hypotheses.&nbsp;</p>

  <p>A great example is the theory of evolution that states that monkeys and humans have a common ancestor (which is not the same as saying that my great-great-great...grandfather was a monkey). The first evidence was the fossil record. The body and skeleton structures point to common ancestors. But maybe the fact that removed all reasonable&nbsp;doubt was genetics.&nbsp;</p>

  <p>Unlike other animals, humans are not able to synthesize vitamin C. This was discovered&nbsp;during the long sea voyages when sailors contracted scurvy, while horses, dogs or mice didn&#39;t. When scientist compared&nbsp;the genetic code of humans and other animals, they realized that there was a gene that prevented the&nbsp;production of vitamin C. This gene was found as well in other primates. The best explanation is that a mutation&nbsp;has&nbsp;occurred in a common ancestor of these species, and so all descendants are unable to synthesize the vitamin. &nbsp;</p>

  <p>Moreover, scientists identified that guinea pigs and fruit bats didn&#39;t synthesize vitamin C. These animals are from a completely different family tree, and when their genetic code were examined, scientists found that the mutations were different. This provided another evidence of the evolution theory because&nbsp;it would be highly unlikely that the same mutation would occur twice.</p>

  <p>To date, no single proof denying evolution has been found, while there is plenty of evidence that supports it. A single proof, independently evaluated, will make all scientists in the world deny&nbsp;evolution. That is how the scientific method works.</p>

  <p>Laplace&#39;s Demon is dead since it has been proven that science will never know all the&nbsp;secrets of the Universe. However, the scientific method is a strong methodology that allows us to distinguish between truth and falsehood and&nbsp;push human knowledge forward.&nbsp;</p>

  <p>This&nbsp;video of Neil deGrasse Tyson talks about the importance of the scientific thought.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=8MqTOEospfo">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/8MqTOEospfo?rel=0&amp;showinfo=0&amp;controls=2" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>


title: 10 Reasons Why You Should Be Using Git in Software Projects
slug: 10-reasons-why-you-should-be-using-git-in-software-projects
pub_date: 2017-06-25
keywords: git; github; software development; version control
authors: Miguel González-Fierro
meta_description:
  10 reasons why you should be using git in software projects. Version control system, team development

abstract:
  Git is a version control software that helps developers to easily and efficiently contribute to software projects. It is the engine that runs on GitHub, the top open-source software development platform. In this post, we analyze 10 reasons why you should be using it.

content:
  <p><a href="https://git-scm.com/">Git</a> is a distributed version control software that is used for a single developer or a group of developers to contribute to software projects. Its popularity grew thanks to the development of <a href="https://en.wikipedia.org/wiki/GitHub">GitHub</a>, founded in 2009 as a free cloud repository for open source projects. As of April 2017, GitHub reports having 57 million repositories, making it the largest host of source code in the world.</p>

  <p class="image-align-center"><img alt="in case of fire, git out" height="279" src="/img/upload/2021/03/18/git.jpg" width="300" /></p>

  <p>Believe it or not, git was created in 2005 by the same individual who created Linux, <a href="https://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a>.</p>

  <p>If you don&#39;t think that is a good reason to use git, here you have another ten.</p>

  <h4 class="section">1. Cloud repositories</h4>

  <p>As of 2017, there are still people developing code on their local machine. Do these people make backups in a USB? Do they share their code with coworkers via email or Whatsapp? Having your code in the cloud has many advantages, it is generally more secure, especially if it is hosted on GitHub where they have professional security. It is easier to work collaboratively, any team member can download the latest version of the repository from any machine. It is cheaper than a traditional server; in fact, GitHub allows to host open-source projects for free and BitBucket allows to do the same for private repos.</p>

  <h4 class="section">2. Distributed file system</h4>

  <p>Git is distributed, meaning that every local copy of the global repository is a fully working copy. In case there is a problem with the server and the global repository is corrupted or lost, any local copy can recreate the full history. This file system architecture is the opposite of centralized file systems like <a href="https://subversion.apache.org/">Subversion</a> (SVN), very popular before GitHub. In a centralized version control system, the global server contains all changes in the project and the local copies are just light versions of it. If the server goes down, you lose all the history.</p>

  <h4 class="section">3. Perfect to work with others</h4>

  <p>Git is designed for creating projects where many contributors develop software in parallel. Specifically, it has a very powerful way to resolve conflicts when two people are working on the same file. Its stability is much higher than SVN. Those who have used SVN knows what I&#39;m talking about.</p>

  <h4 class="section">4. Good documentation</h4>

  <p>Git has been around for many years now and it&#39;s really easy to find good documentation. I have my own <a href="https://github.com/miguelgfierro/codebase/wiki/Git-tutorial">tutorial</a>, where I explain the basics of git and add useful commands that I use from time to time.</p>

  <h4 class="section">5. Easy to use</h4>

  <p>Nobody can say git is difficult. To do the day-to-day work, you just need to manage these 8 commands: git clone, git status, git add, git commit, git push, git pull, git checkout and git branch. Their explanation can be found <a href="https://github.com/miguelgfierro/codebase/wiki/Git-tutorial">here</a>. With them you can download a repo, check its status, add files, send files to the server, retrieve the latest changes on the server and create <em>branches </em>to work in parallel.</p>

  <h4 class="section">6. Branches allows for simultaneous code versions</h4>

  <p>Branches are one of the best features of a version control software and are used to develop in parallel to the main repository. A branch is a fork of the main code to develop a new feature. When you create new functionality in the code, you should create a branch. Then you develop the functionality, test it and when it works perfectly, you can integrate it or <em>merge</em>&nbsp;it into the main branch (which is usually the <em>master </em>branch). When using branches, you can have simultaneous versions of the same code.</p>

  <h4 class="section">7. Encourages code reviews</h4>

  <p>Code reviews are a good practice that every developer team should follow. Git facilitates code reviews with an operation called pull request. A pull request is a merge operation between two branches, one of them is typically the master branch. The standard workflow is the following: a developer works in a branch coding a new feature, when the feature is finished a pull request is submitted. A different developer reviews the code of the pull request and suggests improvements. Once the improvements are made, the branch is merged into master, and thus a new feature is added to the project.</p>

  <h4 class="section">8. It&#39;s easy to revert your mistakes</h4>

  <p>Every time you send code to the server you make a commit. Every commit is referenced with a hash that uniquely identifies it, see this <a href="https://github.com/miguelgfierro/codebase/commit/023f558ddcd84799006cd7a8f2f8ef2f47b4de7a#diff-04c6e90faac2675aa89e2176d2eec7d8">example</a>. With git, it is super easy to revert to any past commit and fix a mistake.</p>

  <h4 class="section">9. It&#39;s the current de facto open-source umbrella</h4>

  <p>If you want to develop open-source code, the biggest repository is GitHub. Here you can find the <a href="https://github.com/search?q=stars:%3E1&amp;s=stars&amp;type=Repositories">most popular repositories</a> in Github, it includes bootstrap, react, d3, tensorflow, angular, etc.</p>

  <h4 class="section">10. Connectivity to cloud services</h4>

  <p>Git popularity generated the emergence of other services that complete the software development stack, sometimes called git hooks or git integrations. An interesting case is <a href="https://en.wikipedia.org/wiki/Continuous_integration">continuous integration</a> systems like <a href="https://travis-ci.org/">Travis</a>. These systems allow for automatic testing of a software solution. Another useful tool is <a href="https://waffle.io/">Waffle</a>. This system helps developers to plan and track a project linked directly with GitHub. Finally, another interesting tool is <a href="https://www.codacy.com">Codacy</a> that generates automatic code reviews.</p>

  <p>These are 10 reasons to use git, if you have more, please comment!</p>


title: Deep Learning for Entrepreneurs
slug: deep-learning-for-entrepreneurs
pub_date: 2017-09-30
keywords: deep learning; entrepreneurs; ai; business opportunity
authors: Miguel González-Fierro
meta_description:
  deep learning for cloud sales professionals and entrepreneurs, ai business opportunity and what use cases generate high revenue

abstract:
  AI is considered the biggest business opportunity in the new economy, that is expected to generate $15.7 trillion by 2030, according to PwC. Independently of the accuracy of this prediction (probably PwC didn't use machine learning to predict it), the opportunity is huge. In this post, I will discuss some business problems that can be solved with deep learning and how to monetize them.

content:
  <h4 class="section">The AI Opportunity</h4>

  <p>In our fast-changing economy, the biggest business opportunity is expected to be artificial intelligence (AI). According to a <a href="http://www.pwc.com/gx/en/issues/analytics/assets/pwc-ai-analysis-sizing-the-prize-report.pdf">recent report by PwC</a>, the revenue forecast due to AI by 2030 is $15.7 trillion, which equates to a growth of 14% of the global GPD. Out of the whole amount, $6.6 trillion would come from productivity gains and $9.1 trillion would come from a demand increase.</p>

  <p>The productivity gain would come from process automation procedures such as robotics, autonomous vehicles or automated intelligent services. It will also come from capabilities augmentation of the current workforce, such as decision-making support or business scenario simulations. Demand increase would come from higher quality products that will be more intelligent and better adapted to the specific customer needs.</p>

  <p>The AI revolution has been possible to a high extent due to the success of <a href="https://miguelgfierro.com/blog/2016/when-to-use-deep-learning-in-a-data-science-problem/">deep learning</a>. A key reason that makes deep learning attractive is that, generally, the more data you feed to the network, the better it performs. As you can imagine, it is not as simple as that, but it is true that this behavior does not appear in other machine learning algorithms. Thus, the performance of an algorithm then could be seen as a function of the amount of data. In a market where <a href="https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?htmlfid=WRL12345USEN">90% of the data has been created in the last two years</a> and where we will create 40x more by 2020, we can expect a performance improvement for this technology.</p>

  <p><img alt="" height="191" src="/img/upload/2021/03/18/ai_hitesh-choudhary-t1paibmtjim-unsplash.jpg" width="340" /></p>

  <h4 class="section">Customer needs</h4>

  <p>Now, what are the customer needs that AI could cover? It depends on the sector, so let&#39;s set some examples and discuss how I would address the problem (this does not mean that it is the best way to do it, but I just want to give an example of how the problem can be solved).</p>

  <p>Health care is one of the hottest sectors, where IBM and Google have made important investments. An interesting business case is data-driven diagnosis support that could lead to the early identification of diseases. One specific example could be support for lung cancer detection. Given scans of the lung like in this <a href="https://www.kaggle.com/c/data-science-bowl-2017">Kaggle competition</a>, a system using <a href="https://blogs.technet.microsoft.com/machinelearning/2017/02/17/quick-start-guide-to-the-data-science-bowl-lung-cancer-detection-challenge-using-deep-learning-microsoft-cognitive-toolkit-and-azure-gpu-vms/">transfer learning</a> with <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/">Convolutional Neural Networks</a> (CNN) could help a doctor to identify cancer. A different use case could be continuous AI-powered monitoring of a unique patient, trying to identify an anomalous state to prevent diseases. A solution to this problem could be using an autoencoder to learn the normal patient distribution status and then perform error reconstruction for detecting the anomaly.</p>

  <p>The automotive and transportation industry is another area where AI can have a big impact. Apart from computer vision systems for autonomous driving that is already being deployed, an interesting use case can be demand forecasting for ride-sharing fleets like <a href="https://www.car2go.com/US/en/">Car2go</a> or even taxi-like business like Uber. A way to solve this problem is to use an <a href="http://colah.github.io/posts/2015-08-Understanding-LSTMs/">LSTM</a> given temporal information of users. A different use case is to help insurance companies automatically manage and tag accidents. In a crash, the drivers can take pictures of the car state that could be automatically classified using transfer learning with CNNs.</p>

  <p>Financial services is a sector where AI could be transformative. Traditionally, this sector is not very innovative, but banks, investment firms, and insurance companies are starting to realize the huge business opportunity that AI poses and are investing heavily in Fintech. An interesting use case is automatic asset wealth management and prediction. This could be solved using <a href="https://deepmind.com/blog/deep-reinforcement-learning/">Reinforcement Learning</a> (RL) to make a network learn an optimal action sequence (or optimal policy, as it is called in the RL jargon). The other business case that is attracting a lot of attention lately is bots agents for customer management. We can use an LSTM together with a CNN for speech recognition and then a different CNN for recommendation.</p>

  <p>Other sectors are retail where a CNN generate features that are indexed and then retrieved for product recommendation; manufacturing where an LSTM can be used for predictive maintenance or energy where an LSTM could be used for demand forecasting.</p>

  <h4 class="section">How to monetize AI products</h4>

  <p>A big question mark for sales professionals is how AI can be monetized. Companies that sell infrastructure provide ready-to-use <a href="https://blogs.msdn.microsoft.com/uk_faculty_connection/2017/09/29/microsoft-deep-learning-virtual-machine/">virtual machines</a> with most machine learning and deep learning packages preinstalled. In contrast to Hadoop or Spark clusters that are traditionally up all time, virtual machines can be switch on and off, so the consumption is cyclical. A workflow can be like this: a user set up a machine, trains a model with one or several GPUs and then switch them off. An alternative to generating more consumption, and therefore revenue, can be set up a managed GPU cluster, for training, retraining and scoring (in this situation, <a href="https://kubernetes.io/">Kubernetes</a> is a great asset). In some cases, a customer doesn&#39;t only need training but also retaining. Retraining is key for avoiding a decrease in model performance.</p>

  <p>An extended business model in both corporations and startups is software as a service (SaaS), which in many cases is provided as an <a href="https://miguelgfierro.com/blog/2017/how-to-deploy-an-image-classification-api-based-on-deep-learning/">API</a>. If the target is B2C, the billing can be per query. For B2B, it is common to sell packages of maximum queries and other premium services like customer support. Alternative, SaaS can be sold as licenses, that way a company can give different levels of services to customers of different sizes.</p>

  <p>Finally, the traditional model of consultancy that VCs don&#39;t like (because it is not scalable), can be really interesting for B2B. Something that I learned when I was building a startup is that a successful business doesn&#39;t get distracted trying to master many areas at the same time, they focus. That&#39;s why many times they look externally for specialists in other fields.</p>

  <p>The impact of AI is global and will touch every industry. Those companies or products that are not able to adapt to the new economy, might be replaced by more efficient, optimized and intelligent ones. Be prepared, AI is coming!</p>


title: A Gentle Introduction to Transfer Learning for Image Classification
slug: a-gentle-introduction-to-transfer-learning-for-image-classification
pub_date: 2017-12-18
keywords: transfer learning; finetuning; image classification; deep learning
authors: Miguel González-Fierro
meta_description:
  Introduction to transfer learning. When to use finetuning or freezing in Image Classification with deep learning

abstract:
  Transfer Learning is expected to be the next driver of Machine Learning commercial success in Image Classification. Reutilizing deep networks is impacting both research and industry. In this post, we explain what is Transfer Learning and when to use its different strategies. The post is accompanied by code in PyTorch performing experiments in several datasets.

content:
  <h4 class="section">Why Transfer Learning?</h4>

  <p>According to <a href="http://www.andrewng.org/">Andrew Ng</a>, cofounder of Coursera and Adjunct Professor at Stanford, Transfer Learning will be the next driver of Machine Learning commercial success.</p>

  <p><a href="http://cs231n.github.io/transfer-learning/">Transfer Learning</a> is a Machine Learning technique that allows to reutilize an already trained convolutional neural network (CNN) on a specific dataset and adapt it, or transfer it, to a different dataset. The reason you want to reuse a trained CNN is because they take a long time to train. For example, training <a href="https://arxiv.org/abs/1512.03385">ResNet18</a> for 30 epochs in 4 NVIDIA K80 GPU <a href="https://blogs.technet.microsoft.com/machinelearning/2016/11/15/imagenet-deep-neural-network-training-using-microsoft-r-server-and-azure-gpu-vms/">took us 3 days</a>. Training ResNet152 for 120 epochs in the same GPUs takes 4 months.</p>

  <p>In this post we used <a href="https://github.com/pytorch/pytorch/">PyTorch</a> to perform transfer learning in different datasets. If you are in a hurry, just go directly to the <strong><a href="https://github.com/miguelgfierro/sciblog_support/blob/master/A_Gentle_Introduction_to_Transfer_Learning/Intro_Transfer_Learning.ipynb" target="_blank">code</a></strong>.</p>

  <h4 class="section">Transfer Learning Strategies</h4>

  <p>In general, there are two strategies to perform transfer learning, and I have not seen a final agreement on the naming. <em>Finetuning</em>, which consists of using the pretrained network on the base dataset and train all layers in the target dataset, and <em>freeze and train</em>, which consists of leaving all but the last layer frozen (the weights are not updated) and train the last layer. It is also possible to freeze the first couple of layers and finetune the rest, this is due to some evidence indicating that the first layers of the CNN contains <a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf">texture filters and color blobs</a>.</p>

  <p><img alt="Finetuning vs freezing" height="191" src="/img/upload/2021/03/18/finetunning_vs_freezing.svg" width="340" /></p>

  <p>However, in this work we are going to analyze the two&nbsp; extreme cases: training all layers and training only the last layer.</p>

  <p>The most common base dataset is <a href="http://image-net.org/">ImageNet</a>, which contains 1.2 million images with 1000 categories. These categories are divided in two big groups: animals and objects. The number of images per category is around 1000. Most deep learning libraries provide CNN models pretrained on ImageNet.</p>

  <p>In the image, we can see the two mentioned transfer learning strategies. Here we used a pretrained CNN on ImageNet and adapt it to classify Homer Simpson, using as the target dataset a subset of <a href="https://www.kaggle.com/alexattia/the-simpsons-characters-dataset">the Simpsons Dataset</a>. This subset contains 20 classes with between 300 and 1000 images per class.</p>

  <p>Then we can use <em>freeze and train</em>, as it is represented in the upper figure, and just train the last layer, or we can <em>finetune</em> all layers, as it is represented in the bottom figure.</p>

  <h4 class="section">Finetuning vs freezing</h4>

  <p>It is difficult to know in which cases one should just train the last layer or finetune the network. In (<a href="http://arxiv.org/abs/1411.1792">Yosinsky et. al., 2014</a>), the authors address the problem of quantifying the degree to which a particular CNN layer is general or specific in the context of the ImageNet dataset. They found that the transferability is negatively affected by splitting the network in the middle layers due to coadaptation of these layers. They reported that the transferability gap grows as the distance between tasks increases and finally, they found that initializing the network with transferred weights can improve generalization performance in comparison with training it from zero weights.</p>

  <p>As reported in this <a href="http://cs231n.github.io/transfer-learning/">tutorial of Karpathy</a>, these are some guidelines of the different scenarios when using transfer learning in a new dataset:</p>

  <ul>
  	<li>Small and similar images: When the target dataset is small in comparison with the base dataset and its images are similar, the recommendation is to freeze and train the last layer.</li>
  	<li>Large and similar images: In this case the recommendation is finetuning.</li>
  	<li>Small and different images: In this case the recommendation is freezing&nbsp;and train the last layer or some of the last layers.</li>
  	<li>Large and different images: In this case the recommendation is finetuning.</li>
  </ul>

  <p>In the experiments, we used a limited number of datasets with a small network, ResNet18, so it will be premature to generalize the findings to all datasets and networks. However, the findings may shed some light on the problem of when to use transfer learning. In the following table there is a summary of the results.</p>

  <p><img alt="Results of finetuning and freezing" height="134" src="/img/upload/2021/03/18/results_finetuning_freezing.png" width="340" /></p>

  <p>The first detail we observe is an accuracy degradation when training a gray scale dataset in comparison with its color scale counterpart. This is consistent with the observation of other authors that the more different the domain between the base dataset and the target dataset, the worse the transference.</p>

  <p>We see as well that for Simpsons and Caltech256 datasets there is a high degradation when freezing. The highest degradation can be appreciated in Simpson dataset, which can be due to the fact that the domains are quite different, while in ImageNet there are natural images, in Simpsons the images have mostly plain colors. In Caltech we observe firstly a low accuracy, apart from a high degradation when freezing. Maybe the reason is because for a dataset of a high number of classes, the number of images per class is small, in the order of a couple of houndreds.</p>

  <p>The domain of dogs vs cats dataset is the closest to ImageNet, in fact, ImageNet contains several breeds of dogs and cats. In this case, there is no much difference when finetuning or freezing.</p>

  <p>Finally, in the hymenoptera dataset, we see a small improvement in the color dataset when freezing. This can be because the domain is closer and the dataset is small. In the grayscale counterpart we don&#39;t see an improvement when freezing, probably due to the domain difference.</p>


title: Introduction to Recommendation Systems with Deep Autoencoders
slug: introduction-to-recommendation-systems-with-deep-autoencoders
meta_description: Recommendation system using deep learning and deep autoencoders and an API
pub_date: 2018-01-28
keywords: recommendation systems; deep autoencoders; deep learning
authors: Miguel González-Fierro
abstract:
  A recommendation system seeks to understand the user preferences with the objective of recommending items. In this post, we provide an overview of recommendation system techniques and explain how to use a deep autoencoder to create a recommendation system. 

content:
  <h4 class="section">Recommendation Systems</h4>

  <p>Recommendation systems have become increasingly popular in recent years, in parallel with the growth of internet retailers. These systems are used in a variety of areas including movies, music, news, books, search queries, and products in general. In terms of business impact, according to a recent <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.895.3477&amp;rep=rep1&amp;type=pdf">study</a> from Wharton School, recommendation engines can cause a 25% lift in the number of views and 35% lift in the number of items purchased. So it is worth understanding these systems.</p>

  <p class="image-align-center"><img alt="" height="170" src="/img/upload/2021/03/18/shut_up.png" width="300" /></p>

  <p>Generally speaking, there are 3 methodologies for recommendation systems: collaborative filtering, content-based filtering and hybrid recommender systems.</p>

  <p><a href="https://en.wikipedia.org/wiki/Collaborative_filtering"><strong>Collaborative filtering</strong></a> collects large amounts of information on users&rsquo; behavior in order to predict what users will like based on their similarity to other users. This information can be <em>explicit</em>, where the user directly provides the ratings of the items, or <em>implicit</em>, where the ratings must be extracted for the implicit user behavior, like number of views, likes, purchases, etc.</p>

  <p class="image-align-center"><img alt="Collaborative filtering" height="296" src="/img/upload/2021/03/18/collaborative_filtering.png" width="320" /></p>

  <p>Mathematically, it is based on inferring the missing entries in an $m\times n$ matrix, $R$, where elements $(i, j)$ describe the ratings given by the $i_{th}$ user to the $j_{th}$ item. The performance is then measured using Root Mean Squared Error (RMSE). This problem has been addressed in a variety of ways. Traditional methods include low-rank matrix factorization like <a href="https://datajobs.com/data-science-repo/Recommender-Systems-%5BNetflix%5D.pdf">Alternating Least Squares</a>, which became popular due to its implementation in <a href="https://spark.apache.org/docs/latest/mllib-collaborative-filtering.html">Spark</a>. Methods based on Deep Learning have grown in popularity recently, some techniques use embeddings and RELU activations like in <a href="http://dl.acm.org/citation.cfm?doid=2959100.2959190">Youtube</a>, recurrent neural networks like in <a href="http://arxiv.org/abs/1511.06939">(Hedasi et al., 2016)</a> or deep autoencoders like the <a href="http://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Recommendation_Systems/Intro_Recommender.ipynb">this</a><a href="http://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Recommendation_Systems/Intro_Recommender.ipynb"> tutorial</a>.</p>

  <p><strong>Content-based filtering</strong> take into account contextual user factors such as location, date of purchase, user demographics and item factors like price, brand, type of item, etc, to recommend items that are similar to those that a user liked in the past.</p>

  <p>The system creates a content-based profile of users based on a weighted vector of item features. The weights denote the importance of each feature to the user and can be computed from individually rated content vectors using a variety of techniques. Simple approaches use the average values of the rated item vector while other sophisticated methods use machine learning techniques such as Bayesian classifiers, decision trees, and neural networks to estimate the probability of a user liking the item.</p>

  <p><strong>Hybrid recommender systems</strong> combine multiple techniques together to achieve some synergy between them. They can use aspects from collaborative filtering, content-based filtering, knowledge-based and demographics. They have proved to be very effective in some cases, like the <a href="https://www.netflixprize.com/assets/GrandPrize2009_BPC_BellKor.pdf">Bellkor solution</a>, winner of the Netflix prize, the <a href="http://delivery.acm.org/10.1145/2850000/2843948/a13-gomez-uribe.pdf">Netflix Recommender System</a> or <a href="https://github.com/lyst/lightfm">LightFM</a>.</p>

  <h4 class="section">Deep Autoencoder for Collaborative Filtering</h4>

  <p>A current state-of-the-art <a href="https://arxiv.org/abs/1708.01715">model</a>, developed by NVIDIA, is a 6 layers deep <a href="https://en.wikipedia.org/wiki/Autoencoder">autoencoder</a> with non-linear activation function (SELU - scaled exponential linear units), dropout and iterative dense refeeding.</p>

  <p>An autoencoder is a network which implements two transformations: $encode(x) : R^n \Rightarrow R^d$ and $decoder(z): R^d \Rightarrow R^n$. The &ldquo;goal&rdquo; of an autoencoder is to obtain a lower $d$ dimensional representation of data such that an error measure between $x$ and $f(x)=decode(encode(x))$ is minimized.</p>

  <p class="image-align-center"><img alt="Collaborative filtering autoencoder" height="222" src="/img/upload/2021/03/18/autoencoder.png" width="340" /></p>

  <p>During the forward pass, the model takes a user representation by his vector of item ratings from the training set $x \in R^n$, where $n$ is number of items. Note that $x$ is very sparse, while the output of the decoder, $y=f(x) \in R^n$ is dense and contains the rating predictions for all items in the corpus. The loss is the root mean squared error (RMSE).</p>

  <p>One of the key ideas of the paper is dense re-feeding. Let&#39;s consider an idealized scenario with a perfect $f$. Then $f(x)_i = x_i ,\forall i : x_i \ne 0$ and $f(x)_i$ accurately predicts all user&#39;s future ratings. This means that if a user rates a new item $k$ (thereby creating a new vector $x^\prime$) then $f(x)_k = x^\prime_k$ and $f(x) = f(x^\prime)$. Therefore, the authors refeed the input in the autoencoder to augment the dataset. The method consists of the following steps:</p>

  <ol>
  	<li>Given a sparse $x$, compute the forward pass to get $f(x)$ and the loss.</li>
  	<li>Backpropagate the loss and update the weights.</li>
  	<li>Treat $f(x)$ as a new example and compute $f(f(x))$</li>
  	<li>Compute a second backward pass. Steps 3 and 4 can be repeated several times.</li>
  </ol>

  <p>Finally, the authors explore different non-linear <a href="https://github.com/pytorch/pytorch/blob/master/torch/nn/functional.py">activation functions</a>. They found that on this task ELU, SELU and LRELU, which have non-zero negative parts, perform much better than SIGMOID, RELU, RELU6, and TANH.</p>

  <p>If you want to see this model in practice, take a look at this <strong><a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Recommendation_Systems/Intro_Recommender.ipynb" target="_blank">notebook</a></strong>, where we create a recommender system with the <a href="https://netflixprize.com/">Netflix dataset</a> and an API to operationalize it.</p>


title: Stock Price Prediction with LSTMs
slug: stock-price-prediction-with-lstms
pub_date: 2018-03-20
keywords: deep learning; lstm; stock price prediction
authors: Miguel González-Fierro
meta_description:
  Stock Price Prediction with LSTM and keras with tensorflow. Time series prediction using deep learning, recurrent neural networks and keras

abstract:
  Do you want to make millions in the stock market using Deep Learning? This post will not answer that question, but it will show how you can use an LSTM to predict stock prices with Keras, which is cool, right?

content:
  <p>If you are here with the hope that I will show you a method to get rich by predicting stock prices, sorry, I&#39;m don&#39;t know the solution. Even if I knew, I would never tell you!</p>

  <p>Even if you think it is impossible to predict the future, it is not. In fact, that is one of the reasons we invented <a href="https://miguelgfierro.com/blog/2016/why-math-is-so-important-in-everyones-life/">math</a>. Probably you have heard about something called <a href="https://en.wikipedia.org/wiki/Differential_equation">differential equations</a> (DE). If you are an engineer, you probably had to pass a painful exam of DE (I did). DE are just one way to model the temporal behavior of a system.</p>

  <p>Another method is called <a href="https://en.wikipedia.org/wiki/Recurrent_neural_network">Recurrent Neural Networks</a> (RNNs), which is a deep learning model designed to address sequential data problems. A variant of RNNs is the <a href="https://en.wikipedia.org/wiki/Long_short-term_memory">Long-Short Term Memory</a> (LSTM) which is specially suited for time-series prediction problems. It is internally composed by two kind of units, hidden units, which as in <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/">CNNs</a> contain a hidden representation of the inputs, and gated units, which control the amount of information that flows from the inputs, to the hidden units and to the outputs.</p>

  <p>The <a href="https://www.youtube.com/watch?v=WCUNPb-5EYI">gated structure</a> of LSTMs, make them very efficient when working with large time series. They are able to understand long-term dependencies in temporal data, controlling which information should be &quot;remembered&quot; and which &quot;forgotten&quot;.</p>

  <p>I created a <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Time_Series_Forecasting_of_Stock_Price/Stock_Price_Forecasting.ipynb" target="_blank">simple tutorial</a> using <a href="https://github.com/keras-team/keras">Keras</a> with Tensorflow back-end to predict the stock prices of Microsoft from 2012 to 2017. I used an LSTM and two variants of the same family: Bi-directional LSTM and <a href="https://en.wikipedia.org/wiki/Gated_recurrent_unit">GRU</a>.</p>

  <p><img alt="" height="340" src="/img/upload/2021/03/18/lstm_stock_prediction.svg" width="340" /></p>

  <p>In the figure, the model is able to track the true value (in green) with the prediction in the test set (in blue), given a training set of past values (in red). This <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Time_Series_Forecasting_of_Stock_Price/Stock_Price_Forecasting.ipynb" target="_blank">code</a> is probably not enough to earn money in the stock market, but it will give you a good baseline if you want to enter the exciting world of financial services with AI.</p>


title: 10 Ethical Issues of Artificial Intelligence and Robotics
slug: 10-ethical-issues-of-artificial-intelligence-and-robotics
meta_description: top 10 ten ethical issues of artificial intelligence and robotics
pub_date: 2018-04-01
keywords: ethics; ai; robotics
authors: Miguel González-Fierro
abstract:
  AI is one of the technologies that could revolutionize the world, some people call it the electricity of the twenty first century. Researchers and professionals need to be aware of the ethical and social implications this technology poses. We are responsible for making robots and AI systems that help and empower humanity.

content:
  <p>AI and robotics are going to shape our future. Next, there are 10 issues that professionals and researchers need to address in order to design intelligent systems that help humanity.</p>

  <h5 class="subsection">Misinformation and Fake News</h5>

  <p>The flow of <a href="https://sciencebusiness.net/news/artificial-intelligence-world-astonishingly-pessimistic-says-eu-research-commissioner" target="_blank">misinformation</a> together with our natural inability of perceiving reality based on evidence (a phenomenon called <a href="https://www.psychologytoday.com/us/blog/science-choice/201504/what-is-confirmation-bias" target="_blank">confirmation bias</a>) is a threat to having an <a href="https://www.youtube.com/watch?v=8MqTOEospfo" target="_blank">informed democracy</a>. Russian hackers influencing the <a href="https://www.nytimes.com/2018/02/16/us/politics/russia-mueller-election.html" target="_blank">US elections</a>, <a href="http://www.wired.co.uk/article/brexit-russia-influence-twitter-bots-internet-research-agency" target="_blank">Brexit campaign</a> and <a href="http://www.bbc.com/news/world-europe-41981539" target="_blank">Catalonia crisis</a> are examples of how social media can massively spread misinformation and fake news. Recent advances in computer vision make it possible to completely fake a video of <a href="https://www.youtube.com/watch?v=dkoi7sZvWiU" target="_blank">President Obama</a>. An open question is&nbsp;how institutions are going to address this threat.</p>

  <h5 class="subsection">Job Displacement</h5>

  <p>The <a href="https://en.wikipedia.org/wiki/Scientific_revolution" target="_blank">scientific revolution</a> in the 18th century and the <a href="https://en.wikipedia.org/wiki/Industrial_Revolution" target="_blank">Industrial Revolution</a> in the 19th marked a complete change in society. For thousands of years before it, economic growth was practically <a href="http://www.business-standard.com/article/current-affairs/what-industrial-revolution-really-tells-us-about-future-of-automation-work-117090400137_1.html" target="_blank">negligible</a>. During the 19th and 20th centuries, the level of social <a href="https://www.theguardian.com/books/2014/oct/30/10-greatest-changes-of-the-past-1000-years" target="_blank">development</a> was remarkable.</p>

  <p>In the 19th century, there was a group in the UK called the <a href="http://www.nationalarchives.gov.uk/education/politics/g3/" target="_blank">Luddites</a>, that protested against the automatization of the textile industry by destroying machinery. Since then, a recurrent fear has been that automation and technological advances will produce mass unemployment. Even though that prediction has proven to be incorrect, it is a fact that there has been a painful job displacement. PwC estimates that by 2030 around 30% of the jobs will be <a href="https://www.pwc.co.uk/economic-services/assets/international-impact-of-automation-feb-2018.pdf" target="_blank">automatized</a>. Under these circumstances, governments and companies should provide workers with tools to adapt to these changes, by supporting education and relocating jobs.</p>

  <h5 class="subsection">Privacy</h5>

  <p>The importance of privacy is all over the news lately due to the <a href="https://techcrunch.com/2018/03/27/facebook-data-misuse-scandal-affects-substantially-more-than-50m-claims-wylie/" target="_blank">Cambridge Analytica</a> scandal, where 87 million Facebook profiles were stolen and used to influence the US election and Brexit campaign. Privacy is a <a href="http://www.un.org/en/universal-declaration-human-rights/" target="_blank">human right</a> and should be protected against misuse.</p>

  <h5 class="subsection">Cybersecurity</h5>

  <p>Cybersecurity is one of the biggest concerns of governments and companies, especially banks. A robbery of <a href="https://www.nytimes.com/2015/02/15/world/bank-hackers-steal-millions-via-malware.html?_r=1" target="_blank">$1 billion</a> was reported in banks from Russia, Europe and China in 2015, and <a href="http://fortune.com/2018/01/31/coincheck-hack-how/" target="_blank">half a billion</a> was stolen from the cryptocurrency exchange Coincheck. AI can help protect against these vulnerabilities, but it can be also used by hackers to find new sophisticated ways of attacking institutions.</p>

  <h5 class="subsection">Mistakes of AI</h5>

  <p>Last month, a woman was hit and killed overnight by an Uber <a href="https://www.cnbc.com/2018/03/19/uber-self-driving-car-fatality-halts-testing-in-all-cities-report-says.html" target="_blank">self-driving car</a> when walking across the street in the US. Like any other technological system, AI systems can make mistakes. It is a common misconception that robots are infallible and infinitely precise. A common way for some professors in my old lab to say hello to their PhD students of robotics was, what have you broken?</p>

  <h5 class="subsection">Military Robots</h5>

  <p>There is an ongoing debate about controlling the development of military robots and banning autonomous weapons. An <a href="https://futureoflife.org/open-letter-autonomous-weapons" target="_blank">open letter</a>, from 25.000 researchers and professionals of AI, asks to ban autonomous weapons without human supervision to avoid an international military AI arms race.</p>

  <h5 class="subsection">Algorithmic Bias</h5>

  <p>We have to work hard to avoid bias and discrimination when developing AI algorithms. A specific example was face detection using <a href="https://docs.opencv.org/3.4.1/d7/d8b/tutorial_py_face_detection.html" target="_blank">Haar Cascades</a>, which has a lower detection rate in dark-skinned people than in light-skinned people. This happens because the algorithm is designed to find a double T pattern in a grayscale image of the person&rsquo;s face, corresponding to the eyebrows, nose and mouth. This pattern is more difficult to find in a person with dark skin.</p>

  <p>Haar Cascades are not racists, how can an algorithm be? but many people can feel insulted. When programing these algorithms, we need to be mindful of their limitations,&nbsp; transparent with users by explaining how the algorithm works or use a more effective technique with dark-skinned people.</p>

  <h5 class="subsection">Regulation</h5>

  <p>Existing laws have not been developed with AI in mind, however, that does not mean that AI-based products and services are unregulated. As <a href="https://news.microsoft.com/uploads/2018/01/The-Future-Computed.pdf" target="_blank">suggested by Brad Smith</a>, Chief Legal Officer at Microsoft, <em>&quot;Governments must balance support for innovation with the need to ensure consumer safety by holding the makers of AI systems responsible for harm caused by unreasonable practices&quot;</em>. Policymakers, researchers, and professionals should work together to make sure that AI provides a benefit to humanity.</p>

  <h5 class="subsection">Superintelligence</h5>

  <p>Some tech leaders have shown concerns about the possible threats of AI, one example was Elon Musk, who claimed that AI is riskier than <a href="https://twitter.com/elonmusk/status/896166762361704450" target="_blank">North Korea</a>. These words generated strong criticism from the <a href="https://techcrunch.com/2017/07/19/this-famous-roboticist-doesnt-think-elon-musk-understands-ai/" target="_blank">scientific community</a>.</p>

  <p>Superintelligence is generally regarded as a state where a robot starts to recursively improve itself, reaching a point that easily surpasses the most intelligent human by orders of magnitude. Some enthusiasts, like <a href="http://www.kurzweilai.net/ray-kurzweils-singularity-prediction-supported-by-prominent-ai-scientists" target="_blank">Ray Kurzweil</a>, believe&nbsp;that by 2045 we will reach that state. Others, like <a href="https://medium.com/@francois.chollet/the-impossibility-of-intelligence-explosion-5be4a9eda6ec" target="_blank">Fran&ccedil;ois Chollet</a>, believe&nbsp;that it is impossible.</p>

  <h5 class="subsection">Robot Rights</h5>

  <p>Should robots have rights? If we think of a robot as an advanced washing machine, then no. However, if robots were able to have <a href="https://miguelgfierro.com/blog/2016/is-it-possible-for-a-robot-to-have-emotions/" target="_blank">emotions or feelings</a>, then the answer is not that clear. One of the pioneers of AI, <a href="https://en.wikipedia.org/wiki/Marvin_Minsky" target="_blank">Marvin Minsky</a>, believed that there is no fundamental difference between humans and machines, and that general AI won&#39;t possible unless robots have&nbsp;self-conscious emotions.</p>

  <p>A suggestion in the debate around <a href="https://cyberleninka.ru/article/n/artificial-personal-autonomy-and-concept-of-robot-rights" target="_blank">robot rights</a> is that robots should be granted the right to exist and perform their mission, but this should be linked to the duty of serving humans. There is a lot of <a href="https://en.wikipedia.org/wiki/Ethics_of_artificial_intelligence" target="_blank">controversy</a> around this area. Meanwhile, in 2017, <a href="https://en.wikipedia.org/wiki/Sophia_(robot)" target="_blank">Sophia</a> the robot was granted citizenship of Saudi Arabia, and even Will Smith flirted with her.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=Ml9v3wHLuWI">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/Ml9v3wHLuWI?rel=0&amp;showinfo=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>

  <p>&nbsp;</p>


title: Top Mistakes and Learnings from my Startup: Postmortem Samsamia
slug: top-mistakes-and-learnings-from-my-startup-postmortem-samsamia
pub_date: 2018-05-18
keywords: startups; postmortem; samsamia
authors: Miguel González-Fierro
meta_description:
  Top mistakes and learnings I did in my second startup Samsamia Technologies. Problems with cofounder Miguel Angel Maldonado Agramonte

abstract:
  Samsamia Technologies was a new communication channel between fashion brands and customers. We developed a search engine for fashion products that allows a smartphone user to find the piece of clothing he or she desires just by taking a picture and buy it instantaneously. In this postmortem, I explain how I built the company, what were the mistakes I made that led to its collapse and what are the learnings I got from it. 

content:
  <p>It took me two years to write these words, but I think it is about time I share my experience. Let&#39;s start assuming my responsibility in the bankruptcy of Samsamia, I was the CEO, and I, not my cofounder and ex-best friend Miguel Angel Maldonado Agramonte, was to blame. It was my poor choices and lack of future vision that made a company with around &euro;200k in revenue and a bright future collapse.</p>

  <h4 class="section">Starting-up Samsamia</h4>

  <p>The idea of Samsamia came to me when I was jogging near my home. The previous day, my sister had told me how frustrated she was because she couldn&#39;t find a bag that she liked. She was walking in Madrid and saw a girl with this particular bag. She stopped the girl and asked her where she had bought the bag, but the girl said she didn&#39;t remember.</p>

  <p>My sister looked for the bag online, she went shopping at half of the stores in Madrid, but it was impossible to find. She was so desperate that she sent me pictures of it and told me: &quot;if by any chance you find this, buy it for me&quot;.</p>

  <p>Those who know me can imagine how hilarious&nbsp;that was. I hate to go shopping and had no interest in fashion at all. So, I said to them: &quot;look sis, if you are not able to find that bag, it would be impossible for me to do it&quot;.</p>

  <p>While I was jogging the next day, I thought well, I won&#39;t be able to find the bag, but I could use machine learning and computer vision to do it. Samsamia idea was born.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=MqanP0_7WZ0">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/MqanP0_7WZ0?rel=0&amp;showinfo=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>

  <p>By then I was a <a href="http://roboticslab.uc3m.es/roboticslab/people/m-gonzalez-fierro">PhD student in robotics</a>, so I started to code the first version of the search engine using <a href="https://opencv.org/">OpenCV</a> and C++ (later this code was translated to Python).</p>

  <p>I knew how to create an algorithm that extracted visual features of a garment and compare these features with a big database of other garments.</p>

  <p>However, I had no idea how to make a phone app or an API. So I started looking for partners.</p>

  <h4 class="section">Mistake 1: Poor Early Decisions can be Irreversible</h4>

  <p>After being rejected by several friends and colleagues at my research lab, I asked Miguel Angel Maldonado to join me. I had been his <a href="http://robots.uc3m.es/images/c/c9/PFM_MiguelMaldonado.pdf">Master Thesis director</a> and he had experience in developing server-side applications. We founded Samsamia Technologies with 50%-50% shares each and he became the unique administrator, due to an incompatibility with my current job at my research lab.</p>

  <p>I didn&#39;t know back then but that was a decision that I was going to regret in the future. I thought that a shareholders agreement can protect my interests as a stakeholder, however, that didn&#39;t prevent the events that happened afterward. This mistake cost me the company, I barely knew him, we had worked together for a while, but that&#39;s completely different to work with a person under high-pressure conditions and with money entering the company.</p>

  <h4 class="section">Mistake 2: Too Slow Iterating</h4>

  <p>The first product Samsamia released was called <a href="https://miguelgfierro.com/blog/2013/dresscovery-app-is-out/">Dresscovery</a>, it took 1 whole year to develop. It was an app that allowed you to take a picture of a bag and buy a similar one available for sale on online e-commerces.</p>

  <p>We made some noise in the <a href="http://www.abc.es/tecnologia/moviles-aplicaciones/20140114/abci-dresscovery-moda-propuestas-201401131606.html">Spanish press</a> and won some <a href="https://miguelgfierro.com/blog/2013/samsamia-at-bbva-opentalent-event-in-buenos-aires/">international contests</a>, but the product was a complete failure. When starting the company, I had no idea about the concepts of product development vs <a href="https://en.wikipedia.org/wiki/Customer_development">customer development</a>, the <a href="http://theleanstartup.com/">lean startup</a> method, or <a href="https://en.wikipedia.org/wiki/Growth_hacking">growth hacking</a>.</p>

  <p>I did the rookie mistake of many technical entrepreneurs: have a technology, not a product. When the app was released to the public, there was no engagement and it almost made no money. It was the end of 2013 and we had a product that nobody wanted.</p>

  <h4 class="section">Mistake 3: Give Money to Pay the Salary of my Cofounder</h4>

  <p>The year 2014 was really tough with almost no money in the bank. We learned from Dresscovery mistake and pivoted from B2C to B2B. I was spending most of my time in finding customers to sell them the visual recommender through an API.</p>

  <p>Meanwhile, Maldonado keep complaining about the difficult situation of the company and showed intentions to leave, but I felt that we had a big opportunity waiting for us. We were running out of cash so we decided to ask for money from our families. During this year I put <a href="https://miguelgfierro.com/docs/samsamia/aportaciones_dinerarias_miguel_fierro_2016_01_21.pdf">&euro;8400 in the company</a>, which mostly went to his salary. But when I asked my partner to match that quantity he didn&#39;t do it. We agreed that I had to add the money as a loan, instead of changing the percentage of the shares between us. We also agreed that the company had to reimburse the loan the moment we start having cash. However, that never happened.</p>

  <h4 class="section">Final days of Samsamia</h4>

  <p>At the end of 2014, I was able to land a really big customer. They were one of the biggest e-commerce in the UK and money started flowing to Samsamia. I was so excited, my effort and sacrifices had paid off. The visual recommender that I initially created and then we evolved in the company, was going to face real customers.</p>

  <p>During the time we were working with the e-commerce, I learned a lot: how to create mission-critical workloads, what are the challenges of big e-commerce or how different is to have a visual search algorithm than to have a product. One of the top learnings I got is how important is to have a product that covers the customer&#39;s need. I asked a manager from our customer once: why did you choose Samsamia, a small startup in Spain, instead of this other competitor that had &pound;4M of investment? They replied that the other competitor had shown their visual search results and they asked them to modify the algorithm to better fit what the e-commerce users wanted to see. But the competitor didn&#39;t do it, because they wanted a general tool. Samsamia, in contrast, was willing to modify the algorithm to fit the customer&#39;s requirements.</p>

  <p>Back in Spain, the situation with my partner was getting worse. Money was flowing in the company and my partner was not hiding at all that he wanted me out. First, Maldonado created an &quot;<a href="https://miguelgfierro.com/docs/samsamia/consejo_admin_maldonado_papa.pdf">advisory board</a>&quot; with a friend of him, Jaime Rosco, who by then was working in the company, the accountant (which was a friend of his dad) and his dad (yes, his dad, who was a professional seller of boilers from Bosch). He also wanted <a href="https://miguelgfierro.com/docs/samsamia/more_equity_and_control_emails.pdf">more equity and control</a>&nbsp;and asked me to generously give part of my equity to his friend Rosco. Sometime later, Maldonado and Rosco <a href="https://miguelgfierro.com/docs/samsamia/trip_to_london_behind_my_back.pdf">flew to London</a> without telling me (and paid by the company) to try to convince one of the customer&#39;s managers to take my position as CEO (the guy freaked out, by the way) and they started developing a parallel version of the visual search code in a <a href="https://www.youtube.com/watch?v=0aRSdbZytIc">repository that I had no access</a>.&nbsp;</p>

  <p>Around the end of 2015, everything became crazy. Using his position as administrator, he removed my access to the <a href="https://miguelgfierro.com/docs/samsamia/remove_access_to_companys_bank_account.pdf">company&#39;s bank account</a>, I was not able to see what Maldonado was doing with all money the company had. Not only that, after my lawyer claimed my debt back, he stated that the company had a debt with him of a little bit less than <a href="https://miguelgfierro.com/docs/samsamia/aportaciones_dinerarias_falsas_miguel_maldonado_2016_01_21.pdf">&euro;20.000</a>, money that never entered the company, part of which was from even before the company was incorporated. I <a href="https://miguelgfierro.com/docs/samsamia/rejection_false_debt_miguel_maldonado_2016_05.pdf">rejected that debt</a>, and as you can imagine, I never had my money back.</p>

  <p>Finally, in early 2016 Samsamia stopped paying me. The moment that happened, our main customer stopped paying the company. From the &euro;70k that the company had in the bank at the end of 2015, most of that money was gone by summer. As an investor and owner of the company, one of the main rights is access to information, however, I don&#39;t know what software development or sales initiatives the company did between January and September 2016. After the summer, my partner and the other workers in Samsamia had to find other jobs. The company was destroyed and I sued Maldonado.</p>

  <h4 class="section">Retrospective and Learnings</h4>

  <p>As you can imagine, I had a very hard time in all this process. But guess what, making a startup is hard. Surprise! I reflected a lot about all those years.</p>

  <p>To make a startup is brutal, I have worked in science and then in one of the top tech companies in the world (Microsoft) but there is nothing as hard as creating your own business. The pressure that you experience is extreme. Therefore, the behavior of people under the circumstances of a startup is difficult to predict. If you are trying to start a startup with a friend, think about this, do you really know this person? are you confident that under high levels of pressure this person is going to help you or is he going to break apart? It is super common to divide shares generously on the first day of the startup, it&#39;s like marrying a girl the first day you know her. Isn&#39;t it creepy?</p>

  <p>I think that the key to all my success and failures in Samsamia is adaptation. I failed when I was not able to predict my partner&#39;s behavior or when it took us so much time to develop an app that nobody wanted. I succeeded when we were able to adapt to the customer needs, like when we changed from B2C to B2B or when we adapted our technology for the customer.</p>

  <p>I guess the biggest takeaway for me is the feeling of accomplishment. A small company in Spain, with no investment and internal problems, was able to create a product that one of the biggest e-commerces in the world used. It was <a href="https://www.linkedin.com/in/reidhoffman/">Reid Hoffman</a> who said that making a startup is like jumping from a cliff and trying to assemble an airplane on your way down. I have the feeling that at least I built a crappy plane that flew for some time and then it crashed with a huge explosion. The time that the plane flew was amazing.</p>

  <p>Here is a demo of the product we made for ASOS.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=cMj3b82Wugw">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture;" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/cMj3b82Wugw?rel=0" style="top: 0; left: 0; width: 100%; height: 100%; position: absolute; border: 0;"></iframe></div>
  </div>

  <p>&nbsp;</p>


title: Demystifying WebSockets for Real-Time Web Communication
slug: demystifying-websockets-for-real-time-web-communication
meta_description: Demystifying websockets for real-time web communication between client and server
pub_date: 2018-07-12
keywords: websockets; web development
authors: Miguel González-Fierro
abstract:
  WebSocket is a protocol for bidirectional communication (client-server and server-client), which is part of the HTML 5 API. In simple terms, it enables the interaction between a web client and a web server with lower overheads, facilitating data transfer in real-time. In this post, we will explain what are WebSockets, what is its relationship with older technologies like AJAX and REST APIs and we will provide some resources to help you implement this technology.

content:
  <h4 class="section">A Brief History of the Web</h4>

  <p>Once upon a time, Tim Berners-Lee invented the World Wide Web. With it came Messenger, eMule, eBay, Facebook, Youtube, Twitter, cat videos, memes and probably happiness.</p>

  <p>In the early days of the web, the <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" target="_blank">HTTP protocol</a> was developed to serve images, sound, and other content, in addition to <a href="https://en.wikipedia.org/wiki/HTML" target="_blank">HTML</a> web pages. These pages were sent as static HTML that could not be changed. Very soon, people realized the limitations of this technology that allowed no interaction of the user with the web page.</p>

  <p>The web evolved very quickly to a request-response paradigm, where the client makes a request and the server responds with information. <a href="https://en.wikipedia.org/wiki/Representational_state_transfer" target="_blank">REST</a> or RESTful API design (Representational State Transfer) was developed under this methodology of request-response.</p>

  <p>REST is the most common architectural design for creating APIs under HTTP protocol and became an important player in the development of the modern web because it facilitates communications between different systems. REST defines a common abstraction layer that allows applications written in different languages (Python, Java, JS, etc) to communicate with each other. In REST APIs, the server can manage different types of requests from the client: GET, POST, PUT and DELETE, each of them with a different purpose.</p>

  <p><img alt="Websocket history" height="302" src="/img/upload/2021/03/18/web_history_7hH4nU7.png" width="320" /></p>

  <p>When working with web clients, in the early days of web development, the typical workflow started with the user making a request to the server. The server would receive the information, process it and return a response. The new information that the client receives had to be added to the static HTML code by refreshing the entire web page. However, normally, not all the elements of the HTML code were changed, so refreshing the entire web page was a wasteful operation. To address this issue, <a href="https://en.wikipedia.org/wiki/Ajax" target="_blank">AJAX</a> technology was developed.</p>

  <p>Asynchronous JavaScript and XML (AJAX) is a client-side technique for updating the HTML code of a web page without refreshing the entire web page. It will make a request, wait for the response to be received and then call a callback function that will process the response. All these operations are done asynchronously, so the user can keep interacting with the web page (i.e. it&rsquo;s non-blocking).</p>

  <p>Even though it was a great advancement years ago, it has some drawbacks. First, AJAX can only send data as strings, which means that you have to cast all data to the correct datatype with server-side code. But its main disadvantage is that AJAX is a one-way communication technology. It always has to poll the server for data rather than receive it via push directly from the server. Additionally, since it works over HTTP protocol, each time a request is made, a new connection has to be created. For real-time applications, this is problematic. Ideally, we need a low latency technology that allows bidirectional communications, client-to-server and server-to-client. To address these issues, WebSockets were developed.</p>

  <h4 class="section">WebSockets</h4>

  <p>A <a href="https://en.wikipedia.org/wiki/WebSocket" target="_blank">WebSocket</a> is a protocol intended for real-time communications developed for the HTML5 specification. It can create a persistent, low latency connection that can support transactions initiated by either the client or server. Instead of using the HTTP protocol, it uses <a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol" target="_blank">TCP</a> protocol creating a persistent connection that can be closed by either the client or the server.</p>

  <p>The communication is performed via messages and can be triggered by the client or the server, this is usually referred to as full-duplex communication. The advantage of this over AJAX is that it improves the system latency since now the client doesn&#39;t have to pull data from the server every time it needs to add new content.</p>

  <p>To create a WebSocket connection, the first step is to let both client and server know that they are going to use that protocol. For this, WebSockets need to perform a handshake over TCP, which effectively upgrades from HTTP protocol to WebSocket protocol. An upgrade header is added in the request to inform the server that the client wishes to establish a WebSocket connection.</p>

  <p><img alt="" height="314" src="/img/upload/2021/03/18/websockets.png" width="340" /></p>

  <p>Once the connection is established, messages can be sent bi-directionally. In simple terms, the client and server can perform two types of actions: they can emit a message or they can manage a received message. To emit a message (depending on the language) you would need to write something like&nbsp;<span style="font-size:12px"><span style="font-family:Courier\ New,Courier,monospace">socketio.emit(&#39;my_event</span></span><span style="font-size:12px"><span style="font-family:Courier\ New,Courier,monospace">&#39;, msg)</span></span>, where <span style="font-size:12px"><span style="font-family:Courier\ New,Courier,monospace">my_event</span></span> is the identifier that the receiver handles. To handle a sent message you would need to write something like&nbsp;<span style="font-size:12px"><span style="font-family:Courier\ New,Courier,monospace">socket.on(&#39;my_event&#39;, function (msg) { ... });</span></span>.</p>

  <p>In terms of data IO, WebSockets require less data transfer than other technologies. The headers are passed only when the connection is created. In contrast, in the HTTP request-response paradigm, the headers have to be passed in every request. In this <a href="https://medium.com/dailyjs/a-comparison-between-websockets-server-sent-events-and-polling-7a27c98cb1e3" target="_blank">interesting post</a> there is a comparison between HTTP/1.1, HTTP/2 and WebSockets.</p>

  <p>WebSocket technology is widely accepted and can be developed using many different languages. In JavaScript, one can use the libraries <a href="https://socket.io/" target="_blank">Socket.io</a> and <a href="https://github.com/websockets/ws" target="_top">ws</a>; in Python, <a href="https://github.com/tornadoweb/tornado" target="_blank">tornado</a> and <a href="https://github.com/miguelgrinberg/Flask-SocketIO" target="_blank">Flask-SocketIO</a>; in Java, <a href="http://www.eclipse.org/jetty/" target="_blank">Jetty</a> and in C++, <a href="https://github.com/uNetworking /uWebSockets" target="_blank">uWebSockets</a>. In my codebase, I have a <a href="https://github.com/miguelgfierro/pybase/blob/master/api/flask_websocket.py" target="_blank">simple example</a> of how to use WebSockets with Python.</p>


title: A Beginner's Guide to Python Testing
slug: a-beginners-guide-to-python-testing
pub_date: 2018-07-24
keywords: test; tdd; python
authors: Miguel González-Fierro
meta_description:
  Test development in Python: unit tests, integration tests, smoke tests and utility tests. A beginner's guide.

abstract:
  Test development is key for most software projects. In this post, we are going to discuss 4 different tests: unit tests, smoke tests, integration tests and utility tests. In simple words, unit tests make sure that each class or function behaves as it should, smoke tests make sure that the system works, integration tests make sure that the program results are acceptable and utility tests give an example on how to use a class or function. We will show how to work with these tests in Python.

content:
  <h4 class="section">Test-Driven Development</h4>

  <p><a href="https://en.wikipedia.org/wiki/Test-driven_development" target="_blank">TDD</a> is a common practice in software development, it makes the programmer focus on the requirements before writing the code, a subtle but important difference. As it is detailed in this <a href="https://www.madetech.com/blog/9-benefits-of-test-driven-development" target="_blank">post</a>, there are multiple benefits from using TDD: it reduces the number of bugs in your code, it helps you to prioritize interfaces vs implementation, it works as an alert to check whether your last change has broken previously working code, it improves the quality of your code and it can act as code documentation.</p>

  <p>In this post, we are going to analyze four kinds of tests that can be useful in software projects: unit tests, smoke tests, integration tests and utility tests. These&nbsp;tests are inspired by the <a href="https://buildingrecommenders.wordpress.com/2016/02/04/testing-recommenders/" target="_blank">test pipeline of Lenskit library</a>&nbsp;from Minnesota University.</p>

  <p>In order to explain each of the tests, we are going to create examples based on <a href="https://docs.pytest.org/en/latest/" target="_blank">Pytest</a>, since I&#39;m interested in artificial intelligence, the code is going to be based on&nbsp;neural networks.</p>

  <pre>
  <code class="language-python">class NeuralNetwork:
      def __init__(self, n_layers):
          self.name = "NN"
          self.n_layers = n_layers
          self.model = None

      def train(self, dataset):
          self.model = train_model(dataset)

      def compute_accuracy(self, dataset):
          return self.model.compute_acc(dataset)

  def train_model(dataset):
      # code to train a model given a dataset</code></pre>

  <p>The code is really simple, we can initialize the network with a specific number of layers, we can train the network and compute its accuracy given a dataset. For those in the AI field, this network may look too simple, but it is enough for the purpose of this post.</p>

  <h5 class="subsection">Unit Tests</h5>

  <p>A unit test checks whether a function or a class method behaves as expected. They are very common in library development. For simplicity, we are just going to test the class initialization.&nbsp;</p>

  <pre>
  <code class="language-python">@pytest.fixture()
  def nn5():
      return NeuralNetwork(n_layers=5)

  def test_unit_create_nn(nn5):
      assert nn5.name == "NN"
      assert nn5.n_layers == 5
      assert nn5.model is None
  </code></pre>

  <p>The first function is a fixture, which is a piece of code that you can use to initialize a test. Also, it can be added directly as an argument in the test.</p>

  <p>The second function is the unit test. We check that the name, number of layers and model of the class has been created as expected. We will do a unit test for every method.</p>

  <p>It is common to link the unit tests of your library to a <a href="https://en.wikipedia.org/wiki/Continuous_integration" target="_blank">continuous integration</a> (CI) system like <a href="https://travis-ci.com/" target="_blank">Travis</a>. The typical behavior is to make Travis run all the unit tests when a developer makes a pull request to the master branch of your repo. That way you make sure that the code you have in master doesn&#39;t break. CI systems may be completed with <a href="https://en.wikipedia.org/wiki/Continuous_delivery" target="_blank">Continuous Delivery</a>, this is normally referred to as CI/CD.</p>

  <h5 class="subsection">Smoke Tests</h5>

  <p>Smoke tests are used to make sure that critical parts of the system work. They can be used in production systems to quickly check that there are no obvious failures.</p>

  <pre>
  <code class="language-python">def load_dataset(filename):
      # code to load a dataset from a file

  def test_smoke_train():
      nn = initialize_NN()
      dataset = load_dataset('data.csv')
      nn.train(dataset)
      assert nn.model is not None</code></pre>

  <p>In our example, we just check if the system has been trained and that it doesn&#39;t fail. These tests can also be added to the CI system when doing a pull request, for that reason they tend to be quick.</p>

  <h5 class="subsection">Integration/Functional Tests</h5>

  <p>Integration and functional tests are used to check the correct behavior of a system. While we are developing, we could create code that is not failing, but that provides wrong or suboptimal behaviors. In the case of a neural network algorithm, we would like to make sure that for a known dataset we always get a certain value of accuracy.</p>

  <pre>
  <code class="language-python">@pytest.mark.parametrize('n_layers, targ_acc', [
      (2, 0.70),
      (5, 0.80),
  ])
  def test_integration_acc(n_layers, targ_acc):
      nn = NeuralNetwork(n_layers=n_layers)
      dataset = load_dataset('data.csv')
      nn.train(dataset)
      acc = nn.compute_accuracy(dataset)
      assert acc &gt;= targ_acc</code></pre>

  <p>For these situations, the parametrize function of Pytest is really helpful. In our case, Pytest will test the same code twice. With a neural network of two layers, we expect an accuracy of at least 0.70. With a neural network of 5 layers, our expected accuracy is higher.</p>

  <p>In the CI system, these tests are not executed every pull request, but maybe once a day. The reason is that they typically take longer than other kinds of tests.</p>

  <h5 class="subsection">Utility Tests</h5>

  <p>The previous types of tests analyzed are designed to make sure that the code works as expected. But in some situations, tests can be used to just show an example of how to implement the code. This is the task of utility tests.</p>

  <p>The most common place to add utility tests is in the documentation. In this case, utility tests are also referred to as doctests.</p>

  <pre>
  <code class="language-python">class NeuralNetwork:
    """Neural network
    Args:
      n_layers (int): Number of layers.
    Examples:
      &gt;&gt;&gt; dataset = load_dataset('data.csv')
      &gt;&gt;&gt; nn = NeuralNetwork(n_layers=5)
      &gt;&gt;&gt; nn.train(dataset)
      &gt;&gt;&gt; accuracy = nn.compute_accuracy(dataset)
      &gt;&gt;&gt; print(accuracy)
      0.87
    """</code></pre>

  <p>In many situations, a developer might think that there is no need for a utility test if the documentation is clear enough. However, I found that it helps me to&nbsp;understand very quickly the behavior of a piece of code and at the same time, to develop quicker, especially when I&#39;m reusing code. I use utility tests extensively in my <a href="https://github.com/miguelgfierro/codebase" target="_blank">codebase</a>.</p>

  <p>Happy testing!</p>


title: Real-Time Fraud Detection
slug: real-time-fraud-detection
pub_date: 2018-08-01
keywords: real-time; fraud; machine learning
authors: Miguel González-Fierro
meta_description:
  Real-time fraud detection in python using LightGBM (a boosted tree machine learning library) and websockets

abstract:
  Fraud detection is one of the top priorities for banks and financial institutions, which can be addressed using machine learning. In this post, and in the accompanying code repository, we show how to build a real-time fraud detection system using a boosted tree algorithm and websockets. We also show how to visualize the fraudulent transactions in a map.

content:
  <p>If you want to skip directly to the code, you can find it <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Fraud_Detection/fraud_detection.ipynb" target="_blank">here</a>.</p>

  <h4 class="section">Fraud Detection</h4>

  <p>According to <a href="https://nilsonreport.com/upload/content_promo/The_Nilson_Report_Issue_1118.pdf" target="_blank">a report published by Nilson</a>, in 2017 the worldwide losses in card fraud-related cases reached 22.8 billion dollars. The problem is forecasted to get worse in the following years, by 2021, the card fraud bill is expected to be 32.96 billion dollars.</p>

  <p>In the <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Intro_to_Fraud_Detection/fraud_detection.ipynb" target="_blank">python notebook we created</a>, we use the <a href="https://www.kaggle.com/mlg-ulb/creditcardfraud" target="_blank">credit card fraud detection dataset</a> from Kaggle, to identify fraud cases. We use a <a href="https://blogs.technet.microsoft.com/machinelearning/2017/07/25/lessons-learned-benchmarking-fast-machine-learning-algorithms/" target="_blank">gradient boosted tree</a> as a machine learning algorithm, based on the&nbsp;<a href="https://github.com/Microsoft/LightGBM" target="_blank">LightGBM</a> library, which has recently become one of the most popular libraries for top participants in <a href="https://github.com/Microsoft/LightGBM/tree/a39c848e6456d473d2043dff3f5159945a36b567/examples" target="_blank">Kaggle competitions</a>. There are CPU and GPU versions of the system.</p>

  <p>Fraud detection problems are known for being extremely imbalanced. <a href="https://en.wikipedia.org/wiki/Boosting_(machine_learning)" target="_blank">Boosting</a> is one technique that usually works well with these kinds of datasets. It iteratively creates weak classifiers (decision trees) weighting the instances to increase the performance. In the first subset, a weak classifier is trained and tested on all the training data, those instances that have bad performance are weighted to appear more in the next data subset. Finally, all the classifiers are ensembled with a weighted average of their estimates.</p>

  <p>For operationalizing, we design a RESTful API based on <a href="http://flask.pocoo.org/" target="_blank">Flask</a>. The input of the API is going to be a transaction (defined by its features), and the output, the model prediction.</p>

  <div data-oembed-url="https://youtu.be/KiCeeJAlgJU">
  <div style="max-width:320px;margin:auto;"><!-- You're using demo endpoint of Iframely API commercially. Max-width is limited to 320px. Please get your own API key at https://iframely.com. -->
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/KiCeeJAlgJU?rel=0&amp;showinfo=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>
  </div>

  <p>Additionally, we designed a <a href="https://miguelgfierro.com/blog/2018/demystifying-websockets-for-real-time-web-communication/" target="_blank">websocket service</a> to visualize fraudulent transactions on a map. When a new transaction is sent to the API, the model predicts whether the transaction is fair or fraudulent. If the transaction is fraudulent, the server sends a signal to the web client, that renders a world map showing the location of the fraudulent transaction.</p>


title: Python Pro Tips: Understanding Explicit is Better than Implicit
slug: python-pro-tips-understanding-explicit-is-better-than-implicit
pub_date: 2018-09-16
keywords: python; programming; zen of python
authors: Miguel González-Fierro
meta_description:
  Understanding the zen of Python: explicit is better than implicit. Python programming professional tips and examples

abstract:
  One of the main driving forces behind Python is creating simple and readable code, which turns out to be a very difficult task. In this post, we analyze the second statement of the Zen of Python: explicit is better than implicit. We clarify its meaning and illustrate some examples on how to write Python code in a "pythonic" way.

content:
  <p>The <a href="http://pypl.github.io/PYPL.html" target="_blank">popularity of Python</a> has attracted many developers from other languages, that sometimes incorporate their original code style into Python development. It is common to see Python code that looks like Java or C++.</p>

  <p>For this reason, the concept of <em>pythonic</em> was coined. A <a href="https://stackoverflow.com/questions/25011078/what-does-pythonic-mean" target="_blank">pythonic</a> code is a code that follows a set of principles and conventions for using Python in the way it is intended to be used. These conventions are defined by <a href="https://en.wikipedia.org/wiki/Guido_van_Rossum" target="_blank">Guido Van Rossum</a>, benevolent dictator for life (until he resigned in July 2018), and by the community.</p>

  <p>In an effort to provide some guiding principles on how to write better Python code, <a href="https://en.wikipedia.org/wiki/Tim_Peters_(software_engineer)" target="_blank">Tim Petters</a> wrote the <a href="https://www.python.org/dev/peps/pep-0020/" target="_blank">Zen of Python</a>. The second aphorism reads:</p>

  <blockquote>
  <p>Explicit is better than implicit</p>
  </blockquote>

  <p>Being explicit means being concrete and specific instead of abstract and general. It also means not to hide the behavior of a function.</p>

  <p>In the next example, we use the library requests to do a GET request to a URL. In the explicit behavior, it is clear that the function is from the library requests, whereas in the implicit behavior, there could be a conflict if another function in the code is called <span style="font-family:Courier New,Courier,monospace">get</span>.</p>

  <pre>
  <code class="language-python"># Explicit
  import requests
  r = requests.get("https://miguelgfierro.com")

  # Implicit
  from requests import *
  r = get("https://miguelgfierro.com")
  </code></pre>

  <p>Another good example of explicit behavior can be seen in the <a href="https://pandas.pydata.org/pandas-docs/stable/io.html" target="_blank">Pandas IO functions</a>. The IO functions for reading CSV or JSON format are explicitly defined as <span style="font-family:Courier New,Courier,monospace">pd</span><span style="font-family:Courier New,Courier,monospace">.read_csv</span> and <span style="font-family:Courier New,Courier,monospace">pd</span><span style="font-family:Courier New,Courier,monospace">.read_json</span>. An implicit behavior would have been to have a common interface, maybe called <span style="font-family:Courier New,Courier,monospace">read</span>, and manage internally the different inputs.</p>

  <pre>
  <code class="language-python">#Explicit
  def read_csv(filename):
      # code for reading a csv

  def read_json(filename):
      # code for reading a json

  #Implicit
  def read(filename):
      # code for reading a csv or json
      # depending on the file extension
          </code></pre>

  <p>Be explicit my friend!</p>


title: Evidence-Based Software Design
slug: evidence-based-software-design
pub_date: 2018-10-11
keywords: software engineering; best practices; evidence-based design
authors: Nikhil Joglekar and Miguel González-Fierro
meta_description:
  Evidence-Based Software Design. How to manage technical teams and make decisions based on facts to achieve more successful products.

abstract:
  Software design can be challenging. The design decisions we take when creating a technical product influence its customer adoption and the product success. Evidence-based design is a methodology to make decisions based on facts that raises the chances of achieving successful products and improves the efficiency of technical teams.  

content:
  <h4 class="section">Evidence-Based Design</h4>

  <p><a href="https://en.wikipedia.org/wiki/Evidence-based_design">Evidence-Based Design</a> (EBD), also referred to as Evidence-Based Software Engineering, is a methodology that incorporates evidence in the decision-making process of software design.</p>

  <blockquote>
  <p>&ldquo;I believe in evidence. I believe in observation, measurement, and reasoning, confirmed by independent observers. I&#39;ll believe anything, no matter how wild and ridiculous, if there is evidence for it.&rdquo; Isaac Asimov.</p>
  </blockquote>

  <p>At its core, EBD embodies the scientific method: it empowers you to ask the right questions and develop hypotheses, gather quantitative and qualitative data that support or disprove your hypotheses, and measure, share and learn from the outcomes. EBD helps you find product-market fit: EBD will empower you to quantify, understand, and solve customers&rsquo; problems. In doing so, you will have a greater chance of creating a successful product. EBD also motivates data-driven teams and helps foster a culture of making decisions based on facts instead of personal preferences or egos. EBD originated in the medical field, popularized in 1984 by Ulrich and colleagues in a <a href="http://journals.sagepub.com/doi/10.1177/193758670800100306">paper</a> where they showed the benefits of using rigorous research to link the physical design of hospitals with healthcare outcomes. Today, EBD is used across many disciplines, including architecture, interior design, education, and software.</p>

  <p>According to this <a href="https://www.researchgate.net/profile/Tore_Dyba/publication/305632179_Evidence-based_software_engineering/links/5820f70908ae40da2cb52a0c/Evidence-based-software-engineering.pdf">study of EDB</a> applied to software development, the steps to follow are: ask an answerable question; find the best evidence; critically appraise the evidence; apply the evidence and evaluate performance.</p>

  <p>We describe how some of the key processes of <a href="https://www.cindyalvarez.com/lean-customer-development/">Lean Customer Development</a> can drive EBD.</p>

  <h5 class="subsection">1) Ask an answerable question</h5>

  <p>While working in a software organization, the clearest evidence you can get to support your hypotheses is customer behaviour. The first step a software team building products should take is to understand who the customer is and what problems the customer has. Try to write down who your target audience is and what problems they face - be as specific as possible. A sample could be:</p>

  <p>- Target Audience: enterprise data scientists in the manufacturing industry working on predictive maintenance applications.</p>

  <p>- Problem Hypothesis: Preparing data for predictive maintenance applications is the most time consuming and costly task for the audience.</p>

  <p>Allow your problem hypothesis to generate answerable questions about the customer&rsquo;s behaviour What is a customer doing today? How much time do they spend doing the above, and what are the pain points? Do they do anything to work around the problem?</p>

  <h5 class="subsection">2) Find the best evidence</h5>

  <p>The current behaviour of customers is a clear signal of what&rsquo;s really painful and what is a problem people can live with. For example, almost everyone will immediately buy a rat trap if there&rsquo;s a rat in their house. However, people may take weeks if not months to fix a dent in their car.</p>

  <p>Try to reach out and speak to real customers who fall into your target demographic. If you already have customers who use your product, they are a good starting ground for validation. If not, try to find members of your target audience via LinkedIn or GitHub and reach out directly! Make sure to reach out to several people in your target audience - the more data points you can get the better.</p>

  <p>In some cases, it is difficult to get direct answers from the customer. A great secondary source of evidence is to analyse what competitors are doing in your product space.</p>

  <h5 class="subsection">3) Critically appraise the evidence</h5>

  <p>When gathering evidence, it is very important to be aware of the <a href="https://en.wikipedia.org/wiki/Confirmation_bias">confirmation bias</a>. Humans have a natural tendency to search, interpret and favour information that confirms our preconceived beliefs or hypothesis. By critically appraising the information one gathers, bias can be avoided.</p>

  <p>It is also important to analyse the quality and the rigour of the sources. Many scientists have warned that the <a href="https://www.nature.com/news/the-pressure-to-publish-pushes-down-quality-1.19887">pressure of publishing</a> research papers have reduced the overall quality.</p>

  <h5 class="subsection">4) Apply the evidence</h5>

  <p>After analysing and understanding evidence of what problems your customer has, the next step is to come up with a solution. If a customer&rsquo;s problem is that their horse is too slow, there are 100 things that could be viable solutions: you could breed a faster horse, relocate the user to a more central location, or invent the car.</p>

  <p>Applying the evidence to your solution can also involve satisfying constraints like meeting customer requirements, technology limitations, or timelines. &nbsp;</p>

  <h5 class="subsection">5) Evaluate performance</h5>

  <p>Establish clear and concise KPIs for success before you take on a project based on the evidence. Ask yourself what business or technical metrics would indicate success for the project? Establish target dates for a deliverable and define what is and is not in scope for your deliverable. Prior to your target date, evaluate if you are on track to meet the KPIs you set prior to the project. If not, why?</p>

  <p>Make sure to validate your solution with the same audience you spoke to in step 2. After you have a <a href="https://blog.leanstack.com/minimum-viable-product-mvp-7e280b0b9418">minimally viable product</a>, speak again to your target audience. Ask them what they would do differently given the new solution&rsquo;s existence. Use the feedback you receive to help iterate and make your solution even better. Even a wireframe or paper mock-up is <a href="https://medium.com/@robertsmith_co/validating-your-product-design-ideas-with-low-fidelity-wireframes-fba03b84af23">extremely useful</a> to gather feedback.</p>

  <p><img alt="" height="290" src="/img/upload/2021/03/18/drawing_blue2.svg" width="320" /></p>

  <p>&nbsp;</p>


title: A Gentle Explanation of Dimensionality Reduction with t-SNE
slug: a-gentle-explanation-of-dimensionality-reduction-with-t-sne
meta_description: Introduction and explanation of t-sne algorithm and how it performs dimensionality reduction
pub_date: 2018-10-31
keywords: t-sne; dimensionality reduction; visualization
authors: Miguel González-Fierro
abstract:
  t-SNE is one of the most popular dimensionality reduction algorithms, it allows to represent a high-dimensional dataset in a 2 or 3-dimensional space, making it easy to visualize high-dimensional data points. In this post, we explain the algorithm and make a light overview of the math. Together with this post, we wrote a jupyter notebook where we show an example of t-SNE using sklearn and CUDA implementations.

content:
  <p>t-Distributed Stochastic Neighbor Embedding (<a href="https://lvdmaaten.github.io/publications/papers/JMLR_2008.pdf" target="_blank">t-SNE</a>) algorithm is designed for visualizing high-dimensional data in scatter plots.</p>

  <p>t-SNE reduces the dimensionality of a high-dimensional dataset <span class="math-tex">$X={x_1, x_2, ..., x_n}$</span> to a 2 or 3-dimensional dataset&nbsp;<span class="math-tex">$Y={y_1, y_2, ..., y_n}$</span>, by modeling the high-dimensional Euclidean distances between datapoints as joint probabilities <span class="math-tex">$p_{ij}$</span> that represent similarities. For nearby data points, <span class="math-tex">$p_{ij}$</span> is relatively high, and for separated points <span class="math-tex">$p_{ij}$</span> is low. The joint probability is computed based on the conditional probability <span class="math-tex">$p_{j/i}$</span>, which is as a Gaussian centered in <span class="math-tex">$x_i$</span>, and defined as <span class="math-tex">$p_{ij} = (p_{j/i} + p_{i/j})/2n$</span>, where:</p>

  <p><span class="math-tex">$$p_{j/i} = \frac{exp( - \lVert x_i - x_j \rVert^2/2\sigma_i^2)}{\sum_{k\ne i} exp( - \lVert x_i - x_k \rVert^2/2\sigma_i^2) )}$$</span></p>

  <p>For the low-dimensional space, the authors use <a href="https://en.wikipedia.org/wiki/Student%27s_t-distribution" target="_blank">Student t-distribution</a> with one degree of freedom to convert pairwise distances into probabilities:&nbsp;</p>

  <p><span class="math-tex">$$q_{ij} = \frac{ ( 1 + \lVert y_i - y_j \rVert^2 )^{-1} }{\sum_{k\ne l} ( 1 + \lVert y_i - y_j \rVert^2 )^{-1} )}$$</span></p>

  <p>First, it addresses the <em>crowded problem</em>, explained as &quot;in ten dimensions, if we have 11 equidistant datapoints, it is difficult to model them faithfully in a two-dimensional map&quot;. Student t-distribution is a heavy-tailed distribution, and therefore almost scale-invariant to changes of points that are far apart. This effectively means that when mapping pairwise distances from the high-dimensional space to the low-dimensional space, the scale between points is roughly maintained.</p>

  <p>Second, the t-distribution is computationally faster than the Gaussian to evaluate, since it doesn&#39;t involve an exponential.</p>

  <p>The final step in the algorithm is to minimize the mismatch between <span class="math-tex">$p_{ij}$</span> and <span class="math-tex">$q_{ij}$</span> using the <a href="https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence" target="_blank">Kullback-Liebler divergence</a>:</p>

  <p><span class="math-tex">$$\min KL(P\lVert Q) = min \sum_i \sum_j p_{ij}\log\frac{p_{ij}}{q_{ij}} $$</span></p>

  <p>In this <strong><a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Dimensionality_Reduction_with_TSNE/dimensionality_reduction.ipynb" target="_blank"><strong>jupyter</strong> notebook</a></strong>, we use a <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/" target="_blank">CNN</a> to generate high-dimensional features from images and then show how they can be projected and visualized into a 2-dimensional space with t-SNE.</p>


title: Top 35 AI solutions for today's key industries
slug: top-35-ai-solutions-for-todays-key-industries
meta_description: A deep dive on the top 35 popular solutions across 16 different industries
pub_date: 2018-12-21
keywords: ai; solutions; industries
authors: Miguel González-Fierro
abstract:
  Artificial Intelligence is leading the new technological revolution and it is considered by many the new electricity. AI is transforming every industry and driving new ways for companies of being more efficient, profitable and innovative. In this post, we analyze the most popular AI solutions across 16 different industries.

content:
  <h4 class="section">Finance</h4>

  <p>The finance industry, including banking, capital markets and insurance companies have in common a high data volume, large historical records, and the quantitative nature of their operations. Due to these reasons, few industries are better suited for AI. Some of the most popular solutions in this sector are:</p>

  <ul>
  	<li>Fraud detection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</li>
  	<li>Bots &amp; Personal Assistants.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Risk assessment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Financial forecasting&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">Travel &amp; Tourism</h4>

  <p>AI is disrupting the travel, hotel and tourism sector, changing the way businesses and individuals organize their transportation, connections and leisure time. Some popular AI solutions in this area are:</p>

  <ul>
  	<li>Product recommendation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Price optimization.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">Healthcare</h4>

  <p>It is no secret that AI is expected to have a groundbreaking impact on the healthcare sector. There are endless opportunities to leverage machine learning algorithms to deploy more precise, efficient, and impactful interventions at exactly the right moment for a patient. Some key solutions are:</p>

  <ul>
  	<li>Medical imaging&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Automatic diagnosis with bots&nbsp;&nbsp;</li>
  	<li>Health monitoring with IoT telemetry</li>
  	<li>Predictive maintenance of medical devices</li>
  </ul>

  <h4 class="section">Retail, e-commerce &amp; Consumer Goods</h4>

  <p>AI is becoming one of the main drivers of shopping in retail, e-commerce and consumer goods. Machine learning gives businesses a strong competitive advantage and is available to businesses of any size or budget. Popular AI systems include:</p>

  <ul>
  	<li>Intelligent Inventory Management&nbsp;</li>
  	<li>Personalized Recommendations&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Visual Recommendations&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">Manufacturing &amp; Agriculture</h4>

  <p>The primary and secondary sectors are industries traditionally accessible to automation. Through machine learning, the extension of both human capabilities and the physical means of production can significantly accelerate innovation, optimize workflows and increase productivity. Some AI solutions for these industries are:</p>

  <ul>
  	<li>Predictive Maintenance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Intelligent Visual Inspection</li>
  	<li>Smart monitoring with IoT telemetry</li>
  </ul>

  <h4 class="section">Energy &amp; Utilities</h4>

  <p>There is an ongoing fundamental shift in the way the energy, oil and gas industries are evolving, with global demand for clean, cheap, reliable energy. AI is increasingly being used to help meet this need by enabling the growth of low-carbon, green electricity and optimization of processes. AI can add value in:</p>

  <ul>
  	<li>Energy Demand Forecasting&nbsp; &nbsp;&nbsp;</li>
  	<li>Well Production Forecast&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Predictive Maintenance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Smart Telemetry through IoT&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">Media, Telco &amp; Entertainment</h4>

  <p>Media, telco and entertainment industries have seen a dramatic transformation in the last decade due to digitalization. Now AI is transforming the sector even further. AI can increase revenue and reduce costs by creating individualized content, drive decision-making processes and understanding customer behavior. Some key solutions include:</p>

  <ul>
  	<li>Customer Segmentation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Content Moderation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Churn Prediction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  	<li>Personalized Recommendations</li>
  </ul>

  <h4 class="section">Logistics &amp; Transportation</h4>

  <p>Logistics, supply chain and transportation processes are experiencing profound transformations due to AI. Machine learning makes it easy to analyze huge volumes of data in an efficient fashion to provide sophisticated analysis, simplify information and help professionals to make informed decisions. Popular AI systems are:</p>

  <ul>
  	<li>Route Optimization</li>
  	<li>Predictive Demand and Capacity Planning</li>
  </ul>

  <h4 class="section">Government &amp; Education</h4>

  <p>AI represents a significant economic opportunity for any government or educational institution. 25 European countries have recently signed a <a href="https://ec.europa.eu/jrc/communities/community/digitranscope-digital-transformation-and-governance-human-society/document/eu-declaration" target="_blank">declaration of cooperation</a> around AI and many others have defined AI roadmaps at different levels. AI is a great opportunity to improve the quality of living standards and education levels of citizens. Key solutions in this area are:</p>

  <ul>
  	<li>Automation of administrative tasks</li>
  	<li>Face Recognition for Security&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">IT</h4>

  <p>Information Technology companies are some of the first providers of AI. Giants like Google or Microsoft already have AI solutions and are among the top contributors to AI research. There is still a lot of space for improvement and many IT companies can benefit from the innovations and transformation produced by AI. Key systems include:</p>

  <ul>
  	<li>Smart Security Systems</li>
  	<li>Knowledge Management</li>
  </ul>

  <h4 class="section">Consulting</h4>

  <p>Consulting companies are integrating machine learning and deep learning solutions within their service portfolio. Many of them are following an AI and automation first strategy: for every business problem they encounter, they look at how AI and automation can fix it. Popular AI solutions in consulting are:</p>

  <ul>
  	<li>In-house AI Development for Enterprises</li>
  	<li>Bots&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  </ul>

  <h4 class="section">Real Estate &amp; Construction</h4>

  <p>Like any other industry, real state and construction are facing a challenging transformation. AI in the real estate and construction industries has the ability to reduce operational costs, improve customer service and improve efficiency. Some solutions in this area are:</p>

  <ul>
  	<li>Property Recommendation</li>
  	<li>Property Management Automation</li>
  	<li>Machinery Predictive Maintenance</li>
  </ul>


title: Cloud-Scale Text Classification with Convolutional Neural Networks
slug: cloud-scale-text-classification-with-convolutional-neural-networks
pub_date: 2019-03-03
keywords: nlp; sentiment analysis; cnn
authors: Ilia Karmanov and Miguel González-Fierro
meta_description:
  Cloud-Scale Text Classification with Convolutional Neural Networks on Microsoft Azure. Char-CNN, Crepe, VDCNN, NLP, LeCun

abstract:
  Natural Language Processing (NLP) is one of the fields in which deep learning has made significant progress. Specifically, the area of text classification, where the objective is to categorize documents, paragraphs or individual sentences into classes. In this post, we review an old article we published in 2017: Cloud-Scale Text Classification with Convolutional Neural Networks on Microsoft Azure and share the code we used to create the models.

content:
  <p>It&#39;s been two years since we published the post&nbsp;<a href="https://blogs.technet.microsoft.com/machinelearning/2017/02/13/cloud-scale-text-classification-with-convolutional-neural-networks-on-microsoft-azure/" target="_blank">Cloud-Scale Text Classification with Convolutional Neural Networks on Microsoft Azure</a>. In that post, we discussed an interesting approach to NLP, using <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/" target="_blank">CNNs</a>.&nbsp;</p>

  <p>This idea was shared across two papers: <a href="https://arxiv.org/abs/1509.01626" target="_blank">Char-CNN</a> (also called Crepe) and <a href="https://arxiv.org/abs/1606.01781" target="_blank">VDCNN</a>, which became the state of the art at the time of their publication.</p>

  <p><img alt="CNN character encoding" height="173" src="/img/upload/2021/03/18/021317_1733_cloudscalet1.png" width="350" /></p>

  <p>The key idea is to encode each sentence as an image-like matrix, where each encoded character is equivalent to a pixel in the image. As it can be seen in the previous figure,&nbsp;the rows correspond to a dictionary and the columns correspond to the characters in the sentence.</p>

  <p>The dictionary consists of 69 letters, numbers and symbols and the&nbsp;sentence is a&nbsp;one-hot encoded vector, that is, for each letter in the column, we assign a 1 to the corresponding dictionary letter in the row. The length of the sentence is fixed at 1014 characters,&nbsp;longer sentences are trimmed down and shorter sentences are padded with spaces.</p>

  <p>Once the matrix is computed, it is possible to apply the convolutions. Crepe combines convolution, activation and pooling layers while VDCNN uses also residual layers.&nbsp;&nbsp;</p>

  <p>Two years ago, we shared the code for these models, but the repo was deleted and since then we have been asked many times to make the code available again. This is what we did on this repo where you can find the <a href="https://github.com/miguelgfierro/sciblog_support/tree/master/Cloud-Scale_Text_Classification_with_CNNs_on_Azure" target="_blank">Crepe and VDCNN models in Python and R</a>.&nbsp;</p>

  <p>A final word about new advancements on NLP. Character convolutions have been replaced by the new Transformer architecture, becoming the state of the art. Newer models like <a href="https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf" target="_blank">GPT-2</a>, <a href="https://arxiv.org/abs/1901.11504" target="_blank">MT-DNN</a>, <a href="https://arxiv.org/abs/1901.02860" target="_blank">Transformer-XL</a> or&nbsp;<a href="https://arxiv.org/abs/1810.04805" target="_blank">BERT</a>&nbsp;have push yet again the borders of science forward.&nbsp;</p>


title: Revisiting the Revisit of the Unreasonable Effectiveness of Data
slug: revisiting-the-revisit-of-the-unreasonable-effectiveness-of-data
pub_date: 2019-07-27
keywords: deep learning; optimization; data augmentation
authors: Miguel González-Fierro
meta_description:
  Revisiting the unreasonable effectiveness of data twice focusing on data generation and data augmentation

abstract:
  In this post we revisit the revision of the Unreasonable Effectiveness of Data in the hope that it empowers the deep learning community to keep revising old ideas.

content:
  <p>I always wanted to join the club of artistic titles such as<em>&nbsp;Learning to Learn by Gradient Descent by Gradient Descent</em>, <em>Attention Is All You Need</em>, <em>You May Not Need Attention</em> (a response to the previous article),&nbsp;<em>CNN Is All You Need</em> (not written by LeCun) or LSTM is All You Need (<a href="https://twitter.com/ajmooch/status/1038002747512156160" target="_blank">not written</a> by&nbsp;Schmidhuber and Schmidhuber). Thus this post&#39;s&nbsp;title.</p>

  <p>In 2009,&nbsp;Alon Halevy, Peter Norvig, and Fernando Pereira from Google published a <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/35179.pdf" target="_blank">paper</a>&nbsp;entitled&nbsp;<em>The Unreasonable Effectiveness of Data</em>, addressing the impact on NLP&nbsp;that having large amounts of data produced.</p>

  <p>Later in 2017, a&nbsp;team at Google published a&nbsp;<a href="https://ai.googleblog.com/2017/07/revisiting-unreasonable-effectiveness.html" target="_blank">revisit</a> of&nbsp;the original paper entitled&nbsp;<em>Revisiting the Unreasonable Effectiveness of Data</em>, where they address the effect of data in deep learning. In their paper, they validate the following hypothesis:</p>

  <p>(1) Large scale data helps in <a href="https://en.wikipedia.org/wiki/Feature_learning" target="_blank">representation learning</a>. (2) Performance increases logarithmically based on the volume of training data. (3) Capacity is crucial.</p>

  <p>Point (1) is in line with the two latest SOTA for image classification on ImageNet dataset. In <a href="https://arxiv.org/abs/1805.00932" target="_blank">2018</a>,&nbsp;a&nbsp;<a href="https://miguelgfierro.com/blog/2017/a-gentle-introduction-to-transfer-learning-for-image-classification/" target="_blank">transfer learning</a>&nbsp;approach was used with billions of tagged images from Instagram. Recently this year, researchers used a billion images and a smart trick in the <a href="https://arxiv.org/abs/1906.06423v2" target="_blank">image resolution</a> to beat the SOTA again.</p>

  <p>Point (2) is in line with what can be seen in most&nbsp;<a href="https://paperswithcode.com/sota" target="_blank">SOTA benchmark</a>. Even though I wonder whether the reason is that the metrics we are using&nbsp;are constrained between 0 and 1.</p>

  <p>Point (3) can also be observed in network development&nbsp;in recent years.</p>

  <p>In my opinion, there is an important point missing by the authors: (4) Optimization tricks help.</p>

  <p>Over the years&nbsp;researchers have proposed different methods like&nbsp;<a href="https://en.wikipedia.org/wiki/Dropout_(neural_networks)" target="_blank">dropout</a>,&nbsp;<a href="https://en.wikipedia.org/wiki/Residual_neural_network" target="_blank">residual networks</a>&nbsp;or the&nbsp;<a href="https://towardsdatascience.com/intuitive-understanding-of-attention-mechanism-in-deep-learning-6c9482aecf4f" target="_blank">attention mechanism</a>. All these solutions are tricks to try to optimize better the network and reduce&nbsp;<a href="https://en.wikipedia.org/wiki/Overfitting" target="_blank">overfitting</a>.</p>

  <p>The two latest SOTA in COCO illustrates the last point. In 2017,&nbsp;<a href="https://arxiv.org/abs/1711.07240" target="_blank">MegDet</a> used an optimization trick to win COCO2017 challenge. This month the SOTA was beaten by a small amount using&nbsp;<a href="https://arxiv.org/abs/1906.11172" target="_blank">Auto-augment</a>, where a data generation method is developed.</p>

  <p>It will be exciting to see who will win in the battle of optimization vs data augmentation (see&nbsp;some <a href="https://github.com/miguelgfierro/sciblog_support/blob/master/Data_Generation/data_generation.ipynb" target="_blank">code examples</a>).</p>


title: Understanding XLNet and its implications for NLP
slug: understanding-xlnet-and-its-implications-for-nlp
meta_description: Understanding XLNet, a new SOTA algorithm in NLP
pub_date: 2019-11-19
keywords: nlp; xlnet; bert
authors: Miguel González-Fierro
abstract:
  Last year BERT revolutionized NLP and since then there have appeared a large number of improvements over the original implementation: MT-DNN, RoBERTa, AlBERTa. The main feature of these models is their autoencoding nature. On the other hand, a group of autorregressive methods have been proposed like Transformer-XL, GPT-2 or XLNet. In this short post we want to give a short overview of XLNet and its nature and how it compares with BERT.

content:
  <p>Pretrained methods have revolutionized NLP, surpassing in some cases the human-level accuracy in language understanding, as can be seen in&nbsp;the <a href="https://gluebenchmark.com/leaderboard" target="_blank">GLUE benchmark</a>. These methods typically train large neural networks on massive text corpora of unlabeled data, this process is called pretraining, and then finetune the model on downstream tasks such as text classification, entailment, q&amp;a, named entity recognition, etc.&nbsp;</p>

  <p><a href="http://arxiv.org/abs/1810.04805" target="_blank">BERT</a>&nbsp;is clearly one of the most exciting advances in NLP. BERT belongs to the family of&nbsp;denoising autoencoders (AE). It replaces a&nbsp;small percentage of the input tokens, a process called masking, with symbols like <span style="font-family:Courier New,Courier,monospace">[MASK]</span>. During pretraining, the model&nbsp;tries to reconstruct the original tokens&nbsp;from the corrupted data. Intrinsically, BERT is performing data augmentation, which is why LeCun&nbsp;encloses this method under&nbsp;<a href="https://twitter.com/ylecun/status/1123235709802905600" target="_blank">self-supervised learning</a>. Another important feature of BERT is that it learns a&nbsp;bidirectional context, due to its autoencoding nature, which produces a higher performance.</p>

  <p>The other group of successful pretrained methods, like <a href="https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf" target="_blank">GPT-2</a>, <a href="https://arxiv.org/abs/1901.02860" target="_blank">Transformer-XL</a> or <a href="http://arxiv.org/abs/1906.08237" target="_blank">XLNet</a>&nbsp;are&nbsp;autoregressive (AR). They use deep neural networks to model the conditional probability distribution of the output given a text sequence.&nbsp;</p>

  <p>A disadvantage of AR is that they are trained in a unidirectional context (either forward or backward), therefore&nbsp;they don&#39;t model well bidirectional relationships. On the other hand, AE methods like BERT suffers from a pretrain-finetune discrepancy, because the masked tokens are not present during finetuning. This effectively assumes&nbsp;that the predicted tokens are independent of each other, oversimplifying the long-term relationships that normally appears in the text.</p>

  <p>XLNet seeks to combine the advantages of AR and AE models, introducing the concept of&nbsp;permutation language modeling. The model maximizes the expected log-likelihood of the sequence w.r.t all possible permutations of the autoregressive components. For a sequence of length <span style="font-family:Courier New,Courier,monospace">T</span>, there are <span style="font-family:Courier New,Courier,monospace">T!</span> orders for performing an autoregressive factorization. Since the model parameters are shared over all factorization orders, the model will learn from both sides, capturing a bidirectional context&nbsp;similar to AE models.</p>

  <p>In this <a href="https://github.com/microsoft/nlp-recipes/blob/342bf3640d9e3acb9794f65d15d42a3d6bec6bd4/examples/text_classification/tc_mnli_xlnet.ipynb" target="_blank">jupyter notebook</a>, an example of text classification with XLNet is shown.</p>


title: Understanding the Sequential Recommender SLi-Rec
slug: understanding-the-sequential-recommender-sli-rec
meta_description: A short overview of SLi-Rec a sequential recommender that mixes static and dynamic behavior
pub_date: 2019-12-21
keywords: recommendation systems; sequential recommender
authors: Miguel González-Fierro
abstract:
  Sequential recommenders are a hot topic in Recommendation systems. In this post we do a short summary of one of the latest contributions of Microsoft Research: SLi-Rec. This algorithm has a time-aware component, being able to encode static and dynamic user behavior, and a content-aware component, being able to incorporate contextual information.  

content:
  <p><a href="https://www.microsoft.com/en-us/research/uploads/prod/2019/07/IJCAI19-ready_v1.pdf" target="_blank">SLi-Rec</a>, which is short for Short term and Long term preference Integrated RECommender system, is the new state of the art sequential recommender from Microsoft Research Asia.</p>

  <p>The authors&nbsp;designed a recommendation model that encodes long term (static) and short term (dynamic) preferences of users. Furthermore, the model can accommodate contextual features.&nbsp;</p>

  <p>Long term preferences are encoded using a matrix factorization based algorithm: A2SVD (Attentive Asynchronous Singular Value Decomposition) that adds an attention mechanism to&nbsp;Yehuda Koren&#39;s traditional <a href="https://www.cs.rochester.edu/twiki/pub/Main/HarpSeminar/Factorization_Meets_the_Neighborhood-_a_Multifaceted_Collaborative_Filtering_Model.pdf" target="_blank">algo</a>.</p>

  <p>Short term preferences are encoded using a modified LSTM that addresses the problem of time irregularity (time intervals between two successive actions can vary) and semantic irregularity (items within a user&rsquo;s behavior sequence may not always share the same semantic topic).&nbsp;</p>

  <p>For coping with the time irregularity, they add two time gates, one that encodes the absolute temporal distance between current and prediction states, and another one that encodes the relative temporal distance between two consecutive states.</p>

  <p>For coping with the semantic irregularity, the authors&nbsp;add an attention mechanism to filter out&nbsp;irrelevant items and&nbsp;distinguish different levels of influence scores for relevant ones.</p>

  <p>The fusion between short, long term preferences and contextual features, far from being a simple&nbsp;sum, is computed using an attention-based adaptative method. This adaptative methodology allows to control the actions context, if two actions are produced in a short period, the short term preference should be more informative, however, if an item is related to another item that the user has interacted with&nbsp;in the past, the long term preference component should be more informative.&nbsp;&nbsp;&nbsp;&nbsp;</p>

  <p>In a production scenario, the long&nbsp;term component of the model can be computed offline, while the short term can be computed in real-time&nbsp;using the&nbsp;more recent user-item historical behavior. For people interested in SLi-Rec algorithm, a Tensorflow implementation&nbsp;can be found in the <a href="https://github.com/microsoft/recommenders/blob/c09a882e53c409631072d493611eebbf514c2300/notebooks/00_quick_start/sequential_recsys_amazondataset.ipynb" target="_blank">Recommenders repository</a>.</p>


title: ASROB 10th anniversary
slug: asrob-10th-anniversary
pub_date: 2019-12-31
keywords: asrob; robotics; education
authors: D. Estévez, J. Isabel, V. González Pacheco, J. González Víctores, M. González-Fierro
meta_description:
  A retrospective to the history of ASROB (the Robotics Society of Universidad Carlos III Madrid) on its 10th anniversary

abstract:
  This year 2019, was the 10th anniversary of ASROB, the robotic student society at the University Carlos III in Madrid. It is exciting to see that the organization is still thriving, that new students are joining it and that many projects are being developed. In this post we review the history of the organization and reflect on the reasons for its success.

content:
  <h4 class="section">Origins of ASROB</h4>

  <p>As many good ideas, it all started with a group of friends having a beer in a bar near University Carlos III (UC3M) in Madrid.</p>

  <p>We were studying the MSc in Robotics there and we all wondered how we could put our learnings into practice. We were convinced that there&rsquo;s no better way to learn robotics than hands-on experience. So, why not create a venue where we could build and program our own robots? We quickly realised that the University&rsquo;s student organizations would be the best vehicle to our initiative. The University provided a small space plus some funding to develop our projects. A student organization&nbsp;also would be a great channel to attract other students with the same curiosity and drive we had.</p>

  <p>In January 2009 <a href="https://asrob.uc3m.es/" target="_blank">ASROB</a> (ASociaci&oacute;n de ROB&oacute;tica) was born with the objective of promoting robotics, electronics, programming, and technology among the student community at the University. Our objective was to develop projects related to those areas and attract both undergrads and grad students (both MSc. and PhD).</p>

  <p><img alt="" height="300" src="/img/upload/2021/03/17/300px-logo_oficial.png" width="300" /></p>

  <p>We wanted to create an open community where everyone can learn from others. Hence, we opened the community to anyone who would be interested in joining, no previous experience nor requirements were asked. More senior members would help newer ones providing their advice, experiences and knowledge.</p>

  <h4 class="section">Governing and Organisation</h4>

  <p>The way ASROB was organized was by a governing board and several work groups. The governing board was composed of the leaders of each working group. In the board meetings people would discuss which projects to work on, what activities to do, etc. The leads were responsible for the success and advancement of each working group. They also had to help newer members to ramp up with the tools and methodologies of the project. Members were free to work in any project of their interest, in fact many of us participated in several projects at the same time. The only limits were available time and energy.</p>

  <p>An interesting part of the governing process is that any ASROB member can become a leader and member of the board. The only requirement is a commitment to work and develop a project. So the process is bottom-up, those interested in contributing will get more responsibilities. This is the complete opposite of traditional organizations, where leaders will select the bottom part of the organization. &nbsp;</p>

  <p>After several years experimenting and learning, in 2016 we decided to improve ASROB&rsquo;s management by increasing the flatness and openness of our society. The governing board was dissolved in favor of a democratic system in which all the important decisions were made by voting. This way, all members would have equal rights to participate and give their opinion. This new system was supported using several online tools. For communication and discussion of common matters a public <a href="https://t.me/joinchat/ADT1EAgigvgsuobGUHMl_w" target="_blank">Telegram</a> group was created. <a href="https://github.com/asrob-uc3m" target="_blank">GitHub</a>, a platform originally intended for storing and managing code was &#39;hacked&#39; to serve as a platform to keep an open track of the &#39;issues&#39; that affected our organization, and discuss how to solve them. As a consequence, we observed that, after these changes, there was an increase in the participation and engagement of new members, as they could learn what were the issues being worked on at any time, and felt that their opinion was important and being taken into account.</p>

  <h4 class="section">Projects</h4>

  <p>Through these 10 years, ASROB projects have been related to 5 main lines of work: humanoids, mobile robots, drones, 3D printers and robot devastation.</p>

  <h5 class="subsection">Humanoids</h5>

  <p>Humanoids robots were one of the <a href="http://wiki.asrob.uc3m.es/index.php/Mini-Humanoide" target="_blank">first lines of work</a> in&nbsp;ASROB, and because of that, it has had different phases. The group is focused on low-size humanoids robots, shorter than 50cm. At the beginning of the project, the main platform used was the <a href="https://robosavvy.com/store/hitec-robonova-1-kit.html" target="_blank">Robonova</a>&nbsp;from Hitec. These robots were hacked by members of ASROB to participate in robotics&nbsp;competitions. We participated in some of them, like <a href="https://miguelgfierro.com/docs/gonzalez-fierro2010educational.pdf" target="_blank">Robochallenge</a>&nbsp;in Vienna and <a href="http://www.ceabot.es/" target="_blank">CEABOT</a>&nbsp;in Spain, with encouraging results. In Vienna, the results were first position in sumo and second position in running. In CEABOT 2012 we obtained the second position.&nbsp;&nbsp;&nbsp;</p>

  <p>After that, in 2012, ASROB acquired some <a href="http://www.robotis.us/bioloid-1/" target="_blank">Bioloid</a>&nbsp;robots from Robotis, which were the base for a lot of undergraduate&nbsp;and master theses. Ceabot was the main workbench and target for the developments made, and because of that, for a long time we counted with a full-size replica of the official competition scenario.</p>

  <p>In 2014, following the boom of the 3D printers, the group decided to create its own open-source 3D printable humanoids,&nbsp;<a href="https://myodrobotica.wordpress.com/" target="_blank">MYOD</a>, which stands for Make Your Own Droid. This initiative created&nbsp;four functional prototypes. These prototypes were so affordable that every member that would be interested would be able to build their own customized robot. Over the years, a lot of projects were developed including fields like locomotion, path planning, computer vision, electronic design, 3D modeling, etc.</p>

  <h5 class="subsection">Mobile robots</h5>

  <p>There have been several lines of development of mobile robots in ASROB. One of the first projects was <a href="http://wiki.asrob.uc3m.es/index.php/Proyecto_Ecro" target="_blank">ECRO</a> (Earth Civil Robot), whose objective was to create an autonomous mobile platform. The development included mechanics, electronics, control, communications and computer vision.</p>

  <p>In later years, there was a particular group called <a href="http://wiki.asrob.uc3m.es/index.php/RPC" target="_blank">RPC</a> (Personal Competition Robots), whose main objective is to create small mobile robots for competitions. The electronics were based of arduinos and Raspberri Pi&rsquo;s and most of the parts were printed with a 3D printer. In subsequent years, a similar initiative appeared as new members joined ASROB,&nbsp;the project <a href="https://asrob.uc3m.es/workgroups/2017-09-19-robofactory.html" target="_blank">Robot Factory</a></p>

  <h5 class="subsection">Drones</h5>

  <p>Aerial robots was another interesting and bold line of development. The original objective was to hack commercial drones to create an autonomous UAV (Unmanned Aerial Vehicle) that would stabilize itself and avoid obstacles automatically. This was really challenging and in later years, the group <a href="https://asrob.uc3m.es/workgroups/2018-10-02-fenix.html" target="_blank">FENIX</a>, focused on upgrading and modifying commercial drones and racing with them.&nbsp;</p>

  <h5 class="subsection">3D printers</h5>

  <p>The group of <a href="https://asrob.uc3m.es/workgroups/2017-05-28-printer-one.html" target="_blank">3D printers</a> has been extremely successful. The original objective was to create 3D printers that printed other 3D printers. A large number of members participated in the initiative, giving birth to the <a href="https://www.reprap.org/wiki/Proyecto_Clone_Wars" target="_blank">Clone Wars</a> community, which later became a spin-off from ASROB as a stand-alone society so it could reach a much bigger scope (in fact Clone Wars became the first and biggest Spanish 3D printing community). Any member of ASROB could print anything they wanted for free and so more than 100 3D printers were made. Many of the robots of ASROB were made with 3D-printed parts. &nbsp;&nbsp;</p>

  <h5 class="subsection">Robot Devastation</h5>

  <p>The objective of <a href="https://asrob.uc3m.es/workgroups/2017-05-28-robot-devastation.html" target="_blank">Robot Devastation</a> is to develop a video-game with real robots&hellip; and the real robots that compose the game! The setup is that of a first-person shooter, where the environment is the first-person view of the robot you control, rather than some game map stored in computer memory. Robots are low-cost and developed by students, using components such as Raspberry Pi&rsquo;s, webcams, hobby servo-motors, and of course 3D-printed parts. Currently, robots detect each other by means of QR codes placed as &ldquo;licence plates&rdquo;, through which they can identify if they are on the same team. Explosions are performed through augmented reality in the HUD the player visualizes, and sounds are very realistic (including the <a href="https://github.com/asrob-uc3m/robotDevastation/blob/581e2937564c8836413bbd85cef0db4cd81a2aee/share/sounds/RobotDevastationBSO.mp3" target="_blank">Original Soundtrack</a>)!</p>

  <p>In the next video, a summary of 10 years of development, fun and lots of robots is shown.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=8HWql9BA_Uo">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe allow="encrypted-media; accelerometer; gyroscope; picture-in-picture" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/8HWql9BA_Uo?rel=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>

  <h4 class="section">In Retrospective</h4>

  <p>ASROB has been and still is an exciting organization. During these&nbsp;10 years, a large number of students have come and gone, creating exciting projects and using&nbsp;their spare time to learn&nbsp;together.</p>

  <p>Probably one of the reasons&nbsp;why the organization has survived all these years is its openness. Anyone can join, there is no experience or previous knowledge&nbsp;required.</p>

  <p>There is a number of&nbsp;people that are not satisfied with just attending University and getting an engineering degree.&nbsp;The organization is the home to those that want&nbsp;to learn faster and make projects in the area of robotics, electronics and computer science.&nbsp;In ASROB, we call these people <em>makers</em>.</p>

  <p>At its core, ASROB embodies the famous&nbsp;quote of Isaac Asimov: &quot;Self-education is, I firmly believe, the only kind of education there is&quot;.&nbsp;&nbsp;</p>

  <h4 class="section">Acknowledgements</h4>

  <p>Since the beginning, the research group <a href="http://roboticslab.uc3m.es/roboticslab/" target="_blank">RoboticsLab</a> at UC3M has been a strong supporter of ASROB, providing materials, economic&nbsp;support, space to have meetings and knowledge. Many ASROB members ended up doing their MSc and PhD theses in the group. ASROB&nbsp;will always be in debt for such generosity and support.&nbsp;</p>


title: A Gentle Introduction to Contextual Bandits
slug: a-gentle-introduction-to-contextual-bandits
meta_description: Introduction to Contextual Bandits for online reinforcement learning
pub_date: 2020-04-01
keywords: contextual bandits; online learning; recommendation systems
authors: Markus Cozowicz and Miguel González-Fierro
abstract:
  Contextual bandits are a simplified type of reinforcement learning algorithm that use contextual information about the environment to make decisions in real-time and require reward at every step. They can be used for applications such as news recommendation, ads placement on a website, financial portfolio design to name a few. In this post, we give an overview of contextual bandits and explain how they can be used.

content:
  <h4 class="section">Multi-Armed Bandits</h4>

  <p>Let&#39;s say you go to a casino and you want to maximize your cash return playing&nbsp;on a series of slot machines. You need to divide your time between trying to explore multiple machines to see which one&nbsp;gets the highest payout and exploit the one that is paying the most so far. This problem captures the&nbsp;<a href="https://en.wikipedia.org/wiki/Multi-armed_bandit">Multi-Armed Bandit</a>&nbsp;scenario, a type of reinforcement learning algorithm where an agent wants to maximize the total cumulative reward for actions taken over a sequence of iterations, but where the feedback is incomplete, as you can only pull one slot-machine at a time.&nbsp;At any given iteration, the agent can only observe the reward of the chosen action but doesn&#39;t know the reward for the other actions.</p>

  <p>The problem of incomplete feedback is what researchers call the exploration-exploitation dilemma. The agent needs to exploit the most promising known set of actions or policy to get a reward, but at the same time, it needs to explore other actions that could provide a higher future reward. Intuitively, if we have a news recommendation system, it&nbsp;can&#39;t learn that a particular article about science generates more clicks&nbsp;than one about football&nbsp;if we only show the science article to the users. The challenge is to find the right balance between exploration and exploitation.</p>

  <p>The multi-armed bandit setting, however, doesn&#39;t use information about the environment, which in many cases can be beneficial for the learning algorithm. In the news recommendation example before, it would useful to incorporate into the model information about the articles visited by the user in the past or the user demographics. Contextual bandits solve this problem.</p>

  <h4 class="section"><strong>Contextual Bandits</strong></h4>

  <p>The term contextual bandits was coined by John Langford in 2007 to integrate side information (context) into multi-armed bandits [4].</p>

  <p>The contextual bandit problem is stated in the following way: in&nbsp;each iteration, an agent is presented with an n-dimensional feature vector that encodes the context. The agent uses the current context vector, the past context vectors and the rewards of the actions taken in the past to choose the action to take in the current iteration. After a number of iterations, the agent is able to learn the intrinsic&nbsp;relationships between context vectors and reward to predict the sequence of actions that maximize the total cumulative reward. The contextual information that the agent can use can be static, like user demographics or item information, or dynamic, like location or time of the day.</p>

  <p>As with many reinforcement learning algorithms, contextual bandits work better in a real-time setting. Real-time execution needs a different set of&nbsp;optimizations and requirements in comparison with traditional machine learning execution.</p>

  <h5 class="subsection"><strong>Online learning and optimizations</strong></h5>

  <p>The most common setup for machine learning&nbsp;training is batch training. The learning process is typically divided into two separate phases: training and test. In the&nbsp;training phase, the&nbsp;model takes a mini-batch of data (a slice of data) and computes stochastic gradient descent to update the model weights. This operation is repeated until the model has seen all the mini-batches. A complete round is usually called an epoch, and the model is trained for a number of epochs. In the test phase, the model makes a prediction over a data partition that wasn&#39;t shown in the previous phase to evaluate its performance.</p>

  <p>Online learning algorithms take just one data point and recalibrate the model weights before making the prediction. Typically,&nbsp;online learning makes use of simple algorithms over complex ones like neural networks, they are less vulnerable to concept drift in comparison with batch learning methods,&nbsp;works well in dynamic environments, uses a smaller memory footprint and are computationally faster. Based on these features they are used in real-time settings. They have some disadvantages: they are highly vulnerable to DDoS attacks, which can break the training process. They can become skewed towards a particular class&nbsp;if there it receives too many examples of that class.&nbsp;</p>

  <p>A common setup is to have a hybrid architecture of online and offline models. The online model is able to adapt to a dynamic environment and capture real-time trends. The offline model can be used to experiment with different hyperparameters or algorithms, to make sure that the model is not overfitting or underfitting and for other tasks.</p>

  <p>A good way to optimize&nbsp;memory consumption and improve scalability is&nbsp;feature hashing. For this, one of the most popular online learning libraries, <a href="https://github.com/VowpalWabbit/vowpal_wabbit" target="_blank">Vowpal Wabbit</a>&nbsp;(VW), uses the <a href="https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Feature-Hashing-and-Extraction" target="_blank">hashing trick</a>. The idea is to encode the features using a hash instead of loading the training data into memory like traditional machine learning algorithms. This trick produces an important characteristic, the memory footprint of the system is always constant independently of the data size.</p>

  <h5 class="subsection"><strong>Applications of Contextual Bandits</strong></h5>

  <p>Personalized news recommendation: From [1], a&nbsp;user requests a homepage and the machine learning system&nbsp;must decide how to order the articles on the page. If a user is logged in, there is context: demographics (e.g., age, location) and the topics of news stories they have clicked on in the past; otherwise, only the&nbsp;location is available. The action choices are a set of selected articles which are featurized and added to the model. The reward signal is clicks.</p>

  <p>Ad placement on a website: From [4]&nbsp;a number of ads (arms) are available to be placed on a number of web-pages (context information), the user profile can be also added as context information if available. Each visit can be regarded as a random sample of the context information from an unknown distribution that the algorithm has to learn. The reward is the revenue generated when the visitor clicks on an ad and the goal is to maximize the cumulative expected revenue by placing the most relevant ad for each user.&nbsp;</p>

  <p>Website component optimization: From <a href="http://github.com/DeaconDesperado/flask_mab" target="_blank">this example</a>, the objective is to find&nbsp;the optimal label text and color of a button on a website to increase the click-through rate. There are two bandits, one for the color and one for the text, the different color and text options are the arms. The reward signal is clicks. In situations like these, the text and colors variants are generally small to avoid hurting the user experience.</p>

  <p>Tech support assistance:&nbsp;From [1], the system&nbsp;optimizes the response to the user question, trying to minimize human intervention (negative reward). The actions are pointers to potential solutions and the context is user information and previous dialogue elements.</p>

  <h5 class="subsection">Architecture</h5>

  <p>A typical contextual bandits architecture is described in [1].&nbsp;Consider an application APP that interacts with its environment in real-time where the goal is to find a policy that maximizes the average reward over a sequence of interactions.&nbsp;</p>

  <p><img alt="" height="198" src="/img/upload/2021/03/17/contextual_bandits.svg" width="340" /></p>

  <p>Looking at the diagram, the architecture has the following components:</p>

  <p>EXPLORE:&nbsp;It takes as input context features x and an event key k from APP, outputs an action a and observes the reward r only for that action.&nbsp;The explore component supports multi-threaded predictions over a locally-stored model, which is critical for front-end applications that serve many concurrent requests. The algorithms available in VW are:</p>

  <ul>
  	<li>&epsilon;-greedy: The prediction of the learned policy &pi;0 is taken with probability 1-epsilon, and with&nbsp;epsilon probability, an action is chosen randomly. &pi;0 might be the baseline deployed in production or the current best guess for an optimal policy</li>
  	<li>Explore-first: Starts with a phase of pure exploration in the first K trials, after the exploration phase the algorithm exploits the leading strategy.</li>
  	<li>Bagging: Different policies are trained using bootstrapping (sampling with replacement).</li>
  	<li>Online cover: Explores all available actions by keeping only a small subset of policies active, this approach is fully described in&nbsp;[2].</li>
  </ul>

  <p>LOG: Generates data by joining each (x, a, p)&nbsp;tuple with its reward r, where p is the probability of the chosen action according to the exploration policy.</p>

  <p>LEARN: This component performs policy training online. Typically, the policy is defined by a light machine learning model, such as linear vectors or decision trees. The component takes a stream (x, a, r, p) of exploration datapoints&nbsp;and train the model online.</p>

  <p>DEPLOY: This component deploys the new model.&nbsp;Typically, a new model is deployed every 10-15 minutes. The deployment time&nbsp;depends on how rich your model is, how changing is the user behavior, and other factors.</p>

  <p>FEATURE GENERATOR: auto-generate features for certain types of content. Any publicly accessible content (e.g., articles, videos, etc.) can be passed to the Feature Generator ahead of time to be automatically featurized and cached&mdash;e.g., text sentiment analysis, video content indexing, etc. These features are inserted on-the-fly by the Explore component before making a prediction involving this content</p>

  <p>OFFLINE LEARNER: it is used for offline experimentation, such as hyperparameter tuning, evaluating learning algorithms or policy classes, changing the reward metric, etc. Some of the algorithms in the Explore component perform policy evaluation. It is possible to&nbsp;evaluate any policy &pi; (i.e., estimate its average reward) regardless of how the data was collected and&nbsp;without actually running them, in real-time. In VW 3 approaches can be used: inverse propensity score (ips), direct method (dm), and doubly robust (dr). These are all detailed in [3].</p>

  <p><strong>References</strong></p>

  <p><span style="font-size:12px">[1] Alekh Agarwal, Sarah Bird, Markus Cozowicz, Luong Hoang, John Langford, Stephen Lee, Jiaji Li, Dan Melamed, Gal Oshri, Oswaldo Ribas, Siddhartha Sen, Alex Slivkins, &quot;Making Contextual Decisions with Low Technical Debt&quot;, 2016.</span></p>

  <p><span style="font-size:12px">[2] Alekh Agarwal, Daniel Hsu, Satyen Kale, John Langford, Lihong Li, Robert E. Schapire, &quot;Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits&quot;, 2014.</span></p>

  <p><span style="font-size:12px">[3] Miroslav Dudik, John Langford and Lihong Li, &quot;Doubly Robust Policy Evaluation and Learning&quot;, ICML, 2011.</span></p>

  <p><span style="font-size:12px">[4] John Langford and Tong Zhang, &quot;The Epoch-Greedy Algorithm for Contextual Multi-armed Bandits&quot;, NIPS, 2007.</span></p>


title: 10 Reasons why AI has developed faster than Robotics
slug: 10-reasons-why-ai-has-developed-faster-than-robotics
meta_description: Reasons why artificial intelligence (AI) has developed much faster than robotics
pub_date: 2020-08-20
keywords: ai; robotics
authors: Miguel González-Fierro
abstract:
  In the last ten years, we have witnessed an explosion in the field of artificial intelligence. AI is everywhere around us, on our computers, our mobiles, our cars. However, a field closely related to AI, robotics, has not developed as much. This post aims to shed some light on some of the reasons why AI has developed much faster than robotics.

content:
  <p>It has been an amazing experience to see the development of both robotics and AI in the last ten years. Having been a researcher in robotics, and having switched to the area of AI, I have witnessed the momentum AI has experienced in comparison with robotics. These are ten points I think&nbsp;contributed to the difference.</p>

  <h4 class="section">1. Human-level Performance</h4>

  <p>Perhaps the most important reason why AI has developed so much is that the level of performance is human-like. In 2015, <a href="https://arxiv.org/pdf/1512.03385.pdf" target="_blank">ResNet</a> from Microsoft surpassed the human-level performance in image classification, Microsoft again achieved the same milestone in <a href="https://www.microsoft.com/en-us/research/blog/microsoft-researchers-achieve-new-conversational-speech-recognition-milestone" target="_blank">speech recognition</a> in 2016. That same year, <a href="http://en.wikipedia.org/wiki/AlphaGo" target="_blank">AlphaGo</a>&nbsp;from DeepMind, beat the world champion of Go&nbsp;and in 2018, Google&#39;s <a href="https://arxiv.org/pdf/1810.04805.pdf" target="_blank">BERT</a>, surpassed the human-level performance in several NLP tasks.&nbsp;</p>

  <p>There is a certain number of super useful applications, like OCR, object detection, speech recognition, etc. that can be&nbsp;used by multiple tech companies to solve common day-to-day problems.&nbsp;</p>

  <p>In contrast, the robotics field hasn&#39;t been that successful. Projects that one or two decades ago were pioneers in the field, like <a href="https://en.wikipedia.org/wiki/Humanoid_Robotics_Project" target="_blank">HRP</a>, <a href="https://en.wikipedia.org/wiki/ASIMO" target="_blank">ASIMO</a>, <a href="https://en.wikipedia.org/wiki/Willow_Garage" target="_blank">Willow Garage</a> were closed. The only company that has achieved a human-level performance is <a href="https://www.bostondynamics.com/" target="_blank">Boston Dynamics</a>, but the science behind their robots is not known by the scientific community.</p>

  <p><img alt="" height="202" src="/img/upload/2021/03/17/asimo.jpg" width="340" /></p>

  <h4 class="section">2. Deep Learning</h4>

  <p>In 2012, a <a href="https://miguelgfierro.com/blog/2016/a-gentle-introduction-to-convolutional-neural-networks/" target="_blank">CNN</a>&nbsp;trained on GPUs achieved a significant improvement in the image classification benchmark <a href="https://en.wikipedia.org/wiki/ImageNet" target="_blank">ImageNet</a>, starting the era of deep learning. Quickly, the research community started&nbsp;to apply deep learning to other areas of computer vision, NLP, speech recognition, reinforcement learning and others. Month after month, the state of the art was overpassed. As of today, we haven&#39;t stopped the rate of improvement.&nbsp;</p>

  <h4 class="section">3. Private Funding of Research</h4>

  <p>Large tech companies like Microsoft, Google, Facebook and others started to invest heavily in AI. In 2014, Google acquired&nbsp;<a href="https://en.wikipedia.org/wiki/DeepMind" target="_blank">DeepMind</a> and in 2015 <a href="https://en.wikipedia.org/wiki/OpenAI" target="_blank">OpenAI</a> was founded. Some well-known researchers in the field like LeCun or&nbsp;Hinton joined&nbsp;tech giants, along with many other researchers.&nbsp;</p>

  <p>The amount of funding has skyrocketed over the last ten years. In 2019, AI startups have&nbsp;raised more than <a href="https://www.statista.com/statistics/1005557/ai-funding-worldwide/#:~:text=AI%20startup%20funding%20worldwide%202012%2D2019&amp;text=The%20statistic%20shows%20the%20artificial,than%20tenfold%20increase%20from%202013." target="_blank">$24B worldwide</a>. That same year <a href="https://news.microsoft.com/announcement/microsoft-expands-ai-investment/" target="_blank">Microsoft</a> announced that the number of employees working on AI would be 5000. Apple currently holds the record of the number of startups acquired, 20, followed by Google that acquired 14 and Microsoft that acquired 10.</p>

  <p>The amount of funding in the field of robotics is much lower. Perhaps the biggest investor is SoftBank, which acquired two of the top robotics companies, <a href="https://en.wikipedia.org/wiki/Aldebaran_Robotics" target="_blank">Aldebaran Robotics</a> and Boston Dynamics.&nbsp;</p>

  <h4 class="section">4. Software vs Hardware</h4>

  <p>Most AI practitioners use virtual machines, so if you break your OS, you just need to boot up a new machine and in 5min you are back to work. In contrast, breaking a robot component can be difficult and expensive to fix.&nbsp;</p>

  <p>For AI, the internet and mobile devices provide data in high quantities. Robots get data through their sensors, and the information needs to be processed in real-time, providing commands to actuators and making sure that the battery has enough power.&nbsp;</p>

  <p>Another important issue is that the hardware part in robotics requires innovations in areas with even less funding like materials, mechanical engineering, electronics or electrical engineering.&nbsp;</p>

  <h4 class="section">5. Opensource</h4>

  <p>Opensource was key to the development of AI. <a href="https://github.com/opencv/opencv" target="_blank">OpenCV</a> and <a href="https://github.com/scikit-learn/scikit-learn" target="_blank">Scikit-learn</a>&nbsp;were the pioneer libraries that paved the way for deep learning libraries like <a href="https://github.com/tensorflow/tensorflow" target="_blank">TensorFlow</a>, <a href="https://github.com/pytorch/pytorch" target="_blank">PyTorch</a> or <a href="https://github.com/apache/incubator-mxnet" target="_blank">MXNet</a>. These libraries facilitated the proliferation and reproducibility of AI research.&nbsp;</p>

  <p>The only comparable effort in robotics was the development of <a href="https://www.ros.org/" target="_blank">ROS</a>, a robotics operating system. While ROS helped to boost robotics research, most hardware components are still proprietary, which slowed&nbsp;the development of the field.</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=c3Cq0sy4TBs">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe allow="encrypted-media; accelerometer; gyroscope; picture-in-picture" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/c3Cq0sy4TBs?rel=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;"></iframe></div>
  </div>

  <h4 class="section">6. Python vs C++</h4>

  <p>In 2018, Python became the <a href="http://pypl.github.io/PYPL.html" target="_blank">most used programming language</a>, and probably AI has a lot to do on that.&nbsp;Python vs C++ is the fight of usability vs optimality. Python made AI easy to use for many people, accelerating its adoption. C++ is still king in robotics, even though there is certain adoption of Python, people still use C++ due to its speed and low memory consumption.&nbsp;&nbsp;</p>

  <h4 class="section">7. Cloud Computing</h4>

  <p>Cloud computing has been one of the key drivers of AI. Nowadays, it is possible to compute large amounts of data relatively cheaply and without taking care of hardware maintenance. Three of the largest tech companies, Microsoft, Google and Amazon, have made significant investments in the cloud business. Microsoft and Google, are doing strong&nbsp;investments in&nbsp;AI research and development. They know that making advances in AI will get more and more companies to incorporate AI workloads into their processes, which has to be computed in a cloud.</p>

  <p>On the contrary, robots tend to use their local computer to operate, so in many cases, the objective is to optimize the computation so the robot is able to react quickly in real-time. The bottleneck for robotics development is not cloud computing per se, it is the lack of a sustainable business that creates a profitable virtuous cycle such as the AI case.</p>

  <p><img alt="" height="351" src="/img/upload/2021/03/17/cycle.jpg" width="340" /></p>

  <h4 class="section">8. Popular Culture</h4>

  <p>Pop culture has played an important role in AI and robotics development. While some stories like Star Wars, Avengers or the books of Asimov picture a world where robots and AIs are&nbsp;our collaborators and share our living space, others, like Matrix or Terminator, envision a future where machines rebel&nbsp;against humanity and try to destroy it. These stories have&nbsp;attracted many people to AI and robotics.&nbsp;</p>

  <h4 class="section">9. Company&#39;s Adoption</h4>

  <p>On a 2020 survey made by <a href="https://www.forbes.com/sites/cognitiveworld/2020/01/23/ai-adoption-survey-shows-surprising-results/#682163cf55e9" target="_blank">Forbes</a>&nbsp;to 1500 industry decision-makers, 40% have at least an AI project implemented and 90% are planning to implement an AI project in the short term, if not already. According to this <a href="https://www.grandviewresearch.com/industry-analysis/artificial-intelligence-ai-market#:~:text=The%20global%20artificial%20intelligence%20market,42.2%25%20from%202020%20to%202027." target="_blank">report</a>, the market size of AI was $39.9 billion in 2019 and it is forecasted to reach $733 billion in 2027.&nbsp;These figures&nbsp;speak very clearly on the current and future adoption of AI by companies.&nbsp;</p>

  <p>Regarding robotics, the traditional industrial robotics market has been active for more&nbsp;60 years, especially in the automotive industry, and reached <a href="https://www.grandviewresearch.com/press-release/global-industrial-robotics-market" target="_blank">$41 billion</a> in 2020. These robots haven&#39;t gone through significant innovations. On the contrary, the market of mobile robots have started to expand, initially by vacuum cleaner robots, valued at <a href="https://www.grandviewresearch.com/industry-analysis/robotic-vacuum-cleaner-market" target="_blank">$2.5 billion</a> in 2019, and more recently, robots for warehouses and logistics, as well as UAVs.&nbsp;</p>

  <h4 class="section">10. Job Opportunities</h4>

  <p>More investment in AI,&nbsp;in addition to higher company adoption, drives a boost in job opportunities. According to <a href="https://www.glassdoor.com/List/Best-Jobs-in-America-2019-LST_KQ0,25.htm" target="_blank">Glassdoor</a>, Data Scientist has been&nbsp;ranked&nbsp;a top job opportunity&nbsp;year after year from&nbsp;2016 in both US and UK. In parallel, the number of <a href="https://www.masterstudies.co.uk/MSc/Artificial-Intelligence/" target="_blank">masters in AI grew</a> as well as <a href="https://www.classcentral.com/subject/ai" target="_blank">free alternatives</a>. Platforms for AI competitions like Kaggle attracted a large number of amateur and professional AI competitors, according to this <a href="https://www.quora.com/How-many-users-does-Kaggle-have" target="_blank">source</a>, in 2020 Kaggle surpassed 5 million registered users.&nbsp;</p>

  <p>In robotics, the number of job opportunities is lower, for many of the reasons explained above.</p>

  <h4 class="section">Future Challenges</h4>

  <p>In the area of robotics, there is a lot of space for improvement. Boston Dynamics is pioneering the era of service robots and they are probably investing in&nbsp;making&nbsp;their robots more autonomous. Also, new competitors may appear in the next years.</p>

  <p>In the area of AI, the current trend of research will continue:&nbsp;more data is needed, which requires larger computation power to train larger neural networks. This will generate more intelligent algorithms, which will provide higher value to companies and citizens.</p>

  <p>This continuous growth in AI could potentially plateau at some point, however, we haven&#39;t reached that point yet.&nbsp;Another possibility of big change is a new theory that doesn&#39;t require massive amounts of data to learn. In this case, it will be harder for tech companies to find the business justification to&nbsp;fund private research, so the virtuous cycle could be broken.&nbsp;There are already successful efforts towards that direction like <a href="https://arxiv.org/abs/2005.14165" target="_blank">few-shot learning</a>, or maybe we need to go back to <a href="https://towardsdatascience.com/rise-and-fall-of-symbolic-ai-6b7abd2420f2" target="_blank">symbolic AI</a>.</p>

  <p><em>I would like to thank V&iacute;ctor Gonz&aacute;lez Pacheco for reviewing the article and for his useful suggestions.</em></p>


title: Technology Is Reducing The Cost Of Education
slug: technology-is-reducing-the-cost-of-education
meta_description: How technology is reducing the cost of education
pub_date: 2021-01-17
keywords: technology; education; online courses
authors: Artur Meyster and Miguel González-Fierro
abstract:
  Technology is transforming education dramatically. With rising college costs in the US and Europe, many students face the challenge of going into debt to earn a college degree. Fortunately, the EdTech industry has developed remarkably in recent years, reducing costs and increasing learning opportunities for more people.

content:
  <p dir="ltr">The cost to receive an education seems like it won&#39;t stop rising as public and private colleges raise tuition every year. Higher education&#39;s increased costs are hurting low-income students by forcing them to take on more student debt or drop out altogether. Those fortunate enough to afford the rising costs are paying off students loans for longer periods. College degrees are a requirement for most well-paying jobs, which makes people feel the need to burden themselves with the expense of earning another degree.&nbsp;</p>

  <p dir="ltr">Fortunately, technology is stepping in to offer cost-effective ways of learning new skills. <a href="https://www.forbes.com/sites/forbes-personal-shopper/2020/04/02/3-of-the-best-online-learning-platforms/?sh=2a0eebc04c51" target="_blank">EdTech companies</a> offer subscription services that are significantly cheaper (if not free) than learning the same skills at a local college. Many of these skills are directly transferable to jobs or side-hustles. For as little as $100 a year, you could take any number of online classes that would cost thousands at a traditional school.&nbsp;</p>

  <h4 class="section">There Are More Free Learning Options</h4>

  <p dir="ltr">Ambitious individuals no longer need to lock themselves in a library to learn as much as possible. Mobile devices, podcasts, and audiobooks make learning possible no matter where you are in the world or what you are doing. The dreaded commute is becoming a learning space for drivers who listen to podcasts and books that push their thinking. Every moment of downtime can be a learning moment with e-books or scholarly articles available on mobile devices.&nbsp;</p>

  <p dir="ltr"><img alt="" height="227" src="/img/upload/2021/03/17/luke-chesser-rcowmc8qf8a-unsplash.jpg" width="340" /></p>

  <p dir="ltr">&nbsp;</p>

  <p dir="ltr">Podcasts and e-books loaned from the library are free tools that self-starters use to gain knowledge about their current or future careers. These resources, which give people access to experts in fields that would only be accessible via magazines and newspapers, are available for free to the entire public.&nbsp;</p>

  <p dir="ltr">There are more formal forms of free education options online, as well. Websites like Coursera and Udemy give learners access to thousands of hours of free educational content. They even offer online certificates or college degrees for computer science skills. You have to pay to earn the certificate, but the learning materials are entirely free. The free resources are excellent tools for figuring out what topics you are interested in before pursuing a specialization for your <a href="https://onlinedegreehero.com/degrees/online-bachelors/" target="_blank">bachelor&#39;s degree</a>.&nbsp;</p>

  <h4 class="section">Self-Paced Education Is Filling Gaps&nbsp;in the Education Industry</h4>

  <p dir="ltr">Until recently, earning a degree entailed attending weekly classes (in-person or online), weekly homework, and a course-encompassing final project. The regimented schedule created conflicts for people who couldn&rsquo;t take time off work or had other responsibilities during normal business hours. The advent of self-paced courses gives people who have unpredictable schedules the chance to earn higher degrees in the free time they can find.&nbsp;</p>

  <p dir="ltr">Self-paced courses often don&#39;t require a professor to monitor learning or even deliver lectures since everything is available all at once. A professor might teach the same class for years, with only minor alterations to the content. For this reason, video-based and static courses are feasible and can earn accreditation to count towards <a href="https://onlinedegreehero.com/degrees/online-associates/" target="_blank">associate&#39;s degrees</a>.&nbsp;</p>

  <p dir="ltr">Self-paced courses are largely available for free through massive open online courses (MOOCs). These free classes are from prestigious universities with names like Harvard, Yale, and MIT. They aren&#39;t just entry-level courses either; they cover complex physics theorems and innate architectural eras. Basically, if there is a topic that interests you, you can learn about it in a free online course.&nbsp;</p>

  <h4 class="section">Upskilling Is No Longer Optional</h4>

  <p dir="ltr">Technology is creating a catch 22 by lowering the time and cost requirements for learning new skills. Technology is changing at a rapid pace, and the only way to keep up is to regularly learn new skills. <a href="https://marketscale.com/industries/education-technology/new-report-emphasizes-the-importance-of-upskilling/" target="_blank">Upskilling</a>&nbsp;is a constant endeavor to stay on the leading edge of your industry. Because there are fewer barriers to learning new skills, employees have to keep learning new skills to ascend the corporate ladder. Those who don&#39;t earn their <a href="https://onlinedegreehero.com/degrees/online-masters/" target="_blank">master&#39;s degrees</a> are more likely to be stagnant in their current position.&nbsp;</p>

  <p dir="ltr"><img alt="" height="255" src="/img/upload/2021/03/17/brett-jordan-kuemuodzepy-unsplash.jpg" width="340" /></p>

  <p dir="ltr">Luckily, upskilling is just as important to employers as it is to employees. Companies that don&#39;t invest in giving their employees new skills will lose out when their competition offers newer, faster, and more comprehensive services. Companies offer significant tuition benefits to help employees develop new skills through college or <a href="https://careerkarma.com/blog/the-best-online-certificate-programs/" target="_blank">certification courses</a>; some even cover the entire bill.&nbsp;</p>

  <p dir="ltr">Technology is helping to reduce college costs while increasing the need to continually invest in education. Overall, technology is making education more affordable and helping it have a longer-lasting impact.&nbsp;</p>


title: Book review: Influence by Robert Cialdini
slug: book-review-influence-by-robert-cialdini
meta_description: Book review of Influence the psychology of persuasion by Robert Cialdini
pub_date: 2021-02-15
keywords: book review; influence; psychology
authors: Miguel Gonzalez-Fierro
abstract:
  Influence: The Psychology of Persuasion by Robert Cialidini describes what are the mechanisms that make us become influenced by other people. The book is full of anecdotes, experiments and stories about the six principles of persuasion: reciprocation, commitment and consistency, social proof, liking, authority and scarcity. What follows is a summary of the key ideas of the book. 

content:
  <p>Influence, by Robert Cialdini, is one of these books everyone should&nbsp;read. It explains how we are influenced and how to defend ourselves against people trying to manipulate us.</p>

  <p>There are six&nbsp;principles of influence:&nbsp;reciprocation, commitment and consistency, social proof, liking, authority and scarcity. There is an well-known additional one, self-interest,&nbsp;not discussed in the book.</p>

  <p>We use shortcuts to deal with our complicated stimulus environment, these are automatic behaviors that save us the time and energy of thinking. One example is the contrast principle of human perception. It affects the way we perceived two things&nbsp;presented one after another. If the second item is very different from the first one, we tend to see it as more different that it actually is.</p>

  <p>The first principle of persuasion is reciprocation, we try to repay in kind what another person has provided us. The reciprocity rule is so strong that even unwanted gifts can trigger the effect of obligation.&nbsp;</p>

  <p>The consistency principle makes us fool ourselves in order to keep our thoughts and beliefs aligned with what we have done or decided. To trigger this principle, social psychologist say that the key is commitment. If you take a stand and commit to perform an action, you will be stubbornly consistent with the action, even if it is contrary to your best interest.</p>

  <p>By the principle of social proof we tend to determine what is a correct behavior based on what others think it is correct. The effect is bigger when the action is provided by a lot of people.</p>

  <p>We are influenced by people&nbsp;we like such as friends, neighbours, attractive people, people similar to us in traits like opinion, background, demographics,&nbsp;life-style, and&nbsp;people that give&nbsp;us compliments.&nbsp;</p>

  <p>Authority provides a sometimes valuable shortcut for deciding how to act in a situation. Interestingly, we are often as vulnerable to the symbols of authority, like the title of a doctor or the clothing of a security guard, than to the person possessing that authority.</p>

  <p>The last principle of persuation, scarcity, plays a fundamental role in human decision making. People seem more motivated by the thought of losing something than by the thought of gaining something of equal value.</p>


title: My personal quest to become the best version of myself
slug: my-personal-quest-to-become-the-best-version-of-myself
meta_description: How I work every day to become the best version of myself and take care of my family
pub_date: 2021-03-21
keywords: personal growth; success mindset
authors: Miguel González-Fierro
abstract:
  Every day of my life I try to get a little bit better, grow in some dimension, learn something new and take care of my family. In order to achieve this, I set internal goals and deadlines to push myself forward and measure the results of the actions I take.

content:
  <p>In my personal quest to become the best version of myself, I set personal goals which I review every day.</p>

  <p>Here is my list:</p>

  <h4 class="section">Sleep 6.30h</h4>

  <p>I typically need&nbsp;between 6-7h of continuous sleep to be productive. Before having children, my goal was to sleep 5.30h a day, which supposed an effort over my baseline. However, in the last 4 years, since I had kids, it was rare to have 3 days in a row that I don&#39;t have to wake up in the middle of the night to take care of my children. So sleeping 6.30h has been my new challenge.</p>

  <h4 class="section">Exercise</h4>

  <p>I follow a training routine from a friend of the Spanish riot police 4 days a week. It involves high-intensity routines that I can do from home, so there is no need for me to go to a gym. I train on Tuesdays, Thursdays, Saturdays, and Sundays. There is no single day so far I failed to train. At the end of the year, I have the goal of growing at least 5cm in my chest perimeter.</p>

  <p><img alt="Habits app with daily goals" height="421" src="/img/upload/2021/03/21/habits.jpeg" width="300" /></p>

  <h4 class="section">Diet</h4>

  <p>I follow a diet of certain proteins, kcal, etc, 5 days a week, which I have been struggling to follow. My wife is an amazing cook and I really love food. I have a spreadsheet with the nutrition values of all the foods I eat, and almost every day I track the kcal and proteins I ingest. My cheat days are Saturdays and Sundays when I also train to balance a little.</p>

  <h4 class="section">Making my wife happy</h4>

  <p>I put a lot of effort into this task every day. I consider it achieved if she confirms that her day has been great, which is not always the case. I only look at the result, not whether I have done an effort to make it happen. For example, last Thursday, our daughter was awake from 4 am to 6 am, my wife couldn&#39;t sleep well, so I knew it was going to be super difficult to tick the day.</p>

  <h4 class="section"><strong>Children development</strong></h4>

  <p>5 days a week I&nbsp;do language and math with my children, guess what&#39;s my favourite? We follow the Montessori methodology and so far it has been working pretty well. On top of that, language&nbsp;is one of the most important skills I want them to master. I want them to be native in both English and Spanish. In addition, they are learning Chinese. Before the pandemic started, every weekend we went to Chinese class, but during the lockdown, the only thing I have done was to make them watch TV in Chinese.&nbsp;Now that things are opening up, my wife and I need to decide what is the best way for them to learn Chinese.</p>

  <p>If my children are fluent in Spanish and English, and have&nbsp;certain knowledge of Chinese, there will be few places in the world where they will not be able to communicate with others.&nbsp;&nbsp;</p>

  <h4 class="section">Taking&nbsp;care of myself</h4>

  <p>I&#39;m not particularly good at this task.&nbsp;It&nbsp;involves dedicating time to myself to relax or think. I have been trying to find time during the day, but I honestly struggle since my days are pretty packed.</p>

  <h4 class="section">Learn tech&nbsp;</h4>

  <p>At least once a week I learn something new related to technology, it can be reading a paper, watching a YouTube video, doing a technical review on my blog&nbsp;or similar. It has to be&nbsp;something outside of my day-to-day work. Over the years, getting knowledge outside my day-to-day job has helped me to become a more effective professional and grow personally.</p>

  <h4 class="section">Learn sales or marketing&nbsp;</h4>

  <p>I have been focusing on this task at least 5 days a week. I&#39;m particularly interested in digital marketing, influence and&nbsp;communication. Learning how to communicate effectively and with clarity is absolutely key in every facet of my life, so I put a lot of effort into this task. The way for me to learn these tasks is through books, podcasts, YouTube videos or courses. I also try to apply what I learn as much as I can to become better and better.</p>

  <h4 class="section">Personal brand&nbsp;</h4>

  <p>I try to share my thoughts and knowledge&nbsp;on Linkedin&nbsp;at least once a day&nbsp;as well as sharing value through my blog. This also helps me to keep myself informed of the news of the day.&nbsp;</p>

  <p>On top of the daily tasks, I have yearly goals that I call resolutions. Every year in January, my wife and I set the goals of the year, and in December, we do a retrospective. The goals are measurable objectives that translate to&nbsp;positive outcomes of the daily tasks, for example, getting my children to count up to 20 in English and Spanish, achieving&nbsp;25k followers on Linkedin, etc. In the retrospective, we evaluate&nbsp;the level of completeness of each of these goals at&nbsp;50%, 75% and 100%. We set goals that are difficult for us to achieve and push ourselves forward, therefore we don&#39;t always&nbsp;achieve all the goals at 100%.&nbsp;</p>

  <p>All these tasks, goals and deadlines are commitments I do with myself, my voluntary obligations. Nobody throws me a party when I abide by them and nobody arrests me when I break them. My own mind is my judge. But over the years I found that making these voluntary obligations is the best way to upgrade myself.&nbsp;</p>


title: Three Unique Ways to Source Top Tech Talent
slug: three-unique-ways-to-source-top-tech-talent
meta_description: In this post we review several ways to find top tech talent
pub_date: 2021-03-29
keywords: hiring; online education; talent
authors: Artur Meyster and Miguel González-Fierro
abstract:
  Online education is attracting more and more interest, especially since the COVID pandemic started. There are particular skills that companies demand that can be learned on focused online courses. Sometimes, the best way to find top talent is by looking for top students going through these courses. In this post, we analyze three sources that companies and head-hunters can monitor to find tech talent.

content:
  <h4 class="section" dir="ltr">The transition to Online Education</h4>

  <p dir="ltr">As the future of work changes drastically, technology will be the driving force behind the change.</p>

  <p dir="ltr">Recent world events have caused the onset of remote work and spurred change surrounding the skills employees are required to have.&nbsp;</p>

  <p dir="ltr">Tech-based skills have started to increase in value whereas traditional skills are slowly falling to the wayside.</p>

  <p dir="ltr">Technology will never fully replace human workers, but it is becoming more and more clear that the tasks assigned to human workers are going to radically change.</p>

  <p dir="ltr">With that in mind, hiring employees who are proficient with technology and boast a wide array of skills is the best course of action for any company hoping to survive in the future.</p>

  <p dir="ltr">As reported by the <a href="https://www.washingtonpost.com/technology/2020/05/18/facebook-google-work-from-home/">Washington Post</a>, several big-name companies are keeping tech employees on from home, which means attracting talented tech employees will become even harder.</p>

  <p dir="ltr">However, if sourcing is done in the right areas, any company can identify and onboard top tech talent.</p>

  <h4 class="section">Partner with Online Degree Schools</h4>

  <p dir="ltr">Traditional education is still an extremely respected form of education, for good reason, but recent years have seen the number of participants in <a href="https://onlinedegreehero.com/">online degree</a> programs increase at a substantial rate. While technology has enabled remote work, it has also enabled people from all over the world to obtain an education from anywhere.</p>

  <p dir="ltr">Some bright students are unable to pay the tuition required to attend a typical four-year path but receive a very respectable degree in a tech field from an online school. Working closely with these online schools as a partner can help attract talent to your company, while also providing you with a source of untapped tech talent.</p>

  <p dir="ltr">The fact of the matter is that when a candidate is asked <a href="https://careerkarma.com/blog/why-should-we-hire-you/">why they should be hired</a>, it&rsquo;s not about where they went to school, but rather what they learned and the skills they developed. Overcoming the traditional recruitment path can open up the door to previously undiscovered tech talent vying for a chance to prove themselves as resourceful and impactful employees.</p>

  <p dir="ltr"><img alt="Students learning remotely" height="227" src="/img/upload/2021/03/28/christina-wocintechchat-com-npwrwdqo3mw-unsplash.jpg" width="340" /></p>

  <h4 class="section" dir="ltr">Discover Vocational Schools</h4>

  <p dir="ltr">Vocational schools, or trade schools, are similar to online schools in that they do offer courses completely on the computer. However, some trade schools have in-person campuses around the world and in many countries. Unlike a traditional educational path, vocational schools train students for a specific career, using specialized classes, in about a year.</p>

  <p dir="ltr">An example is <a href="https://careerkarma.com/schools/general-assembly">General Assembly</a>, which offers campuses in 35 locations around the world and courses ranging from data science to full-stack development. Options such as this are attractive to prospective students because they often defer tuition until you are able to pay or, in some cases, until you actually land a job following graduation.</p>

  <p dir="ltr">The <a href="https://nces.ed.gov/programs/coe/indicator_cha.asp">National Center for Education Statistics</a> found that vocational school enrollment has actually begun to rival traditional education enrollment, which shows just how popular this option is becoming. Sourcing talented tech employees from vocational schools can give you employees who have some industry experience and all the skills needed to enter a specific career path.</p>

  <h4 class="section">Identify Accredited Bootcamps</h4>

  <p dir="ltr">Not dissimilar to vocational schools, bootcamps are even more intensive forms of education that are centered around one specific career. The trend of educational bootcamps originated with coding bootcamps over the last decade but has evolved dramatically since then. Just to emphasize the variety in tech-based bootcamps, there are now highly-rated <a href="https://careerkarma.com/rankings/best-data-science-bootcamps">data science bootcamps</a> that prepare students for a career in the field.</p>

  <p dir="ltr">Keep in mind that data science is a field that used to require a master&rsquo;s degree, but has recently become more available for anyone willing to learn.</p>

  <p dir="ltr">There are a number of tech fields, such as data science, that offer bootcamps as a form of preparation. Most of these bootcamps are accredited and often provide students with more hands-on industry experience than a traditional path.&nbsp;</p>

  <p dir="ltr">No matter in which country you are, there is likely a tech-based bootcamp near you producing a number of highly skilled potential tech employees every year. Sourcing directly from these can help your company to reduce training expenses that often arise with new graduates from a traditional college or university.</p>

  <h4 class="section">Conclusion</h4>

  <p dir="ltr">At the end of the day, there is nothing wrong with finding tech talent from a university. As the importance of tech skills increases, however, it will also become important to find new locations to source talent from.&nbsp;</p>

  <p dir="ltr">Tech-specific educational institutions, such as trade schools or bootcamps, often offer industry mentors that can help students to be more highly skilled than their university counterparts.</p>

  <p dir="ltr">Recruiting from only one source will only provide a narrow list of candidates when the potential number is, in reality, so much more.</p>


title: A Gentle Introduction to Fourier Transformers for NLP
slug: a-gentle-introduction-to-fourier-transformers-for-nlp
pub_date: 2021-05-23
keywords: nlp; transformer; attention
authors: Miguel González-Fierro
meta_description:
  A gentle introduction to Fourier transformers replacing self-attention with a Fast Fourier Transform

abstract:
  The attention mechanism is responsible for much of the recent success in NLP tasks such as text classification, named-entity recognition, Q&A, translation to name a few. However, computing attention is expensive. In this post, we summarize a new approach that replaces self-attention with a Fast Fourier Transform, which achieves 92% of the accuracy of BERT while being 7 times faster.

content:
  <p>The Transformer architecture is the AI model responsible for the significant advancement in NLP in the last few years.<br />
  <br />
  Its main component is the self-attention mechanism, which learns the importance of each part of the sentence in relation to a word. For example, in &quot;The animal didn&#39;t cross the street because it was too tired&quot;, self-attention associates &quot;it&quot; with &quot;animal&quot;.<br />
  <br />
  However, self-attention is very heavy to compute, it scales with quadratic complexity with respect to the sentence length.<br />
  <br />
  A new solution proposed by Google, <a href="https://arxiv.org/abs/2105.03824" target="_blank">FNet</a>,&nbsp;replaces self-attention with a Fourier transform, which is only 8% less accurate than BERT in the <a href="https://gluebenchmark.com/" target="_blank">GLUE benchmark</a>&nbsp;but 7 times faster to compute in a GPU.<br />
  <br />
  The <a href="https://en.wikipedia.org/wiki/Fourier_transform" target="_blank">Fourier transform</a> is a mathematical operation that transforms a complex temporal signal, into simpler subcomponents defined by a frequency. This operation can be applied to a sentence inside the Transformer architecture as a replacement of the self-attention mechanism. Intuitively, applying a Fourier transform is just encoding the input as a linear combination of the text embeddings.</p>

  <p><img alt="FNet: Fourier Transformer" height="335" src="/img/upload/2021/05/23/1621323242468_fpD8vb7.jpg" width="250" /></p>

  <p>These linear combinations are mixed with simple non-linearities in the feed-forward network. The result is a faster Transformer that is able to competitively&nbsp;understand the semantic relationship in the text in several NLP tasks.</p>

  <p>The question this paper suggests is, do we really need complex non-linearities?</p>


title: Understanding the new project of Elon Musk, the Tesla Bot
slug: understanding-the-new-project-of-elon-musk-the-tesla-bot
meta_description: Understanding the new project of Elon Musk, the Tesla Bot
pub_date: 2021-08-22
keywords: robotics; elon musk; tesla bot
authors: Miguel González-Fierro
abstract:
  Elon Must unveiled a new project to build a full-size humanoid robot, it will be lightweight, with only 57Kg and 40 actuators. The first prototype will be ready next year. After being a researcher for more than 8 years in humanoid robotics, before going full-time into the AI space, here are my thoughts about the Tesla Bot.

content:
  <h4 class="section">The Tesla Bot</h4>

  <p>An unexpected announcement came at the end of the <a href="https://www.tesla.com/AI" target="_blank">Tesla AI day</a> presentation. Tesla is going to build a humanoid robot, the Tesla Bot, using some of the technology that they have already developed in the cars.&nbsp;</p>

  <div data-oembed-url="https://www.youtube.com/watch?v=HUP6Z5voiS8">
  <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture;" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/HUP6Z5voiS8?rel=0" style="top: 0; left: 0; width: 100%; height: 100%; position: absolute; border: 0;"></iframe></div>
  </div>

  <p>According to the brief information provided during the presentation, the Tesla Bot will be lightweight, only&nbsp;57Kg, around 170cm in height, will have a speed of 8Km/h, and will be able to carry a load of 20Kg. The Tesla Bot will have 40 electromechanical actuators and will use a similar Full-Self Driving computer used in the Tesla vehicles.</p>

  <p>Elon also mentioned that a robot like this will have profound implications. This humanoid should be able to move in an environment built by humans, buy groceries for you and learn to do tasks without being explicitly programmed. It will be able to do any manual task that you don&#39;t want to perform. He mentioned that &quot;Essentially, in the future, physical work will be a choice. If you want to do it, you can, but you won&#39;t need to do it.&quot;&nbsp;This vision is the same as that desired by thousands of robotics researchers since the 1950s.</p>

  <p><img alt="Tesla Bot details" height="188" src="/img/upload/2021/08/22/teslabot0.png" width="340" /></p>

  <p>Here are some thoughts of the easy parts and challenges that the Tesla team will have.</p>

  <h4 class="section">Reuse of mechanics and perception</h4>

  <p>Building a car requires&nbsp;a mix of mechanics, electronics, and software, the exact same areas needed for making a robot. Actually, many of the first robot prototypes were made with technology designed for cars. Tesla is clearly&nbsp;well positioned for&nbsp;reusing&nbsp;some of the mechanical innovations they have in their cars and apply them in&nbsp;the robot.</p>

  <p>One of the details that surprised me was the weight, is it very low in comparison with other prototypes. Tesla will need to innovate in actuators, gearboxes, and lightweight materials to achieve that weight. Weight is a very important consideration in a humanoid robot design because the higher the weight, the higher the inertias that are generated during the movement, and the more difficult the control strategy to maintain equilibrium.</p>

  <p><img alt="Tesla Bot technical details" height="192" src="/img/upload/2021/08/22/teslabot1.png" width="340" /></p>

  <p>Another component of the car Tesla can reuse is the perception system.&nbsp;The navigation algorithms used in their cars are not going to change that much when applied to the robot. There has been a lot of research in the area of semantic segmentation, localization, mapping, and obstacle avoidance that they can reuse.&nbsp;</p>

  <h4 class="section">Locomotion and stability</h4>

  <p>Maybe the biggest challenge they face is locomotion and stability. So far, there is only one company that has robustly solved this problem, <a href="https://www.bostondynamics.com/" target="_blank">Boston Dynamics</a>.&nbsp;</p>

  <p>Unfortunately, Boston Dynamics doesn&#39;t share much on how they have achieved such amazing locomotion ability in their robots. However, we know a couple of details.&nbsp;Some of their hardware key components are the lightweight hydraulic power unit, small batteries, and&nbsp;hydraulic servo valves. A lot of the hardware is custom-made. We also know that Boston Dynamics&#39;&nbsp;control methodology is model-based, with precomputed components like masses, frictions, inertias, everything mixed with real-time feedback. They also precompute trajectories and use adaptative control to cope with model inaccuracies.&nbsp;The robot perceives the environment, calculates in real-time where to put its feet, and computes the dynamics of the motion.</p>

  <p>Unlike Boston Dynamics that uses hydraulic actuators, Tesla Bot ones seem to be electrical. Electrical actuators are more lightweight and portable, however, they typically provide less torque. Certain activities like running,&nbsp;jumping or brusque movements,&nbsp;require high torques, which is difficult to provide for these actuators.</p>

  <p>The control of stability is also super important in humanoids. In Boston Dynamics, they use a technique called Sequential Composition detailed in a paper by&nbsp;<a href="https://deepblue.lib.umich.edu/bitstream/handle/2027.42/67990/10.1177_02783649922066385.pdf?sequence=2" target="_blank">Burridge et al. in 1999</a>. They use the full-body dynamics of the robot, real-time feedback, and modeling of partial workspaces of stability, to compose a stable movement trajectory for the robot. Its implementation is unknown. At this point in time, we don&#39;t know how Elon Musk plans to approach the stability problem.</p>

  <h4 class="section">Manipulation</h4>

  <p>A part where Elon didn&#39;t give us almost any detail is manipulation. This is a very complex problem in humanoids. The only thing that&nbsp;is mentioned in the presentation is that Tesla Bot will have human-level hands.&nbsp;</p>

  <p>If Elon really wants robots able to collaborate with humans, getting your groceries or serving you a cup of coffee, he will need to solve the manipulation problem. Thankfully, this is a problem that has been addressed for many years. Even more interesting, there is the problem of manipulation while moving, something that <a href="https://www.youtube.com/watch?v=aFuA50H9uek" target="_blank">Boston Dynamics addressed</a> and that even <a href="https://www.youtube.com/watch?v=CSB8vTjFkGY" target="_blank">I worked on in the past</a>.</p>

  <p>On top of all these challenges, I think Tesla building a humanoid robot will be very good for the field.&nbsp;Robotics companies and some top labs have been really secretive with their research. If Tesla is more open&nbsp;and<a href="https://www.tesla.com/en_GB/blog/all-our-patent-are-belong-you" target="_blank"> shares its knowledge as they have done before</a>, it will be a boost for robotics research. In addition,&nbsp;If Tesla is able to create a robot with matching abilities to that of Boston Dynamics, there will be more competition and more growth in robotics.</p>


title: A Gentle Introduction to Matrix Factorization for Recommendations
slug: a-gentle-introduction-to-matrix-factorization-for-recommendations
pub_date: 2021-11-28
keywords: recommendation systems; matrix factorization; als
authors: Miguel González-Fierro
meta_description:
  A gentle introduction to Matrix Factorization for Recommendation Systems and a simple method to compute it

abstract:
  Matrix Factorization is one of the most widely used methods in Recommendation Systems, whose ultimate goal is to understand what is the user preference for a set of items. For example, Netflix tries to understand what movie you would like to watch next. In this post, we explain in simple terms how Matrix Factorization works.

content:
  <p>The starting point of a Recommendation System&nbsp;is a set of past interactions between users and items. Certain users interacted (clicked/bought/rated) with a small number of items.</p>

  <p>We can build an interaction matrix. In the rows, we have all the users, and in the columns, we have all the items. If there has been an interaction between a user-item pair, that matrix cell has a value. Otherwise, it has zero.&nbsp;</p>

  <p>The recommendation system&#39;s goal is to predict the unknown values in the user-item interaction matrix. In other words, predict the interaction each user will have with each item. This can be achieved with matrix factorization.</p>

  <p>Basically, a matrix factorization algorithm decomposes the interaction matrix into two lower dimension matrices that represent the intrinsic user and item attributes:</p>

  <p><span class="math-tex">$$\hat r_{u,i} = q_{i}^{T}p_{u}$$</span></p>

  <p>The challenge to the matrix factorization problem is to find&nbsp;<span class="math-tex">$q_{i}^{T}$</span>&nbsp;and&nbsp;<span class="math-tex">$p_{u}$</span>. The key is the latent dimension, which is a parameter chosen by the programmer to be much smaller than the number of users or items. The user matrix has the&nbsp;size of the number of users times the latent dimension,&nbsp;and the item matrix has the size of the number of items times the latent dimension.</p>

  <p>The learning objective is to minimize the difference between the real interaction matrix and the predicted one.&nbsp; Furthermore, to avoid overfitting issues, the learning process is regularized.</p>

  <p><span class="math-tex">$$\min\sum(r_{u,i} - q_{i}^{T}p_{u})^2 + \lambda(||q_{i}||^2 + ||p_{u}||^2)$$</span></p>

  <p>One of the most well-known methods to solve matrix factorization is Alternating Least Square (ALS) algorithm.&nbsp;</p>

  <p>The basic idea of ALS is to learn one of&nbsp;<span class="math-tex">$q_{i}$</span>&nbsp;and&nbsp;<span class="math-tex">$p_{u}$</span>&nbsp;at a time for optimization while keeping the other constant. This makes the objective at each iteration convex and solvable.&nbsp;This iterative computation can be parallelized and/or distributed.</p>

  <p>In Recommenders repository, you can find an open-source <a href="https://github.com/microsoft/recommenders/blob/5825b7183865ee4967cb0d227916718018c395a9/examples/02_model_collaborative_filtering/als_deep_dive.ipynb" target="_blank">example&nbsp;of ALS in Spark</a>.&nbsp;</p>


