The emergence of prompt engineers: The next in-demand role in AI

Prompt engineers are emerging as key players in the development and optimization of AI models as artificial intelligence (AI) continues its evolution and becomes an integral part of various industries. As experts at crafting effective prompts, they have been instrumental in shaping the future of artificial intelligence through their ability to enable models to deliver accurate, contextually relevant responses.

Prompt-Ai

Doubtlessly, Prompt engineering is one of the most sought-after professions for 2023, according to recent statistics. If you would like to catch the hottest wave in AI at the moment, you may want to consider this career path. For developers who wish to maximize the potential of large language models, such as ChatGPT, prompt engineering tools may be of interest. These tools are a new class of tools designed to direct the LLM toward achieving the desired result. The article discusses the rise and importance of prompt engineers in artificial intelligence.

These words must have caught your attention – ‘AI will not take away your job, but someone who knows AI will.’

Prompting Effectively:

Prompt engineers specialize in designing prompts that achieve desired results from artificial intelligence models. With this knowledge, they can formulate precise and context-aware instructions based on the underlying architecture and capabilities of AI systems. In order to ensure high-quality responses, prompt engineers carefully select wording, adjust parameters, and optimize instructions.

Linguistic Skills and Domain Expertise:

In order to be a successful prompt engineer, it is necessary to have domain knowledge as well as technical expertise. In industries like healthcare, finance, and customer service, they are sensitive to nuances. As a result of their understanding of these domains, they are able to develop prompts that are tailored to meet the needs and challenges of each domain, thus ensuring accurate and reliable results generated by AI. To communicate instructions effectively and capture the desired intent, prompt engineers must also possess strong linguistic skills.

Refinement and Training of Models in an Iterative Manner:

In prompt engineering, prompts are refined and AI models are fine-tuned in an iterative process. Iteratively adjusting prompts achieves the desired outcomes by analyzing the output of the model, identifying improvements, and iteratively analyzing the output of the model. A collaborative effort between prompt engineers and data scientists ensures continuous improvement and better performance by training and optimizing AI models.

Bias Mitigation and Ethical Considerations:

AI ethics are greatly influenced by prompts. By preventing harmful or discriminatory outputs from AI models, prompt engineers ensure fairness, mitigate biases, and ensure fairness. By promoting inclusivity, adhering to ethical guidelines, and preventing bias or harmful information from being propagated, they seek to advance responsible AI development.

As AI Technologies Continue to Evolve, we must Adapt:

Professional engineers should stay abreast of the latest developments in artificial intelligence (AI). Prompt engineers should take into consideration the distinctive characteristics of new models and architectures as they emerge and adapt their prompt engineering strategies accordingly. In order for AI to be pushed to its limits, it is imperative that scientists are able to experiment with cutting-edge technologies and leverage innovative models.

Interdisciplinary Skills and Collaboration:

Data scientists, engineers, linguists, and subject matter experts all work closely with prompt engineers as part of a team. In order to effectively understand diverse perspectives, gather domain-specific knowledge, and establish actionable prompts, effective communication, collaboration, and interdisciplinary skills are essential.

Empowering Prompt Engineers with Prompt Engineering Tools in AI Development

As prompt engineers play a more prominent role in the AI ecosystem, new tools are emerging to support and streamline their work. Through prompt engineering tools, you can automate tasks, experiment with prompts, and enhance efficiency when creating chatbots, autonomous agents, and other AI applications. Artificial intelligence is rapidly developing and expanding, and prompt engineering tools have become a key component of that process.

• Generating and optimizing prompts: It is possible to generate and optimize prompts using prompt engineering tools. The company offers prebuilt prompt templates, natural language generation services, and automatic parameter optimization services. Various prompts can be explored by developers, customized for different use cases, and iteratively refined to achieve the desired results.  • The context-based prompting system consists of: AI model context and behavior can be controlled by these tools through prompts. Additional context can be specified, constraints can be defined, and conditional instructions can be added to prompts. Developing prompts that are contextually appropriate and more accurate can help developers guide AI models.  • A method for detecting and mitigating bias is described below: Bias detection and mitigation features are included in prompt engineering tools. As a result, prompt engineers are able to identify and address any unfair or discriminatory outcomes that may be present in prompts and model outputs as a result of those analyses. The tools enable prompt engineering to be conducted in a fair, transparent, and ethical manner.  • Workflow management and collaboration: Collaboration among prompt engineers, data scientists, and other stakeholders is enhanced by prompt engineering tools. To facilitate teamwork, track prompt iterations, and manage the overall workflow, they provide shared workspaces, version control, and collaboration features. Sharing knowledge and coordinating efficiently is facilitated by this.  • Monitoring and analytics of performance: It is possible to assess the effectiveness of prompts and model responses using these tools, which provide analytics and performance monitoring features. By utilizing this technology, developers can gain insight into how different prompts affect the performance of AI systems, understand user interactions, and measure the quality of output generated by the AI systems. In order to refine and optimize prompt strategies, prompt engineers utilize this data-driven approach.  • Platforms and libraries integrated with artificial intelligence: With prompt engineering tools, developers can leverage existing AI infrastructure and frameworks by seamlessly integrating them with popular AI platforms and libraries. Prompt engineers can seamlessly integrate prompt engineering workflows within larger AI pipelines since they are compatible with language models, conversational AI frameworks, and deployment platforms.  • Fine-tuning and model training: It is possible to train and fine-tune models using some prompt engineering tools that provide built-in functionality. AI models can be trained iteratively using annotated data, prompt strategies are adjusted, and performance is evaluated. These tools provide prompt engineers with a unified environment for refining prompts and optimizing models.

