[데이터분석] 시계열 데이터에 AI를 사용하는 이유는 무엇입니까?

시계열 데이터에 AI를 사용하는 이유는 무엇입니까?

세르지오 비라 혼다

나를 평가:

5.00 / 5 (4 투표)

2021 년 2 월 24 일CPOL

이 일련의 기사는 AI를 사용하여 완전한 기능의 시계열 예측기 및 이상 탐지기 애플리케이션을 개발하는 데 필요한 단계를 안내합니다.

이 기사에서는 시계열 데이터의 특성과 중요성에 대해 설명합니다.

[다운로드] AnomalyDetection-main (3).zip

소개

우리 모두는 오늘날 AI가 얼마나 트렌디한지 알고 있습니다. 이미지 분류, 객체 감지, 회귀 등 가장 일반적인 AI 애플리케이션에 대한 많은 문서와 기사가 있습니다. 데이터 시퀀스에 대한 내용을 본다면 주제 분류를위한 텍스트 데이터 또는 이러한 라인을 따르는 내용 일 가능성이 큽니다.

시퀀스 데이터의 이상 탐지는 어떻습니까? 이것은 특히 센서, 주식 또는 암호 화폐 가격, 심지어 공장에 설치된 센서에서 나오는 시계열 날씨 측정과 같이 실시간으로 제공되는 데이터에 대해주의가 필요합니다. 선박 엔진에서 미래의 이상을 감지 할 수 있다는 것을 상상해보십시오 – 그것이 붕괴되기 전에 그것을 종료 할 수 있도록 – 그것이 놀랍지 않습니까?

이 일련의 기사는 AI를 사용하여 완전한 기능의 시계열 예측기 및 이상 탐지기 애플리케이션을 개발하는 데 필요한 단계를 안내합니다. 우리의 예측 자 / 탐지기는 특히 비트 코인으로 암호 화폐 데이터를 다룰 것 입니다. 그러나이 시리즈를 따라 가면 학습 한 개념과 접근 방식을 유사한 성격의 모든 데이터 유형에 적용 할 수 있습니다.

이 시리즈를 최대한 활용하려면 Python , Machine Learning 및 Keras 기술 이 있어야 합니다. 전체 프로젝트는 내 GitHub 저장소 에서 사용할 수 있습니다 . 여기 와 여기 에서 완전한 대화 형 노트북을 확인할 수도 있습니다 .

AI 컨텍스트에서 시계열 데이터 이해

시계열에 대한 간략한 설명부터 시작하겠습니다. 전통적인 기계 학습 분류 및 회귀 문제에만 익숙하다면 시계열 데이터가 약간 놀라 울 것입니다. 익숙해지는 데 시간이 걸릴 수있는 완전히 다른 종류의 모델링 작업입니다. 그것의 시간적 구조는 관측이 다른 유형의 분석 에서처럼 취급 될 수없는 순서를 갖도록 만듭니다.

시계열 데이터는 시간상 동일한 간격의 관측 시퀀스로 설명 될 수 있습니다. 이러한 유형의 데이터는 말 그대로 모든 곳에서 찾을 수 있습니다. 기상 학자로서의 날씨 정보, 경제학자 또는 상인으로서의 주식 / 암호 화폐 가격, 건강 분야의 경우 심전도, 지진 학적 판독 값 및 모든 종류의 센서에서 오는 데이터에서 찾을 수 있습니다. 특히 AI 컨텍스트에서이를 분석하여 달성 할 수있는 것이 무엇인지 상상해보십시오.

예를 살펴 보겠습니다. 아래 표는 뉴욕의 센서에서 캡처 한 날씨 판독 값을 포함하는 이 데이터 세트 의 처음 5 개 행을 보여줍니다 . 인덱스를 주시하고 시간상 균등 한 간격 (하루에 하나의 레코드)에 있는지 확인하십시오.

 

각 열은 매일 샘플링되는 현상을 설명하는 변수를 나타냅니다. AWND는 시간당 킬로미터 단위의 평균 풍속, 밀리미터 단위의 평균 강수량에 해당하는 PRCP, 섭씨로 측정 된 평균 온도 인 TAVG에 해당합니다.

사용 가능한 모든 TAVG 데이터를 산점도에 표시해 보겠습니다.

 

보시다시피 데이터 포인트의 시퀀스를 유지하는 것은 기본 구조를 이해하는 데 중요합니다. 이 경우, 그것은 순차 순서를 존중하지 않으면 눈치 채지 못할 측면 인 명백한 추세를 나타냅니다.

