<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manrique on Medium]]></title>
        <description><![CDATA[Stories by Manrique on Medium]]></description>
        <link>https://medium.com/@urbanizaditico?source=rss-3ae9949137f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VLvkyOB6gRZInwmo.jpeg</url>
            <title>Stories by Manrique on Medium</title>
            <link>https://medium.com/@urbanizaditico?source=rss-3ae9949137f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 23:55:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@urbanizaditico/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Concurrent writes in Databricks Delta Lake]]></title>
            <link>https://medium.com/data-science-collective/when-to-use-liquid-clustering-vs-partitioned-by-and-cluster-by-in-delta-lake-tables-its-all-b1474ccf2e5f?source=rss-3ae9949137f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1474ccf2e5f</guid>
            <category><![CDATA[liquid-clustering]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[partition]]></category>
            <dc:creator><![CDATA[Manrique]]></dc:creator>
            <pubDate>Sat, 20 Sep 2025 20:34:39 GMT</pubDate>
            <atom:updated>2026-05-15T13:30:21.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tips and Tricks to Enable Concurrency Writes in Databricks Delta Lake</h3><p>In the fast-paced world of data engineering, Delta Lake has become a cornerstone for building reliable, scalable data pipelines on platforms like Databricks. It brings ACID transactions to data lakes, enabling robust analytics and machine learning workflows. However, when dealing with concurrent operations — such as multiple jobs or streams writing to the same table — users often encounter challenges that can disrupt performance and reliability. This article explores common concurrency issues in Delta Lake, practical mitigation strategies using partitioning and clustering, and experimental insights to help you optimize your setups.</p><p>In my early days working on pipelines that updated Delta tables, I frequently encountered Delta errors that halted our concurrent write jobs. While Delta Lake excels in analytical workloads, it’s not ideally suited for extremely high-transaction-volume scenarios, as handling massive concurrency remains a known challenge for columnar storage formats. That said, there are effective workarounds to these limitations without introducing new technologies like a dedicated transactional database into your stack.</p><p><strong>To mitigate “concurrency error” messages, leverage partitioning and clustering wisely. </strong>Without proper partitioning or clustering on the the updated columns, operations often clashed over the same files, leading to conflicts. Below, I’ll outline the pros and cons of these two options. For in-depth details on Delta Lake’s concurrency and isolation mechanisms, refer to the official Databricks documentation on <a href="https://docs.databricks.com/aws/en/optimizations/isolation-level">Isolation Levels and Write Conflicts</a>.</p><p>Related errors: <strong>`ConcurrentAppendException`, `ConcurrentDeleteReadException`, `ConcurrentTransactionException`</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2w8zL25wOrT3FOHCaT1TPw.avif" /></figure><h3>Understanding the Basics</h3><h3>PARTITIONED BY</h3><p>Partitioning in Delta Lake physically divides your table data into separate directories based on the values of one or more columns. This technique enables efficient query pruning by reducing the amount of data scanned, which improves query performance.</p><p>Use cases:</p><ul><li>When you have low to moderate cardinality columns frequently used as filters (e.g., region, customer ID).</li><li>When you want to optimize for query pruning and reduce I/O.</li><li>When your data ingestion or query patterns align well with partition keys.</li></ul><p>Important note: By default, Spark often partitions files by date (e.g., year, month, day) in time-series workloads. Because of this, you might not always need to manually specify partitioning in your Delta Lake tables.</p><p>Considerations:</p><ul><li>Over-partitioning (too many small partitions) can lead to many small files and metadata overhead, which degrades performance.</li><li>Changing partition keys after table creation is complex and generally discouraged.</li><li>Partition pruning only benefits queries that filter on the partition columns.</li></ul><h3>Liquid Clustering (Automated CLUSTER BY)</h3><p>Liquid Clustering is an automated, adaptive implementation of the traditional CLUSTER BY operation in Databricks Delta Lake. Instead of manually running clustering commands, Liquid Clustering continuously optimizes the data layout based on query patterns and data distribution, reducing manual tuning and maintenance.</p><p>Use cases:</p><ul><li>When you want automated, continuous optimization of data layout without manual intervention.</li><li>When your query patterns evolve over time and you want the system to adapt dynamically.</li><li>When you want to reduce operational overhead associated with manual clustering and partitioning.</li></ul><p>Considerations:</p><ul><li>Requires Databricks Runtime versions that support Liquid Clustering.</li><li>May introduce some additional compute overhead during optimization.</li><li>Best suited for large, frequently queried tables with diverse and evolving query patterns.</li><li>Liquid Clustering improves read performance by sorting data within files, enabling better data skipping, but does not isolate concurrent writes like partitioning does.</li></ul><p>Note: The older ZORDER BY optimization is not longer recommended. Databricks prefers advanced and automated CLUSTER BY (Liquid Clustering) approach in Databricks Delta Lake.</p><h3>Concurrency Experiment Setup</h3><p>To validate concurrency behavior and performance, I ran a series of tests simulating concurrent writes to Delta Lake tables using three different data layout strategies.</p><ul><li>No partitions</li><li>Liquid clustering (CLUSTER BY)</li><li>Partitions (PARTITIONED BY)</li></ul><h3>Creating and Initializing a Clustered Delta Table</h3><p>To explore concurrency in Delta Lake, I created a Delta table with clustering on the id column. The table schema includes id and status. I initialized the table with 100 records, each having a unique id and an initial status of &quot;INIT&quot;.</p><pre>from pyspark.sql.types import StructType, StructField, StringType, TimestampType<br>from datetime import datetime<br><br># intialie tables with or without partitions<br>schema = StructType([<br>    StructField(&quot;id&quot;, StringType(), True),<br>    StructField(&quot;status&quot;, StringType(), True),<br>])<br>spark.sql(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS test_concurrent_writes_test_1 (<br>    id STRING,<br>    status STRING,<br>)<br>-- Note that we have NO PARTITIONS/CLUSTER and this will fail!<br>&quot;&quot;&quot;)<br>spark.sql(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS test_concurrent_writes_test_2 (<br>    id STRING,<br>    status STRING,<br>)<br>PARTITION BY id<br>&quot;&quot;&quot;)<br>spark.sql(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS test_concurrent_writes_test_3 (<br>    id STRING,<br>    status STRING,<br>)<br>CLUSTER BY id<br>&quot;&quot;&quot;)<br><br># populate tables with 100 ids and &quot;INIT&quot; status<br>ids = [f&quot;{i:08d}&quot; for i in range(1, 100)]<br>init_data = [(bid,&quot;INIT&quot;) for bid in ids]<br>df_init = spark.createDataFrame(init_data, schema)<br>df_init.write.format(&quot;delta&quot;).mode(&quot;overwrite&quot;).saveAsTable(<br>   &quot;test_concurrent_writes_test_1&quot;<br>)<br>df_init.write.format(&quot;delta&quot;).mode(&quot;overwrite&quot;).saveAsTable(<br>   &quot;test_concurrent_writes_test_2&quot;<br>)<br>df_init.write.format(&quot;delta&quot;).mode(&quot;overwrite&quot;).saveAsTable(<br>   &quot;test_concurrent_writes_test_3&quot;<br>)<br></pre><h3>Concurrent Job Setup Using Joblib Parallelism</h3><p>To simulate concurrent updates, I divided the id into chunks processed by multiple parallel jobs. Each job updates the status field for its assigned id using Delta Lake’s update API.</p><pre>from pyspark.sql import SparkSession<br>from pyspark.sql.types import StructType, StructField, StringType<br>from delta.tables import DeltaTable<br>from joblib import Parallel, delayed<br>import time<br>import traceback<br><br># Define update function<br>def update_status(id_val, table_num):<br>    deltaTable = DeltaTable.forName(spark, f&quot;test_concurrent_writes_test_{table_num}&quot;)<br>    deltaTable.update(<br>        condition=f&quot;id = &#39;{id_val}&#39;&quot;,<br>        set={&quot;status&quot;: &quot;&#39;UPDATED&#39;&quot;}<br>    )<br><br># Function to run test for a given table<br>def run_concurrency_test(table_num):<br>    print(f&quot;Starting test for table {table_num}&quot;)<br>    ids = [f&quot;{i:08d}&quot; for i in range(1, 101)]<br>    start = time.time()<br>    status = &quot;SUCCESS&quot;<br>    try:<br>        Parallel(n_jobs=6)(delayed(update_status)(id_val, table_num) for id_val in ids)<br>    except Exception as e:<br>        status = &quot;FAILED&quot;<br>        print(f&quot;Error: {traceback.format_exc()}&quot;)<br>    end = time.time()<br>    total_time_min = (end - start) / 60 if status == &quot;SUCCESS&quot; else &quot;N/A&quot;<br>    time_per_id_sec = (end - start) / 100 if status == &quot;SUCCESS&quot; else &quot;N/A&quot;<br>    print(f&quot;Test {table_num}: Status={status}, Total Time (min)={total_time_min}, Time per ID (s)={time_per_id_sec}&quot;)<br><br># Run tests<br>run_concurrency_test(1)  # Expected to fail<br>run_concurrency_test(2)  # Partitioned<br>run_concurrency_test(3)  # Clustered</pre><p>This approach leverages 6 concurrent jobs, each handling a subset of id, to test the concurrency behavior of clustered Delta tables.</p><h3><strong>Experiment Results</strong></h3><pre>+------+-----------------+---------+-----------------+------------+-----------------+---------------+<br>| Test | Method.         | Status  | Total Time (min)| Concurrency | Time per ID (s) | Total Ids    |<br>+------+-----------------+---------+------------------+-------------+----------------+--------------+<br>| 1    | No Partitions   | FAILED! | N/A             | 6           | N/A.            | N/A          |<br>| 2    | CLUSTER BY id   | SUCCESS | 4.32            | 6           | 12.95           | 100          |<br>| 3    | PARTITION BY id | SUCCESS | 1.5             | 6           | 4.5             | 100          |<br>+------+-----------------+---------+-----------------+-------------+-----------------+--------------+|</pre><h3>Key Findings</h3><ul><li>No Partitioning (Test 1): Concurrent writes failed due to Delta Lake concurrency control errors (ConcurrentAppendException). This confirms that without partitioning or clustering, Delta Lake cannot safely handle concurrent appends at scale.</li><li>Clustering (Test 2): Enabled concurrency with 6 parallel tasks, but total copy time was significantly higher (4.32 minutes) compared to partitioning. Clustering helps concurrency but does not isolate writes as effectively as partitioning.</li><li>Partitioning (Test 3): Provided the best concurrency and performance, with the shortest total copy time (1.5 minutes) and lowest time per ID (4.5 seconds). Partitioning by ID and table name isolates concurrent writes to separate partitions, minimizing conflicts and maximizing throughput.</li></ul><h3>Best Practices</h3><ul><li>When writes are more prevalent and reads are not so important, use partitions. Use PARTITIONED BY when you have <strong>natural partition keys that align with your query and write patterns</strong>, especially for high concurrency workloads.</li><li>Use liquid clustering using CLUSTER BY to improve query performance on non-partition columns but be aware it does not isolate concurrent writes as well as partitioning. Consider liquid clustering for large, dynamic tables where automated, adaptive optimization can reduce manual maintenance. When reads are just as frequent as writes, then Liquid clustering might provide a better in between.</li></ul><p>That said, partitioning and even advanced features like liquid clustering aren’t a silver bullet. Partitions and clustering come at a tradeoff that many files will slow down your queries! Even with optimal partitioning, updates targeting the same partition or clustered data (e.g., via liquid clustering) can still trigger conflicts, making truly concurrent writes challenging<strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1474ccf2e5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/when-to-use-liquid-clustering-vs-partitioned-by-and-cluster-by-in-delta-lake-tables-its-all-b1474ccf2e5f">Concurrent writes in Databricks Delta Lake</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insurtech (Property) Insights -]]></title>
            <link>https://medium.com/@urbanizaditico/insurtech-property-insights-3f850d7aa0fc?source=rss-3ae9949137f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f850d7aa0fc</guid>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[cat-modeling]]></category>
            <category><![CDATA[insurtech]]></category>
            <category><![CDATA[property-insurance]]></category>
            <dc:creator><![CDATA[Manrique]]></dc:creator>
            <pubDate>Thu, 17 Oct 2024 17:09:56 GMT</pubDate>
            <atom:updated>2025-12-20T04:25:24.789Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://www.insurtechinsights.com/america/">Insurtech Insights</a> — Review</h3><p>Earlier this week, I had the opportunity to attend the Insurtech Insights conference, an event that brings together a diverse range of innovators and leaders in the insurance technology sector. I was pleased to join the conference on short notice and found the experience both insightful and inspiring. Below, I share some of the key takeaways from the event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*VbXEGWx-nh4lBei7hPOG0A@2x.jpeg" /></figure><blockquote>Credit: Investopedia / Sydney Saporito</blockquote><p>The conference primarily focused on Insurtech vendors and was designed to connect insurance professionals with cutting-edge proprietary software solutions. Established technology providers such as Oracle Cloud showcased their latest AI capabilities alongside a vibrant array of emerging startups leveraging advancements in AI and IoT. While many solutions were tailored to insurance carriers and underwriters, particularly in areas like site inspections, the event offered a valuable overview of innovations across the broader insurance ecosystem, including property insurance.</p><ol><li><strong>Hyperexponential Pricing tool</strong></li></ol><p><a href="https://www.hyperexponential.com/us/">Hyperexponential</a> has an intuitive and simple insurance pricing tool for actuaries and catastrophe modeling. Some interesting features are:</p><ul><li>End to end tool with portfolio ingestion, to actuarial CAT model rating tools like RMS plugin, all the way to a final pricing result</li><li>Great flexibility to build the models</li></ul><p><strong>2. Instabase Document platform</strong></p><ul><li>Instabase is a document platform app for unstructured data — you can try their tool here <a href="https://aihub.instabase.com/">Instabase</a>. The app learns from the uploaded document.</li></ul><p><strong>3. Data platform</strong></p><ul><li><a href="https://medium.com/cognisure.ai">Cognisure.ai</a> is an insurance data platform, like some projects at Data Strategy, trying to automate the insurance manual processes that are siloed across the organization like data ingestion from emails into actionable insights and profile developments.</li><li>Majesco is another IT data platform. A relevant tool was a “loss control” product that they have built for insurance carriers and underwriters with very granular property fields, some sort of fine-grained portfolio ingestion that allows you to track losses.</li></ul><p><strong>4. Remote Sensing and IoT</strong></p><ul><li>There were interesting startups in the property and casualty space leveraging image recognition and remote sensing technologies like <a href="https://www.nearmap.com/us/en?utm_source=google&amp;utm_medium=organic">Nearmap</a>, a flood data provider <a href="https://previsico.com/insights/previsico-develops-new-underwriting-tool-at-lloyds-lab-to-enhance-insurers-flood-modelling-capabilities">Previsco</a>, another geocoding vendor <a href="https://www.smarty.com/products/us-rooftop-geocoding">smarty</a>, a Cyber IoT monitor platform <a href="https://www.denexus.io/">Denexus</a>, and even a booth with <a href="https://resources.mckenzieintelligence.com/">McKenzie Intelligence</a>, event data provider.</li></ul><p>The conference provided a highly engaging commercial platform where software vendors demonstrated their latest products and solutions. While detailed technical discussions on open-source tools and backend architectures were limited, the event offered valuable insights into the evolving landscape of insurance technology and the practical applications being developed.</p><p>Panel discussions reinforced the importance of strategic planning, subject matter expertise, stakeholder engagement, and continuous product exploration when integrating AI into insurance workflows. Overall, attending Insurtech Insights was a rewarding experience that broadened my understanding of the dynamic insurance technology space and highlighted promising directions for future innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f850d7aa0fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Underground Version 2.0]]></title>
            <link>https://medium.com/data-tale/underground-version-2-0-2ce60f040245?source=rss-3ae9949137f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ce60f040245</guid>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[underground]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[smart-cities]]></category>
            <dc:creator><![CDATA[Manrique]]></dc:creator>
            <pubDate>Tue, 09 Jul 2019 23:18:26 GMT</pubDate>
            <atom:updated>2022-10-18T02:46:05.956Z</atom:updated>
            <content:encoded><![CDATA[<h4>Civic Innovation &amp; Smart Cities</h4><h4>Towards a Collaborative Data Repository of the Subsurface</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*LyGt-P2hYWliehmZ-JapXA.png" /><figcaption>Incident in New York City’s $4.5billion subway expansion [Image from the Daily Mail]</figcaption></figure><p>Underground data represents a multi-billion dollar asset for stakeholders that deal with the ground subsurface. During the last <a href="https://wp.nyu.edu/urbansubsurface/">Sustainable Underground Systems Workshop</a> at NYU-CUSP<em>,</em> Alan Leidner, president of NYC’s Geospatial Information System and Mapping Organization (GISMO), explained how this data can help us to run more effectively our physical infrastructure. It is estimated that 1% of excavations result in damages that cost an average $4,000 per incident nationally, but can be many times higher in dense urban environments. High quality, comprehensive and interoperable data about underground infrastructure (water, sewer, gas, electric, steam, telecommunications, transit networks, plus soils information) can have an annual benefit for capital construction and utility asset management operations that can be in the hundreds of millions of dollars for large sized cities like New York [1][2][3][4]. According to <em>Leidner’s estimate,</em> improving this data can save half a billion dollars per year to New York City government, city utilities and the city’s real estate and construction sectors.</p><p><strong>Existing Information Models of the Built Environment</strong></p><p>Tools like Building Information Modeling (<a href="https://en.wikipedia.org/wiki/Building_information_modeling">BIM</a>) can create digital representations with physical and functional details of the underground in a single file. However, the files are scattered among different parties in all sorts of formats and conventions, from public utilities to private telecom companies that are not always willing to share their precious information. This generates a large uncertainty for the underground works that translates into large risks and costs of infrastructure projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VkyR4gIzt2ky9CvT1jnkPA.png" /><figcaption>Underground utility coordination models and other important ground data are gathered for all underground projects. The absence of regulations to record data makes the data been thrown away, or kept private by project owners, wasting what potentially could save billions of dollars [Image from Doster]</figcaption></figure><p><strong>Underground Data Platforms Around the World</strong></p><p>Some European regions have created collaborative platforms of underground data. The British Geological Society (BGS) has developed a nation wide borehole sharing platform during the past years (see image below). The Flanders region initiative led by <a href="https://twitter.com/info_vlaanderen">Informatie Vlaanderen</a> went even further since 2002 to include more soil tests and details through their open portal <a href="http://www.dov.vlaanderen.be/">Databank Ondergrond Vlaanderen</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*Bj89gOO-zMTJQF_KgjSiHQ.png" /><figcaption>Boreholes map from British Geological Society’s GeoIndex in Britain (left) and <a href="http://www.dov.vlaanderen.be/">Databank Ondergrond Vlaanderen</a> portal in Flanders (right)</figcaption></figure><p>Back to the United States, the American Society of Civil Engineers (ASCE) leads their own initiative towards data standards. For example, the ASCE’s Utility Engineering &amp; Surveying Institute offer civil engineering &amp; surveying professionals standards and guidelines to work collaboratively. ASCE developed <a href="https://www.geoinstitute.org/special-projects/diggs">DIGGS</a>, a project that involves development of a GML (XML-based) <strong>geospatial standard </strong><a href="https://www.diggsml.org/schemas/2.0.b/Complete.xsd"><strong>schema</strong></a><strong> </strong>for the transfer of geotechnical and geoenvironmental data between multiple organizations. This schema allows a fluent transfer of data between project stakeholders, but the data is still likely to end in private hands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSIMVjP_e0_PaSov1y_96w.png" /><figcaption>ASCE’s DIGGS Schema for Data Transfer</figcaption></figure><p><strong>No One Owns the Underground</strong></p><p>This scattered environment of data aggregators reveals a weakness of the United States society where proprietary culture rules over a more collaborative model found in Europe, but it also reveals an opportunity of disruption. Amid this situation, a common-sense solution is an open-sourced collaborative data platform.</p><p><strong>Security Concerns or Lack of Political Will?</strong></p><p>New York city has particular issues with underground data availability. This was even more evident after 9/11 and hurricane Sandy when remediation works struggled to obtain inter-agency cooperation and underscored the need for planning (and data!) before a disaster strikes. According to <em>Erika Kamptner, </em>from NYC 3D Underground POC at NYC DoITT, there is a major security concern among agencies. Water utilities, for instance, suffer a great risk of vulnerability given their interconnected nature to the system as a whole. Certainly, disclosing this data can pose a major threat to public safety. However, many other industry leaders believe the unwillingness of some stakeholders to share information might be motivated by lack of incentives and the retention of political power.</p><p><strong>Reaching Common Ground Towards a Collaborative Data Platform</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Qr3HA7kaz3lXuT96LHggA.png" /><figcaption>Introduction to OGC’s Model for Underground Data Definition and Integration (MUDDI) — Data Architecture and Model Patterns</figcaption></figure><p>The <a href="https://www.opengeospatial.org/">Open Geospatial Consortium </a>(OGC) proposes the Model for Underground Data Definition and Integration (<a href="https://portal.opengeospatial.org/files/?artifact_id=80269">MUDDI</a>). It designs a model to enable sharing between planning, design, construction, and operation phases through standards that ensure interoperability. Their <a href="https://www.opengeospatial.org/">website</a> details a sophisticated systems-engineering approach to what can become leading collaborative data standards.</p><p><strong>Underground Version 2.0</strong></p><p>In my opinion, there is a need for a collaborative platform with servers, maps, and info-graphics built on top of existing standards. Given the failure among government agencies to create a common platform, what if we develop a portal that manages our underground using the same principles of modern Data Ops?</p><p>To make the product scalable, the platform must be open to any user. For those parties concerned with privacy, users should have the option of having either public or private data repositories. To achieve order and legal liability, verified accounts could be given to certified professionals and regulators.</p><p>Underground data advocates should fight for better collaborative platforms in order to keep working towards a more dynamic city that makes way to arteries of services fueled by readily available data as we excavate through the tissues of the urban subsurface. To improve the current status, the problem calls for leaders to adopt open database architectures, visualizations, and story-telling and work closely with innovators to incorporate smarter technologies. Only this way we will maximize the benefits of our underground world as a massive asset that improves our communities.</p><p><strong>References</strong></p><p>[1] Common Ground Alliance (2017). Damage Information Reporting Tool (DIRT). Retrieved from <a href="https://commongroundalliance.com/programs/damage-information-reporting-tool-dirt">https://commongroundalliance.com/programs/damage-information-reporting-tool-dirt</a></p><p>[2] Alan C. O’Connor, J L. Dettbarn, L T. Gilday (2004). Cost Analysis of Inadequate Interoperability in the U.S. Capital Facilities Industry. NIST. Retrieved from <a href="https://www.nist.gov/publications/cost-analysis-inadequate-interoperability-us-capital-facilities-industry">https://www.nist.gov/publications/cost-analysis-inadequate-interoperability-us-capital-facilities-industry</a></p><p>[3] Rajat Agarwal, Shankar Chandrasekaran, and <a href="https://www.mckinsey.com/our-people/mukund-sridhar">Mukund Sridhar</a> (June, 2016). <em>Imagine Construction’s Digital Future.</em> McKinsey and Company. <a href="https://www.mckinsey.com/industries/capital-projects-and-infrastructure/our-insights/imagining-constructions-digital-future">https://www.mckinsey.com/industries/capital-projects-and-infrastructure/our-insights/imagining-constructions-digital-future</a></p><p>[4] Federal Highway Administration Washington, DC. (1999). Cost Savings On Highway Projects Utilizing Subsurface Utility Engineering. Retrieved by <a href="https://www.fhwa.dot.gov/programadmin/pus.cfm">https://www.fhwa.dot.gov/programadmin/pus.cfm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ce60f040245" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-tale/underground-version-2-0-2ce60f040245">Underground Version 2.0</a> was originally published in <a href="https://medium.com/data-tale">data.tale()</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Like Babies — Image Classification Using Semi-Supervised Learning]]></title>
            <link>https://medium.com/@urbanizaditico/learning-like-babies-image-classification-using-semi-supervised-learning-ccfb5b391d1f?source=rss-3ae9949137f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccfb5b391d1f</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Manrique]]></dc:creator>
            <pubDate>Thu, 13 Jun 2019 22:27:42 GMT</pubDate>
            <atom:updated>2023-12-15T18:01:38.106Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://medium.com/towards-data-science/inside-ai/home">Inside AI</a></h4><h3>Learning Like Babies</h3><h4>Image Classification Using Semi-Supervised Learning</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*6QDjGnKdhkstrRqs.jpg" /><figcaption><em>Features of visual hierarchy</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/0*6z4vla-xGhxYjNNx.png" /><figcaption>Simple CNN architecture for image classification</figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Convolutional_neural_network">Convolutional Neural Nets</a> (CNNs), a concept that has achieved the greatest performance for image classification, was inspired by the <strong>mammalian visual cortex system. </strong>Yet, state-of-the-art artificial intelligence models work different to the natural learning process of mammals. AI models often learn from extensive human labels, like a picture of a dog with a label of the word ‘dog’. This is called ‘supervised learning’. The problem is that most of the real world data is not labeled. The majority of our learning of the world comes from self learning.</p><p>According to Yann LeCun, father of CNNs and professor at NYU, the next ‘big thing’ in artificial intelligence is <a href="https://en.wikipedia.org/wiki/Semi-supervised_learning">semi-supervised learning</a> — a type of machine learning task that makes use of unlabeled data for training — typically a small amount of labeled data with a large amount of unlabeled data. That is why recently a large research effort has been focused on unsupervised learning without leveraging a large amount of expensive supervision.</p><blockquote>“ The revolution will not be supervised” — Alyosha Efros</blockquote><p>Inspired on this concept, our class at NYU hosted a competition to design a semi-supervised algorithm from 512k unlabelled images and 64k labelled images from ImageNet.</p><p>Semi-supervised learning is in fact the learning method mostly used by infants. When we are born, we don’t know how the world works: we don’t distinguish gravity, we don’t understand depth, or much less do we recognize human expressions. The human brain absorbs data mostly in an unsupervised or semi-supervised manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wZsIcdxhGw-tcxGU9VIY9Q.png" /><figcaption>Babies learn orientation unconsciously from a very early age. This can be considered ‘semi-supervised learning’.</figcaption></figure><h3>Method: Semi-supervised Representation Learning by Predicting Image Rotations</h3><p>For the competition, the method employed by our algorithm <a href="http://arxiv.org/abs/1803.07728">recognizes the 2d rotation</a> that is applied to the input image [2]. In a way, this assimilates to how babies learn to see the world through experience. For example, through time babies get used to how objects stand and how mountains lie below the sky. As it turns out, even this simple task of image rotation allows the network to learn features that are relevant for supervised tasks.</p><p>We used <a href="http://arxiv.org/abs/1512.03385">ResNet architecture</a> (more specifically ResNet-50) for our final submission. ResNet models achieve state-of-the-art performance on many classification data sets. Moreover, ResNet residual units are invertible under certain conditions, which might help to preserve information from the early layers of the network obtained as a <a href="http://arxiv.org/abs/1901.09005">result of pre-training</a>. We utilised a large set of unlabeled images to pre-train a ResNet-50 model on the rotation pre-task. The goal of the model is to predict one of the four rotation angles (0, 90, 180, 270) for each input image. As a result of training the model on this auxiliary task, we expected it to learn features that would be helpful in the main classification task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*7FCEp2WjtUGeODJHUCY5Gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*9MOghMN__4vLSevgVG_h2g.png" /><figcaption>Semi-supervised learning using image rotation (left) and data augmentation (right)</figcaption></figure><p>After pre-training, we trained a linear classifier on top of this feature extractor for the main task, and fine-tuned the whole network by gradually unfreezing the layers starting from the top. We also used data augmentation. This strategy led to a significant boost in accuracy as compared to the previous model.</p><h3>Results</h3><p>The figure below shows the training and validation loss curves, and accuracy for the final model over the course of training. Red line shows the moment of switching from training only linear classifier to fine-tuning the whole network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*yEjsCQLGGO4sEP2tx_uf8A.png" /><figcaption>Train loss, validation loss and accuracy for the final submission</figcaption></figure><p>The figure below visualizes nearest neighbors for 4 random images in the validation dataset (first column). As it can be seen, semi-supervised rotation model clearly managed to learn meaningful representations of the images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*Lki34BJniOD-f_8wUfMFTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*paoOxVPf7t772KzxNG3ojg.png" /><figcaption>Nearest neighbors in the validation dataset: Semi-supervised model (left) and Supervised model (right). As it can be seen, semi-supervised rotation model (with rotation labels) shown on the left managed to learn meaningful representations of the images.</figcaption></figure><p>The final top-1 validation accuracy was 32.4%. Overall, we can conclude that semi-supervised pretraining on the unlabeled data helped to improve accuracy on the main classification task. However, it is not clear how much more beneficial semi-supervised training is as compared to pre-training on existing large labeled datasets such as ImageNet.</p><p>For more information, you may refer to our <a href="https://drive.google.com/file/d/1eWMGgjFpzGgz8Z06cLlQ8gh62YmnuNBX/view?usp=sharing">paper</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*PxNBKsMtvPuRivDwYp7JCw@2x.jpeg" /></figure><p><em>This project was developed by Evgenii Nikitin, @sunor.yavuz, and </em><a href="https://medium.com/u/3ae9949137f2"><em>Manrique</em></a></p><p><strong>References</strong></p><p>[1] Carl Doersch, Abhinav Gupta, and Alexei A. Efros. Unsupervised visual representation learning by context prediction. In International Conference on Computer Vision (ICCV), 2015.<br>[2] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. CoRR, abs/1803.07728, 2018.<br>[3] Aidan N. Gomez, Mengye Ren, Raquel Urtasun, and Roger B. Grosse. The reversible residual network: Backpropagation without storing activations. CoRR, abs/1707.04585, 2017.<br>[4] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015.<br>[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. CoRR, abs/1603.05027, 2016.<br>[6] Alexander Kolesnikov, Xiaohua Zhai, and Lucas Beyer. Revisiting self-supervised visual representation learning. CoRR, abs/1901.09005, 2019.<br>[7] Sebastian Ruder. An overview of gradient descent optimization algorithms. CoRR, abs/1609.04747, 2016.<br>[8] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. CoRR, abs/1605.07146, 2016.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccfb5b391d1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>