Developers can automate, collaborate, and optimize their AI development workflows with prompt engineering tools. Prompt engineers are increasingly needed, and these tools enable them to develop contextually relevant and responsible AI applications as they experiment with prompts, address biases, monitor performance, and create contextually relevant and responsible AI applications. AI-powered solutions will continue to evolve and succeed with continued advancements in prompt engineering tools.

Final Thoughts:

A prompt engineer plays a crucial role in the development of Artificial Intelligence, creating carefully crafted prompts to guide AI models in their behavior and output. AI systems they design align with real-world needs and values due to their expertise in domain knowledge, linguistic competencies, and ethical considerations. Prompt engineers will become increasingly important as artificial intelligence advances and are harnessed in order to drive innovation across various industries.

Zoom is entangled in an AI privacy mess

Zoom on phone and laptop

Does anyone read software services' terms and conditions? Lawyers do, but even their eyes have been known to glaze over. So until recently, no one had noticed that Zoom had changed its Terms of Service (ToS) in March 2023. Under its new terms, Zoom claimed the right to use your video, audio, and chat data for its artificial intelligence (AI) programs.

Privacy? Security? What's that?

Also: We're not ready for the impact of generative AI on elections

To be exact, the new terms gave Zoom the rights to any "data, content, files, documents, or other materials (collectively, 'Customer Input') in accessing or using the Services or Software, and Zoom may provide, create, or make available to you, in its sole discretion or as part of the Services, certain derivatives, transcripts, analytics, outputs, visual displays, or data sets resulting from the Customer Input (together with Customer Input, 'Customer Content')."

What are these "Customer Content" rights? First, "Zoom may redistribute, publish, import, access, use, store, transmit, review, disclose, preserve, extract, modify, reproduce, share, use, display, copy, distribute, translate, transcribe, create derivative works, and process Customer Content."

But wait, there's more. You also give Zoom "a perpetual, worldwide, non-exclusive, royalty-free, sublicensable, and transferable license and all other rights required or necessary to redistribute, publish, import, access, use, store, transmit, review, disclose, preserve, extract, modify, reproduce, share, use, display, copy, distribute, translate, transcribe, create derivative works, and process Customer Content and to perform all acts with respect to the Customer Content: (i) as may be necessary for Zoom to provide the Services to you, including to support the Services; (ii) for the purpose of product and service development, marketing, analytics, quality assurance, machine learning, artificial intelligence, training, testing, improvement of the Services, Software, or Zoom's other products, services, and software."

Also: How to block OpenAI's new AI-training web crawler from ingesting your data

The reaction to all this, when the good people on the forum of Ycombinator, the technology startup accelerator, found out was, shall we say, unhappy. Or, as one commenter put it, "I, for one, do not welcome our dystopian overlords."

After all the uproar about this over the weekend, Zoom changed its Terms of Service. Now, Zoom pinky swears: "Notwithstanding the above, Zoom will not use audio, video, or chat Customer Content to train our artificial intelligence models without your consent."

Uh-huh.

Zoom's Chief Product Officer Smita Hashim explained in a blog post that the company won't actually do the things described in its ToS. True, Zoom will use some of your data for machine learning. But according to the blog post, "For AI, we do not use audio, video, or chat content for training our models without customer consent."

But does that tacked-on clause and blog mean anything? Sean Hogle, a business and intellectual property attorney, thinks not. On Ycombinator, he wrote, "Zoom's lawyers are trying to pull a fast one with these revised Terms. The new sentence on user consent being required to train AIs applies only to 'Customer Content,' not 'Service Generated Data.'" Zoom can use this data, which is derived from your conferences and materials, without your consent.

Also: ChatGPT Plus can mine your corporate data for powerful insights. Here's how

Hogle continued, "Therein lies the rub.'"Service Generated Data' = 'any telemetry data, product usage data, diagnostic data, and similar content or data that Zoom collects or generates in connection with your or your End Users' use of the Services." Using this data, Hogle concluded, "This 'clarification' does nothing meaningful to assuage the serious data privacy concerns posed by Zoom's use of captured user video content."

In her blog post, Hashim continued, "We will not use customer content, including education records or protected health information, to train our artificial intelligence models without your consent." Of course, those were already protected under the Family Educational Rights and Privacy Act (FERPA) and Health Insurance Portability and Accountability Act (HIPAA), so that's not a big deal. The Department of Justice would have been over them for that.

Of course, to use some of Zoom's AI features, such as Zoom IQ, which offers automated meeting summaries, you must agree to let Zoom use your data. You also don't have any control over a meeting's privacy if you're just attending one and the person who called it has agreed to let Zoom look over your virtual shoulders to take its own notes.

Few people are happy about this. As Constellation Research analyst Dion Hinchcliffe put it, "Zoom certainly touched upon a major nerve of marketplace fears when its recently updated Terms of Service granted it an essentially unlimited license to all user content (video, audio, text) that passes through its platform… The big concern is that customer IP and people's private information will get stored in such models, where it could be misused."

Also: Generative AI and the fourth why: Building trust with your customer

Larry Dignan, former ZDNET Editor in Chief and present Constellation Research Editor in Chief, added, "Yet the terms of service still grant Zoom the license regardless… Vendors should go out of their way to take the high road with customer data. Those that don't establish and maintain very high levels of trust with customers regarding their data will not enjoy the fruits of the coming AI revolution."

