Matching Modern Databases With ML and AI
You can't do AI without machine learning. You also can't do machine learning without analytics, and you can't do analytics without data infrastructure.
Join the DZone community and get the full member experience.Join For Free
machine learning (ml) and artificial intelligence (ai) have stirred the technology sector into a flurry of activity over the past couple of years.
however, it is important to remember that it all comes back to data. as hilary mason, a prominent data scientist, noted in harvard business review ,
you can't do ai without machine learning . you also can't do machine learning without analytics , and you can't do analytics without data infrastructure .
over the last year, we assembled a number of blogs, videos, and presentations on using ml and ai with memsql.
memsql with ml and ai
as a foundational datastore, memsql incorporates machine learning functions in one of three ways:
- calculations outside the database
- calculations on ingest
- calculations within the database
read an overall summary in our post machine learning and memsql from rick negrin.
outside the database
for integrating ml and ai outside the database, two popular methods are integrating with spark and tensorflow.
for spark, memsql offers an open-source memsql spark connector, which delivers high-throughput, bidirectional, and highly parallel operations from partition to partition. this connector opens up unlimited ml and ai possibilities that can be combined with a scalable, durable datastore from memsql.
one example of this integration is real-time machine learning scoring. a stereotypical pipeline might be:
iiot collection > kafka > spark > memsql > queries
for example, some popular statistical software packages allow export as pmml, the predictive machine learning markup language. these or similar models can be exported into spark, or even the database itself, to score incoming data in real-time. from there, the datapoint and the score of the model on the datapoint can be persisted together for easy analysis.
memsql powerstream is a specific example of combining machine learning with a database to score data in real-time and predict the likelihood of an equipment failure.
an interactive demonstration using memsql powerstream simulates 200,000 wind turbines sending sensor information at a rate of approximately two million inserts per second to memsql. from there, the user interface shows live status on real-time information, and ml scoring predicts the likelihood of turbine failures.
read more in our article iot at global scale: powerstream wind farm analytics with spark .
tensorflow and the results of applying machine learning models in tensorflow are shown in the the video scoring machine learning models at scale from strata new york .
ml on ingest
another area to run machine learning is as the data arrives in the database. memsql enables this with native pipelines from kafka, including exactly-once semantics, a critical capability for deduplication in event-driven pipelines. further, the pipeline ingest capability includes the option for executing a custom transformation.
a typical real-time data pipeline in this scenario might be:
kafka > memsql > query/visualization
memsql ui for custom transformations:
within the database
the third area for ml integration with databases is within the database itself. this occurs with a couple of secret ingredients.
the first enabler for machine learning within a database is extensibility or, more specifically, the inclusion of stored procedures, user-defined functions, and user-defined aggregates. these functions allow for customizations that can quickly and easily execute elements of an overall machine learning pipeline.
another enabler is the inclusion of popular algebraic operations such as
, which can take two vectors and quickly compare them for similarity.
can also easily compare one vector against hundreds of millions of vectors to deliver a degree of similarity.
thorn, an organization dedicated to ending child sex trafficking and the sexual exploitation of children, relies on image recognition to help fulfill its mission.
through the use of
within memsql, thorn was able to dramatically improve its real-time image recognition capabilities. read more on
an engineering view on real-time machine learning , or watch the video from aws re:invent 2017, business and life-altering solutions through ai and image recognition .
beyond image recognition,
has applicability in a wide range of use cases.
for example, we demoed k-means clustering on youtube tags within a presentation from gartner catalyst 2017, the data warehouse blueprint for ml, ai, and hybrid cloud . skip to slide 23 for the demonstration section.
another example comes in this presentation from gartner data and analytics 2018 in texas, building a machine learning recommendation engine in sql . skip ahead to slide 48 for the demonstration.
if you'd like to read more, feel free to check out memsql 6 product pillars and machine learning approach . this post includes more on:
built-in machine learning functions
real-time machine learning scoring
machine learning in sql with extensibility
and if you would like to see where 1,600 it professionals think the industry is headed with machine learning and artificial intelligence, see the 2018 outlook: machine learning and artificial intelligence survey . developed in conjunction with o'reilly media, this survey helps shape the general sentiment and industry trends around ml and ai.
Published at DZone with permission of Gary Orenstein, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.