위의 개념은 특히 데이터 과학 및 기계 학습 분야에서 여러 작업에 대한 기초를 제공합니다. 내일의 날씨를 예측할 수 있다고 상상해보십시오 (예측은 일련의 과거 값을 고려하여 미래 가치를 예측하는 작업입니다). 비가 내릴지 또는 더 발전된 경우 내일의 기온이 날씨 기록의 이상을 나타내는 지 여부 (이상 감지).

이 아이디어는 유사한 데이터 유형의 데이터로 추정 할 수 있습니다. 예를 들어 내일의 비트 코인 가격을 예측할 수 있습니다. 시장에서 변칙성을 나타낼까요? 그렇다면,이를 기반으로 구매 또는 판매 결정을 내리는 것은 어떻습니까? 흥미롭지 않겠습니까?

[출처] https://www.codeproject.com/Articles/5295160/Why-Use-AI-on-Time-Series-Data

Why Use AI on Time-Series Data?

Sergio Virahonda

Rate me:

5.00/5 (4 votes)

24 Feb 2021CPOL

This series of articles will guide you through the steps necessary to develop a fully functional time series forecaster and anomaly detector application with AI.

In this article, we discuss the nature and importance of time series data.

Introduction

We all know how trendy AI is nowadays. There is a lot of documentation and articles about the most common AI applications: image classification, object detection, regression, and so on. If you see something about data sequences, it’s likely to be about text data for topic classification or something along these lines.

What about anomaly detection in sequence data? This definitely requires attention, especially for the data that comes in real time, such as time-series weather measurements coming from sensors, stock or cryptocurrency prices, or even sensors installed in a factory. Just imagine being able to detect future anomalies in a ship engine – so that you can shut it down before it collapses – wouldn’t that be amazing?

This series of articles will guide you through the steps necessary to develop a fully functional time series forecaster and anomaly detector application with AI. Our forecaster/detector will deal with the cryptocurrency data, specifically with Bitcoin. However, after following along with this series, you’ll be able to apply the concepts and approaches you’ve learned to any data type of similar nature.

To fully benefit from this series, you should have some Python, Machine Learning, and Keras skills. The entire project is available in my GitHub repository. You can also check out the fully interactive notebooks here and here.

Understanding Time Series Data in the AI Context

Let’s start with a brief explanation of time-series. If you’re familiar only with the traditional Machine Learning classification and regression problems, time series data would come as a bit of a surprise. It is a completely different kind of modeling task that can take some time to get familiar with. Its temporal structure makes the observations to have an order that cannot be treated like in any other type of analysis.

Time series data could be described as sequences of observations equally spaced in time. This type of data can be found literally everywhere. You can find it in the weather info as a meteorologist, in the stock/cryptocurrency prices as an economist or trader, in an electrocardiogram if you’re in the health field, in seismological readings – and in data coming from any kind of sensor. Imagine what you could achieve by analyzing it, especially in the AI context.

Let’s look at an example. The table below shows the first 5 rows of this dataset, which contains the weather readings captured by sensors in New York. Keep an eye on its index and notice that they are equally spaced in time – one record in one day:

 

AnomalyDetection-main (3).zip

 

AnomalyDetection-main (3).zip

Each column represents a variable that describes a phenomenon sampled every day. AWND corresponds to average wind speed in kilometers per hour, PRCP – to average precipitation in millimeters, and TAVG – to average temperature measured in Centigrade.

Let’s display all the available TAVG data in a scatter plot:

 

AnomalyDetection-main (3).zip

As you can see, keeping the sequence of the data points is crucial to understand its underlying structure. In this case, it represents an obvious trend, an aspect that you wouldn’t notice if you didn’t respect the sequential order.

The above concept provides a basis to several tasks, especially in the data science and Machine Learning fields. Just imagine being able to forecast tomorrow’s weather (forecasting is the task of predicting a future value given a series of past ones). Whether it’s going to rain or, in more advanced cases, whether tomorrow’s temperature represents an anomaly in the weather history (anomaly detection).

This idea can be extrapolated to any data of similar data type. For example, you could predict tomorrow’s Bitcoin price. Will it represent an anomaly in its market? And if yes, how about making a decision to buy or sell based on it… wouldn’t that be exciting?

Next Step

In the next article, we’ll discuss pre-processing of the time series data for forecasting and anomaly detection tasks based on Bitcoin’s historical price. Stay tuned!

 

 

 

 

 

+ Recent posts