Allen Drennan, co-founder and principal of Cordoniq, a virtual meeting company, agreed. In an email, Drennan wrote, "When private organizations are uploading internal confidential information and intellectual property into a meeting, they are not considering the ramifications of providing their data to a third-party provider managed in a cloud they do not control. The issue is not just limited to shared screens or multi-page confidential shared documents. It is also extended to recordings of the meetings and the audio and video used within the meeting. You really must have control over both security and privacy."

Hinchcliffe added on Twitter, or X, Zoom still takes "a 'perpetual, worldwide' license to all customer content so that you can 'review, disclose, preserve, extract, modify, reproduce, share, use, display, copy, distribute, translate, transcribe, create derivative works.' That is unreasonable and an overreach of customer content by quite a bit."

Who can argue with that? Other than Zoom, of course.

Also: Generative AI will soon go mainstream, says 9 out 10 IT leaders

In 2021, Zoom agreed to pay $85 million in a class action suit for sharing user data with unauthorized third parties such as Facebook, Google, and LinkedIn and misrepresenting the strength of its end-to-end encryption protocols.

In the same year, Zoom made a deal with the Federal Trade Commission (FTC), which required it to "implement a comprehensive security program, review any software updates for security flaws prior to release and ensure the updates will not hamper third-party security features." The FTC also required Zoom not to misrepresent its data collection practices.

According to John Davisson, director of litigation at the Electronic Privacy Information Center (EPIC) advocacy group, in comments to The Washington Post, this "appears to be a major violation, and it's something the FTC needs to take a close look at." Rep. Jan Schakowsky (D-Ill.), added, "Zoom has a poor track record of protecting consumers' data and living up to its promises — as their consent order and 2021 settlement prove."

It all boils down to whether you are comfortable with sharing private information with Zoom. As useful as Zoom proved to be during the pandemic, the answer for many companies and organizations faced with this new AI privacy threat appears to be no. As Eliot Higgins, founder of Bellingcat Productions, tweeted, "We run our training workshops on Zoom, so Zoom is effectively planning to train its AI on our entire workshop content with no compensation, so bye-bye Zoom."

I'm sure they won't be the only ones bidding Zoom adieu.

Artificial Intelligence

AI Superchip Showdown: NVIDIA GH200 vs Intel Gaudi2 vs AMD M1300X

NVIDIA recently announced its latest innovation, the next-generation NVIDIA GH200 Grace Hopper platform. This platform centers around an innovative Grace Hopper Superchip, featuring the world’s pioneering HBM3e processor.

The new setup is a game-changer, offering 3.5 times more memory capacity and 3 times more bandwidth than the current version. This setup includes a single server with 144 Arm Neoverse cores, delivering eight petaflops of AI performance and featuring 282GB of the latest HBM3e memory technology.

This technology has been carefully created to meet the needs of fast computing and the exciting world of generative AI. HBM3e memory, which is 50% faster than current HBM3, delivers a total of 10TB/sec of combined bandwidth, allowing the new platform to run models 3.5x larger than the previous version, while improving performance with 3x faster memory bandwidth. NVIDIA said that it expects to deliver this new AI chip by the second quarter of 2024.

The new platform uses the Grace Hopper Superchip, which can be connected with additional Superchips by NVIDIA NVLink, allowing them to work together to deploy the giant models used for generative AI. This high-speed, coherent technology gives the GPU full access to the CPU memory, providing a combined 1.2TB of fast memory when in dual configuration.

Races Ahead of AMD and Intel

Nvidia’s new gen GH200 is better than AMD 1300X which is supposed to come later this year. Recently, to challenge Nvidia, AMD integrated an additional 64 gigabytes of HBM3 memory into the M1300X.

The M1300X combines CNA3 with an industry-leading 192 gigabytes of HBM3 memory, delivering memory bandwidth of 5.2 terabytes per second which is lesser than 10TB/sec provided by GH200. Not only AMD, NVIDIA has also left behind Intel which lately is trying to catch up in the race to create GPUs that can be used to train LLMs.

GH200 is way ahead of Intel’s Gaudi2. The Gaudi2 memory subsystem includes 96 GB of HBM2E memories delivering 2.45 TB/sec bandwidth, in addition to a 48 MB of local SRAM with sufficient bandwidth to allow MME, TPC, DMAs and RDMA NICs to operate in parallel.

Continuing in the same vein, Intel has declared its entry into the AI chip domain this year, gearing up to compete with both NVIDIA and AMD. The forthcoming “Falcon Shores” chip by Intel is anticipated to showcase an impressive 288 gigabytes of memory capacity while supporting 8-bit floating point computation.

Falcon Shores will use regular ethernet switching, similar to Intel’s Gaudi architecture designed for AI tasks. It will have various amounts of HBM3 memory and adaptable I/O, probably indicating different memory options. Intel mentions it will offer up to 288GB of HBM3 memory and a total memory speed of 9.8 TB/s.

Intel’s Falcon Shores was delayed and is set to debut in 2025 with only GPU cores and it is uncertain about when they’ll introduce CPU cores to it. In their latest earnings call Intel CEO Pat Gelsinger said that Gaudi3 will be the volume product for next year and they are already working on Falcon Shores 2 for 2026.

Considering that NVIDIA’s GH200 is slated for an earlier release than Falcon Shore and Falcon Shore 2, the prospect of Intel surpassing NVIDIA seems quite improbable. Intel has outlined an array of ambitious strategies that they must successfully implement in order to outpace NVIDIA.

What about the software side?

One of the important aspects of NVIDIA’s hardware success is CUDA which enables parallel computing. One can say CUDA is the moat for NVIDIA when it comes to AI

