Unstructured Data Analytics with MLOps

xpresso ai
6 min readSep 27, 2021

--

  • When we talk about machine learning, we talk about models that crunch data to meet their objectives. The data comes in two forms — structured and unstructured data.
  • Structured data come from predictable sources like sensors, individuals recording data, or transaction stages. This data is controlled with a proper structure, boundary conditions, predictable ranges, and volume.
  • The challenge comes with unstructured data, as it its share has grown manifold with the rise of internal/external communication, social and print media, and spanning across various form factors like blogs, newspapers, reviews, advertisements, and social media sites.
  • Compared to the structured data that is ingested by any organization to meet business objectives, unstructured data occupies more than 80% of the total share.

Observing unstructured data is very significant while formulating a strategy based on various competitors’ moves and the latest trends in demands or the technology upgrades. You can easily and quickly look at many aspects of the product/service with specific action points and work towards devising your approach.

The approach towardshandling unstructured data and structured data differs. This is because structured data has pre-defined feature sets and focuses on the target attribute whereas unstructured data may throw diverse aspects to the observer. For example,if we analyse user feedback, we may encounter an unpleasant service, product defect, or transactional issue. By studying the competition, one can get to know the new product/service launched, upcoming trends, and the opportunities which may be tapped.

Source of data

  • AI/ML practices can retrieve unstructured data from various sources like business documents, emails, social media, customer feedback, webpages, open-ended survey responses, images, audio, and videos.
  • These are retrieved from a central repository that containsemails, business documents or customer feedback.
  • At the same time, scrapping can fetch data from differentwebsites that are based on indexing keywords, which in turn are aligned to the business’s end- goals.
  • Social media provides APIs for obtainingdata based on users, pages, or hashtags that are used to highlight the focus area.

Operation on the unstructured data

  • To train models with unstructured data, the data requires cleansing and sorting. However, it must be done differently from structured data.
  • It will depend on the nature of data, text, audio, image, or video. The cleansing will also depend on the end goal of the analysis of the data.
  • The text, when analyzed, will give associations, sentiments, translations, or trends.
  • NLTK, Gensim, Polyglot, TextBlob, CoreNLP, spaCy, Pattern, Vocabulary, PyNLPI, and Quepy are few libraries that provideusers out of the box features for immediate use by tuning hyper-parameters.
  • Most libraries provide features like tokenization, language detection, named entity recognition, part of speech tagging, sentiment analysis, word embeddings, classification, translation, WordNet integration, parsing, word inflection, adding new models, or languages through extensions.
  • Specialized libraries like Pattern, Vocabulary, PyNLPl, Quepy give additional features like crawling text from websites, network analysis, graph centrality, visualization, translations, and question-like interface.
  • With audio, one has toanalyze the sentiment based on the tone as well. The analysis is done after audio data is converted to text and analyzing the same. Tone and accent are also an essential aspect of the audio.
  • Python libraries like Librosa and PyAudio are used widely for the analysis of audio data. This data analysis is used for music genre detection, voice commands, generating language/voice for voice-based assistants.
  • Pyo, pyAudioAnalysis, Dejavu, Mingus, hYPerSonic, Pydub, Loris are few Python libraries that provide users out of the box features for immediate use by tuning hyper-parameters.
  • These libraries provide features like sound granulation, audio manipulations, classify unknown sounds, apply dimensionality reduction to visualize audio data and content similarities, perform supervised and unsupervised segmentation, detect audio events and exclude silence periods from long recordings.
  • Libraries like Mingus work on music data, while hYPerSonic, Pydub, Loris work on the low-level analysis of the sound data for time- and frequency-scale modification and sound morphing.
  • Image processing is one of the other extensions of data analysis. The image analysis can help identify/count people, objects, detect faults, and various other features.
  • Scikit-image, OpenCV, Mahotas, SimplelTK, SciPy, Pillow, Matplotlib are few Python libraries for image data giving users out of box features for immediate use with the tuning of hyper-parameters.
  • The libraries provide image processing, face detection, object detection, watershed transformation, morphological processing, image convolution.
  • These libraries also support multiple image formats, can manipulate images for extracted information, or conduct analysis for measurements.
  • Video data processing is an extension of image and audio data processing. The audio and image data are analysed and collated to give the results.
  • Since the models to analyse and predict unstructured data may require data in different forms, the data captured is pushed to the data lake and retrieved for training the models based on the transformations. To predict using the streaming data, the trained models are further deployed on the MLOps workflow as web services. The streaming data subsequently train the model if the forecast is accepted or rejected. Finally, the trained model may be deployed again as the web service. The frequency of deployment may vary from few minutes to few days.
  • General techniques used in handling structured data can be applied to unstructured data for ease of operations later. The units of unstructured data are tagged with the findings for use withfurther models. NoSQL databases like MongoDB, Hadoop, and other popular databases can help keep the data in JSON format.

Role of MLOps in managing and using unstructured data

  • Similar to the regular structured data, the MLOps platform gives a foundation for the practice to access the data lake, set up intermediate components for transformation/tagging, use the model code to generate a trained model, and deploy the trained model to the web service.
  • Furthermore, the MLOps platform can automate various tasks, like data ingestion through the streaming API, scheduling the training, deploying the latest trained models, or sending the alerts to related stakeholders for an item that needsimmediate attention. In addition, the platform can generate regular reports for stakeholder’s consumption and give a baseline to the upcoming models.
  • With the advent of edge computing, trained models can also follow the hierarchical model. The parent trained model may be trained on the servers and be broadcasted to the IoT devices. This reduces the latency of the prediction and updated data requirements. This is quite relevant on video cameras for face/object detection.

Feature in xpresso.ai to handle Unstructured Data

  • xpresso.ai connects with multiple platforms on a regular basisto fetch data with specific parameters. The data can come in various extensions, and the API can give back various statistical figures for the data scientist to explore and decide their further course of action.
  • xpresso components can be customized for handling text, audio, and image data in streaming or batch format.
  • xpresso has universal connectors to fetch data from various data sources, which is typically a file system in case of unstructured data. Some examples. are Local FS, HDFS, or AWS S3. A dict parameter in the import_dataset method of class gives the repository specifications.
  • For UnstructuredDataset, the Data connector returns a pandas DataFrame with metadata information of file(s) constituting the file size, name, and path. xpresso then provides a basic explore method that helps to perform numeric analysis on the file sizes of all the files collected.
  • It calculates different numeric metrics (i.e. min, max, pdf, quartiles, mean, median, var, etc.) on file sizes. Since the data is in the pandas data frame, one is free to use other libraries to do more advanced analysis. It is a good practice to version the data at every step of transformation.
  • This data can be further used in the models for the predictions and analysis from the data.

Summary

  • Using unstructured data to meet business goals is an essential contribution to any organization’s AI/ML practice. xpresso platform helps automate the operations and keep the stakeholders informed about the common sentiment in the business arena.
  • The analysis of unstructured data would be of utmost importance when it would derive intelligence with structured data, identify the business’s action points, and help them devise the strategy to keep up with the market demand and competition.

Originally published at https://xpresso.ai on September 27, 2021.

--

--

xpresso ai
xpresso ai

Written by xpresso ai

A leading enterprise AI/ML platform that accelerates your journey from data to value

No responses yet