To compete with CUDA ,AMD recently released an update to RocM. This is an important step forward for AMD, as CUDA has been one of NVIDIA’s biggest moats, especially in AI-accelerated workloads.

The large amount of memory bandwidth available on the chip through RocM will allow companies to buy lesser GPUs, making AMD an interesting value proposition for smaller companies with light to medium AI workloads. Similarly Intel also announced improvements on their CUDA alternative called oneAPI.

While NVIDIA has an upmarket strategy, AMD and Intel can continue to focus on opensource solutions for smaller companies to compete with NVIDIA.

The post AI Superchip Showdown: NVIDIA GH200 vs Intel Gaudi2 vs AMD M1300X appeared first on Analytics India Magazine.

Unveiling StableCode: A New Horizon in AI-Assisted Coding

Unveiling StableCode: A New Horizon in AI-Assisted Coding
Image created by author with Midjourney Overview

In the ever-evolving landscape of software development, the quest for efficiency and accessibility has led to the creation of various tools and platforms. Among the latest innovations is StableCode, a Large Language Model (LLM) generative AI product by Stability AI. Designed to assist both seasoned programmers and aspiring developers, StableCode promises to revolutionize the way we approach coding.

StableCode, the AI-powered assistant from Stability AI, can perform intelligent autocomplete, is able to respond to instructions, and can manage long spans of code. It incorporates three specialized models, each catering to different aspects of the coding process. Trained on an extensive dataset of over 560 billion tokens from diverse programming languages, StableCode aims to boost programmer productivity and lower barriers to entry in the field.

While existing conversational AI assistants like Llama, ChatGPT, and Bard have demonstrated capabilities in code writing, they are not optimized for the developer experience. StableCode joins tools like GitHub Copilot and other open-source models, offering a more tailored and efficient coding experience. This article explores the unique features, underlying technology, and potential impact of StableCode on the developer community.

StableCode Details

StableCode is constructed from three specialized models:

  • Base Model: Trained on a diverse set of programming languages, including Python, Go, Java, JavaScript, C, markdown, and C++.
  • Instruction Model: Tuned for specific use cases to help solve complex programming tasks.
  • Long-Context Window Model: Built to handle more code at once, allowing the user to review or edit up to five average-sized Python files simultaneously.

The standard autocomplete model, StableCode-Completion-Alpha-3B-4K, offers single and multi-line recommendations as developers type, enhancing efficiency and accuracy.

The instruction model, StableCode-Instruct-Alpha-3B, leverages natural language prompts to perform coding tasks, allowing for more intuitive interactions with the code.

With a long context window of up to 16,000 tokens, StableCode can manage extensive code bases, providing a more comprehensive view and control over the coding process.

StableCode's training involved significant filtering and cleaning of the BigCode data. The model underwent successive training on specific programming languages, following a similar approach to natural language domain modeling.

Unlike other models that weigh current tokens more than past ones, StableCode uses rotary position embedding (RoPE), ensuring a more balanced consideration of code functions without a set narrative structure.

StableCode's unique features and technology promise to significantly enhance developer workflows. With twice the context length of most existing models and carefully tuned models, it offers greater efficiency and precision.

By providing an intelligent and accessible platform, StableCode has the potential to lower the barrier to entry for new programmers, fostering a more inclusive and diverse developer community.

Unveiling StableCode: A New Horizon in AI-Assisted Coding
HumanEval Benchmark Comparison with models of similar size(3B)
Source: Stability AI Conclusion

StableCode represents a significant step in the evolution of coding assistance. Its unique combination of specialized models, intelligent autocomplete, and advanced technology sets it apart from existing tools. By offering a more tailored and efficient coding experience, it stands as a revolutionary tool in the software development landscape.

More than just a coding assistant, StableCode embodies Stability AI's vision to empower the next billion software developers. By making technology more accessible and providing fairer access to coding resources, StableCode is poised to help shape the future of software development and inspire a new generation of programmers.

Matthew Mayo (@mattmayo13) is a Data Scientist and the Editor-in-Chief of KDnuggets, the seminal online Data Science and Machine Learning resource. His interests lie in natural language processing, algorithm design and optimization, unsupervised learning, neural networks, and automated approaches to machine learning. Matthew holds a Master's degree in computer science and a graduate diploma in data mining. He can be reached at editor1 at kdnuggets[dot]com.

More On This Topic

  • Unveiling Midjourney 5.2: A Leap Forward in AI Image Generation
  • Unveiling the Potential of CTGAN: Harnessing Generative AI for Synthetic…
  • Unveiling the Power of Meta's Llama 2: A Leap Forward in Generative AI?
  • Fear not, for AI coding is here to help you!
  • GPT-Engineer: Your New AI Coding Assistant
  • 7 Must-Know Python Tips for Coding Interviews

Generative AI megatrends: implications of GPT-4 drift and open source models – part two

Generative AI megatrends: implications of GPT-4 drift and open source models – part two

Background

In the previous part of this blog, we explored the limitations of GPT-4. In this post, we will explore if open source models can overcome the limitations of black box models. Specifically, we will consider the use of LLama2 in this scenario.

The llama 2 paper from Meta is very comprehensive.

Llama 2, is a family of LLMs released in three flavours: 7B, 13B and 70B parameters. It consists of two distinct families of models Llama 2 was pretrained on publicly available online data sources and is an updated version of Llama . The fine-tuned model, Llama-2-chat, leverages publicly available instruction datasets and over 1 million human annotations.Llama 2-Chat is optimised for dialogue use cases.

The most important characteristic of the paper is its depth and transparency covering the following aspects:

  • Use of safety-specific data annotation,
  • Transparency in terms of fine tuning strategies, training corpus, handling personal information, hyperparameter tuning,
  • up-sampling factual sources to enhance knowledge and minimize hallucinations.
  • Details about Supervised Fine-Tuning (SFT) stage and Reinforcement Learning with Human Feedback (RLHF) RLHF and Reward models.

Analysis

Safety and transparency is a focus of LLama 2. In this sense, it overcomes the challenges of drift in black box models like GPT. However, there are some more nuances. Currently, llama 2 outperforms other open source LLMs but not the closed source LLMs like GPT. If usage picks up, over time, it could outperform them. Also, because Llama 2 is released in three sizes, it could be more easily deployed within the enterprise making it ideal for regulated industries through on prem deployment. On the other hand, on prem open source deployments are technically more complex. Finally, it depends on the use case and how you use it .. ie if the output of the LLM is directly exposed to the end user.

Image source: drifting sands over time https://pixabay.com/photos/india-desert-sand-pattern-sand-355/

Oracle Unveils Oracle Compute Cloud@Customer To Enhance OCI Flexibility

Oracle today introduced its latest innovation, Oracle Compute Cloud@Customer, an advanced rack-scale cloud infrastructure solution that empowers organizations to leverage Oracle Cloud Infrastructure (OCI) compute services in various environments.

This technology enables businesses to develop, deploy, secure, and manage workloads utilizing the same software stack as OCI, accommodating deployments ranging from single racks to large-scale infrastructures.

The significance of this development is that it provides a unified experience regardless of where services are utilized. By launching Compute Cloud@Customer, Oracle is bridging the gap between on-premises and cloud-based services, offering a consistent user experience throughout various deployment scenarios.

Organizations can tap into Oracle’s extensive resources, leveraging the OCI compute, storage, and networking services, alongside adaptable virtual machine (VM) shapes, all within their own data centers.

Edward Screven, Chief Corporate Architect at Oracle, emphasized the importance of delivering a consistent experience for users, irrespective of their chosen deployment model. “Oracle provides a choice of OCI public cloud regions, Dedicated Region, and Cloud@Customer platforms that customers can combine to create a globally distributed cloud solution,” he said.

Furthermore, industry expert Ron Westfall, Research Director at The Futurum Group, praised Oracle’s approach, highlighting the comprehensiveness of Compute Cloud@Customer as compared to alternative solutions. “Oracle’s latest Compute Cloud@Customer offering clearly delivers the same compute, storage, networking, APIs, control plane, and a growing list of services that are also available in OCI,” Westfall stated, reinforcing Oracle’s commitment to providing a complete cloud experience.

Oracle Compute Cloud@Customer boasts impressive features, including scalability and flexibility. Starting from 552 processor cores and 150 TB of usable storage, the solution can be seamlessly expanded to accommodate organizations of varying sizes, with the capacity to scale compute and storage independently to over 6,000 processor cores and 3.4 PB of storage.

Furthermore, data on Compute Cloud@Customer is encrypted, meeting stringent data residency and privacy requirements. The OCI Console allows precise control over data locality, replication, and backups.

The post Oracle Unveils Oracle Compute Cloud@Customer To Enhance OCI Flexibility appeared first on Analytics India Magazine.

Times Series Analysis: ARIMA Models in Python

Time series analysis is widely used for forecasting and predicting future points in a time series. AutoRegressive Integrated Moving Average (ARIMA) models are widely used for time series forecasting and are considered one of the most popular approaches. In this tutorial, we will learn how to build and evaluate ARIMA models for time series forecasting in Python.

What is an ARIMA Model?

The ARIMA model is a statistical model utilized for analyzing and predicting time series data. The ARIMA approach explicitly caters to standard structures found in time series, providing a simple yet powerful method for making skillful time series forecasts.

ARIMA stands for AutoRegressive Integrated Moving Average. It combines three key aspects:

  • Autoregression (AR): A model that uses the correlation between the current observation and lagged observations. The number of lagged observations is referred to as the lag order or p.
  • Integrated (I): The use of differencing of raw observations to make the time series stationary. The number of differencing operations is referred to as d.
  • Moving Average (MA): A model takes into account the relationship between the current observation and the residual errors from a moving average model applied to past observations. The size of the moving average window is the order or q.

The ARIMA model is defined with the notation ARIMA(p,d,q) where p, d, and q are substituted with integer values to specify the exact model being used.

Key assumptions when adopting an ARIMA model:

  • The time series was generated from an underlying ARIMA process.
  • The parameters p, d, q must be appropriately specified based on the raw observations.
  • The time series data must be made stationary via differencing before fitting the ARIMA model.
  • The residuals should be uncorrelated and normally distributed if the model fits well.

In summary, the ARIMA model provides a structured and configurable approach for modeling time series data for purposes like forecasting. Next we will look at fitting ARIMA models in Python.

Python Code Example

In this tutorial, we will use Netflix Stock Data from Kaggle to forecast the Netflix stock price using the ARIMA model.

Data Loading

We will load our stock price dataset with the “Date” column as index.

import pandas as pd      net_df = pd.read_csv("Netflix_stock_history.csv", index_col="Date", parse_dates=True)  net_df.head(3)

Times Series Analysis: ARIMA Models in Python

Data Visualization

We can use pandas 'plot' function to visualize the changes in stock price and volume over time. It's clear that the stock prices are increasing exponentially.

net_df[["Close","Volume"]].plot(subplots=True, layout=(2,1));

Times Series Analysis: ARIMA Models in Python

Rolling Forecast ARIMA Model

Our dataset has been split into training and test sets, and we proceeded to train an ARIMA model. The first prediction was then forecasted.

We received a poor outcome with the generic ARIMA model, as it produced a flat line. Therefore, we have decided to try a rolling forecast method.

Note: The code example is a modified version of the notebook by BOGDAN IVANYUK.

from statsmodels.tsa.arima.model import ARIMA  from sklearn.metrics import mean_squared_error, mean_absolute_error  import math      train_data, test_data = net_df[0:int(len(net_df)*0.9)], net_df[int(len(net_df)*0.9):]      train_arima = train_data['Open']  test_arima = test_data['Open']      history = [x for x in train_arima]  y = test_arima  # make first prediction  predictions = list()  model = ARIMA(history, order=(1,1,0))  model_fit = model.fit()  yhat = model_fit.forecast()[0]  predictions.append(yhat)  history.append(y[0])

When dealing with time series data, a rolling forecast is often necessary due to the dependence on prior observations. One way to do this is to re-create the model after each new observation is received.

To keep track of all observations, we can manually maintain a list called history, which initially contains training data and to which new observations are appended each iteration. This approach can help us get an accurate forecasting model.

# rolling forecasts  for i in range(1, len(y)):      # predict      model = ARIMA(history, order=(1,1,0))      model_fit = model.fit()      yhat = model_fit.forecast()[0]      # invert transformed prediction      predictions.append(yhat)      # observation      obs = y[i]      history.append(obs)  

Model Evaluation

Our rolling forecast ARIMA model showed a 100% improvement over simple implementation, yielding impressive results.

# report performance  mse = mean_squared_error(y, predictions)  print('MSE: '+str(mse))  mae = mean_absolute_error(y, predictions)  print('MAE: '+str(mae))  rmse = math.sqrt(mean_squared_error(y, predictions))  print('RMSE: '+str(rmse))
MSE: 116.89611817706545  MAE: 7.690948135967959  RMSE: 10.811850821069696

Let's visualize and compare the actual results to the predicted ones . It's clear that our model has made highly accurate predictions.

import matplotlib.pyplot as plt  plt.figure(figsize=(16,8))  plt.plot(net_df.index[-600:], net_df['Open'].tail(600), color='green', label = 'Train Stock Price')  plt.plot(test_data.index, y, color = 'red', label = 'Real Stock Price')  plt.plot(test_data.index, predictions, color = 'blue', label = 'Predicted Stock Price')  plt.title('Netflix Stock Price Prediction')  plt.xlabel('Time')  plt.ylabel('Netflix Stock Price')  plt.legend()  plt.grid(True)  plt.savefig('arima_model.pdf')  plt.show()  

Times Series Analysis: ARIMA Models in Python Conclusion

In this short tutorial, we provided an overview of ARIMA models and how to implement them in Python for time series forecasting. The ARIMA approach provides a flexible and structured way to model time series data that relies on prior observations as well as past prediction errors. If you're interested in a comprehensive analysis of the ARIMA model and Time Series analysis, I recommend taking a look at Stock Market Forecasting Using Time Series Analysis.
Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master's degree in Technology Management and a bachelor's degree in Telecommunication Engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.

More On This Topic

  • Time Series Forecasting with Ploomber, Arima, Python, and Slurm
  • Codeless Time Series Analysis with KNIME
  • Full cross-validation and generating learning curves for time-series models
  • Multivariate Time Series Analysis with an LSTM based RNN
  • Market Data and News: A Time Series Analysis
  • Create a Time Series Ratio Analysis Dashboard

Weights & Biases, which counts OpenAI as a customer, lands $50M

Weights & Biases, which counts OpenAI as a customer, lands $50M Kyle Wiggers 8 hours

One of the more prolific AI and machine learning development platforms, Weights & Biases has secured a new tranche of cash from ex-GitHub CEO Nat Friedman and former Y Combinator partner Daniel Gross.

Friedman and Gross, alongside existing investors Coatue, Insight Partners, Felicis, Bond, BloombergBeta and Sapphire, have invested $50 million in Weights & Biases in a strategic round that values the company at $1.25 billion. Bringing the startup’s total raised to $250 million, the investment comes as Weights & Biases prepares to launch Prompts, a new product designed to help users monitor and evaluate the performance of large language models (LLMs) along the lines of OpenAI’s GPT-4.

The $50 million investment is far smaller than Weights & Biases’ previous haul, its Series C, which came in at around $135 million. But Lavanya Shukla, VP of growth at Weights & Biases, described it as opportunistic.

“We believe that giving employees machine learning tools should be table-stakes for CTOs and their teams,” she told TechCrunch in an email interview. “By tackling testing, security and reliability, Weights & Biases sits at a critical point along the development of a successful machine learning model.”

Lukas Biewald and Chris Van Pelt co-founded Weights & Biases in 2017, after spending years working on tools for machine learning engineers and data scientists. The two previously launched Figure Eight, formerly known as CrowdFlower, to recruit crowdworkers to label training data for machine learning algorithms. (Figure Eight was acquired by Appen in 2019 for $175 million.)

“The two identified a bigger problem: That machine learning practitioners didn’t have a great system of record for their experiments,” Shukla said. “This highly experimental yet crucial science was being logged in spreadsheets and degraded screenshots.”

So Biewald and Van Pelt joined forces with a third co-founder, a Google alumnus and developer Shawn Lewis, in an attempt to solve for that problem. Over the course of the next several years, they built the MVP for Weights & Biases: workflows to support the machine learning development life cycle.

Weights & Biases occupies a category of platforms known as MLOps, or machine learning operations, which enable data scientists to create new machine learning models and run them through repeatable, automated workflows that deploy them into production. As the demand for AI has grown, so, too, has the demand for MLOps platforms. Allied Market Research estimates that the MLOps segment will be worth $23.1 billion by 2023.

New MLOps platforms emerge on the regular. To name a few, there’s Seldon, FedML, Qwak, Galileo, Striveworks, Arize, Comet and Tecton. That’s ignoring offerings from incumbents like Azure, AWS and Google Cloud.

But what differentiates Weights & Biases is its approach to MLOps, Shukla claims.

First, all of Weights & Biases’ products were co-designed with partners and customers in an effort to ensure they meet the needs of those partners and customers, Shukla says. Second, the platform places an emphasis on tools to interrogate the datasets used to train models, allowing customers to check for issues that might arise, like biases and the presence of personally identifiable information — ideally before those datasets go into production.

Weights & Biases

Weights & Biases monitoring platform for machine learning operations. Image Credits: Weights & Biases

“Weights & Biases is the leading machine learning platform to help developers build better models faster,” Shukla said. “We build lightweight, interoperable tools to quickly track experiments, version and iterate on datasets, evaluate model performance, reproduce models, visualize results and spot regressions, and share findings with colleagues. This lets machine learning engineers quickly iterate on their machine learning pipelines with the confidence that their datasets and models are tracked and versioned in a reliable system of record.”

Whatever other advantages Weights & Biases has, first mover is almost certainly one of them.

The platform’s solution is integrated in over 20,000 open source repositories, Shukla claims, and Weights & Biases has been cited in hundreds of machine learning academic research papers. It’s also the toolset of choice for high-profile, well-funded generative AI model builders, including OpenAI, Aleph Alpha, Cohere, Anthropic and Hugging Face.

“OpenAI trains all models on Weights & Biases. With hundreds of employees running thousands of experiments, it is critical that OpenAI has a way to test, identify issues and debug their models quickly,” Shukla said. “OpenAI also has to do a lot of training runs on small subsets of their data. Thanks to Weights & Biases, they were able to train GPT-4 faster.”

Beyond the generative AI cohort, Weights & Biases has 700,000 users — up from 100,000 in 2021 — and more than 1,000 paying users. Its team, meanwhile, has grown to over 200 people, most based in its headquarters in San Francisco.

Weights & Biases is aiming to grow that customer base further with Prompts, its alluded-to new product, which allows users to interrogate an LLM’s outputs and fine-tune the LLMs themselves.

“LLMs may reduce the number of people you need to train models, but they will increase the number of people who companies need to fine-tune, interface and build apps with those models,” Shukla said. “The goal of Prompts is also to serve a new class of users and change how big labs build machine learning models. In addition to prompt engineers and fine-tuners, researchers and companies building unique internal models will have more tools to improve their models.”

As for Weights & Biases, it’ll have a reason to continue building out its MLOps suite.

DSC Weekly 8 August 2023

Announcements

  • Governance, Risk and Compliance (GRC) programs empower organizations of all industries and sizes to better manage crucial activities within the company – boosting the effectiveness of people, business processes, technology, and other vital business elements. At the upcoming Building Resilience Through GRC Strategies summit, gain valuable insights from experts and industry leaders regarding risk mitigation, compliance requirements, best practices and pitfalls of GRC programs, and more. Register for free and gain access to live webinars, fireside chats and keynote presentations from the world’s leading GRC innovators, vendors and evangelists.
  • Organizations have been ramping up their cloud adoption and expanding their digital infrastructures, but often without much concern for the environmental impact of these operations. Balancing the need for substantial data infrastructure with more eco-friendly policies should be top of all organizational to-do lists, and creating a specific data center decarbonization strategy will be key.This will range from improving the visibility and measurement of power usage, to actually reducing the carbon footprint of each operational layer. In the upcoming webinar Decarbonizing the Data Center: Making Data Modernization More Sustainable, panelists from Cisco and Hitachi Vantara will discuss the changing attitude to data center sustainability and cloud carbon emissions, the importance of understanding your energy consumption baseline, and much more.

Top Stories

  • The emergence of prompt engineers: The next in-demand role in AI
    August 8, 2023
    by Roger Brown
    Prompt engineers are emerging as key players in the development and optimization of AI models as artificial intelligence (AI) continues its evolution and becomes an integral part of various industries. As experts at crafting effective prompts, they have been instrumental in shaping the future of artificial intelligence through their ability to enable models to deliver…
  • Integrating GenAI into “Thinking Like a Data Scientist” Methodology – Part I
    August 6, 2023
    by Bill Schmarzo
    It’s incredible how many organizations utilize Generative AI (GenAI) and Large Language Models (LLMs) to enhance their information assembly, integration, and application abilities. These GenAI technologies have been applied in various areas, from drafting legal documents and resolving service issues to coding software applications and (er, um) writing blog posts. The potential uses of GenAI…
  • Scaling Supply Base Data and Reuse with Knowledge Graphs and LLMs
    August 7, 2023
    by Alan Morrison
    Fair Data Forecast Interview with Gregor Stühler of Scoutbee Scoutbee’s CEO and founder, Gregor Stühler, who has a background in computer science and electrical engineering, first learned about the challenges of procurement and supply base management as a project engineer for a multinational medical device company. Scoutbee’s focus on solving supply base problems through hybrid…
Education_DSC_160x600-2

In-Depth

  • AI’s transformative role in software testing and debugging
    August 4, 2023
    by John Lee
    AI has revolutionized software development. AI has transformed software testing and debugging by automating mundane tasks and solving complex problems. Manual testing no longer requires hours and resources. AI has revolutionized testing, code quality, and development time. This article explores AI’s profound impact on software testing and debugging, including its benefits, risks, and how it…
  • Generative AI megatrends: implications of GPT-4 drift and open source models – part one
    August 4, 2023
    by ajitjaokar
    In this two part discussion, we will discuss two related generative AI megatrends Backgroumd A recent paper How Is ChatGPT’s Behavior Changing over Time? from Stanford University and UC Berkeley claims that the performance of GPT-4 has drifted over time. To make this claim, specific tasks were evaluated (ex: accuracy of maths) and the results…
  • How can Data Scientists use ChatGPT for developing Machine Learning Models?
    August 3, 2023
    by Aileen Scott
    Data Science is a vast field that incorporates several processes. From problem definition to data collection and data cleaning to data visualization, a lot of things are included in the entire data science project development process. Data Scientists are especially responsible for these tasks. They are expert professionals who are well-versed with various data…
  • DSC Webinar Series: OCI & HARC: Modernizing Workloads in the Oracle Cloud
    August 2, 2023
    by Ben Cole
    The convergence of Oracle Cloud Infrastructure (OCI) and Hitachi Application Reliability Centers (HARC) to magnify outcomes for customers. Tech giants Oracle and Hitachi Vantara are marching together to magnify cloud outcomes. Join us for the Oracle and Hitachi Vantara virtual event, where we discuss how businesses can get the most out of OCI and HARC.…
  • Emerging AI statistics and trends to watch
    August 2, 2023
    by Anas Baig
    Artificial intelligence, or AI, has often been depicted as a terrifying force, from HAL 9000’s chilling declaration in “2001: A Space Odyssey” to the apocalyptic machine uprising in the Terminator movies. However, in reality, AI has become an integral part of our daily lives, with AI-powered Android devices in our pockets. Though we may not…
  • DSC Weekly 1 August 2023
    August 1, 2023
    by Scott Thompson
    Read more of the top articles from the Data Science Central community.
  • I bet you think this article is about ChatGPT
    August 1, 2023
    by Kirk Borne
    Generative AI has been around for a long time. Some sources say that it appeared as early as the 1950’s. Other sources point to the first rudimentary chatbots that were introduced in the 1960’s. Whatever the true point of origin, we can all agree that those were small pebbles on the historical timeline compared to… Read […]

Slack’s Three-Year Makeover: From Sluggish to Slick

“I Slacked you” has been a well known phrase in the corporate town since 2014. The productivity platform indirectly benefited during the pandemic; the same time it got its last redesign.

“A lot of that research from over the years factored into just the fundamental layout that we provided here. From knowing how users use the product today and what they’ve told us over the years. Both from qualitative sessions that we’ve done with user research, but then also from some quantitative surveys,” Brad Monroe, senior product manager of Slack told AIM.

Slack is unveiling a substantial platform update with a completely revamped interface. By providing improved access to essential work tools, this redesigned Slack version elevates the overall user experience, offering a more streamlined, enjoyable, and efficient approach to work in today’s contemporary work landscape.

Setting Boundaries

The platform has not been the best communication method for user focus and deep work over the past. The internet is filled with users complaining about the platform’s nature of massive distraction. Monroe’s personal favourite part of the update is the all new activity view — a solution to the focus issue. “It’s a one stop shop for the overall application to catch up on things that require your attention, without getting distracted by all the other conversation going on in Slack that may not be really pertinent to you” he said, “Think of it like a single pane of glass”.

The research team has analysed the current interface to understand ‘what the users find distracting’ and ‘the cognitive overload due to dots popping up everywhere when they open Slack’.

“Though this might seem like a purely cosmetic change to the app overall, this was the culmination of architectural work that we’ve been working on for some years.”

Furthermore, the platform has a ‘clicking issue’. One of the things that Monroe and his team has heard from users over the years is when they go to search results, they often may not find the first result. That involved a lot of clicking. ”For that, we are introducing the two panel design to see your results on the right. It’s taking away a lot of the friction that users face while navigating to find the right result,” he proudly revealed.

No AI Interference (Yet)

While Slack’s competitor Zoom struggles to clarify its own policy about training AI on user data, the former continues to opt for the ‘No genAI’ approach for its platform. “There’s not any net new AI kind of updates in the app. This update gives our existing toolset a nice home,” clarified Monroe. But he further mentioned that the iterations do set the foundation for the new services that will be launched in the future.

For now, there’s three main areas of this update. First is how Slack lets users easily navigate their channels and conversations. Second, the team has worked for users to focus on what’s important, so they can knock out whatever their task is at hand during their day. Third, being able to easily find and use the essential tools that users need throughout their workday.

Over the years, a variety of tools have been added in Slack except a canvas for knowledge management. Henceforth, the productivity platform will have a unified ‘Create’ menu allowing the users to create anything simultaneously.

Monroe also mentioned that the team has intentionally kept some things very similar to ease that transition for users so that not everything is different. “At this point, we’ve learned a lot from that [2020] redesign, and we’re applying some of those learnings here. Like for example, we’re doing a lot of outreach to our customers ahead of time so that they know this is coming. We want to ease that transition as much as possible,” he concluded.

The post Slack’s Three-Year Makeover: From Sluggish to Slick appeared first on Analytics India Magazine.