何时需要对时间序列进行Log Transformation

处理时间序列数据时,经常需要对数据进行预处理,然后在使用复杂模型处理数据。其中,常用的一种方法就是对数据取log,进行log变形。那么什么样的时间序列数据需要进行取log呢?查阅资料发现,如果数据满足如下两点,就比较适合take log。

  1. 每个时刻的数据都为正数(为0时,可以通过+1来变为正数)
  2. 数据的变化量随着时间的增加,指数级增加

以一个具体的例子来看:

原始数据:

take log后的数据:

take log之后,可以更清晰的排除增加量带来的影响,更清晰地看出数据变化的规律。

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-10-25 06:20:24

何时需要对时间序列进行Log Transformation的相关文章

数据挖掘——Data competition: From 0 to 1: Part I

Data competition: From 0 to 1: Part I 1. Data competition Introduction 2. Example: Credit Fraud Detector EDA(Exploratory Data Analysis) Why taking log transformation of continuous variables? Outliers Detection Unbalance Metrics Resampling Cross-valid

数据标准化-对数处理

一直在思考在对数据进行处理时,对数化比如 log2或者是log10处理的目的,感觉下面的说法很有道理: Log transformation is just one way to make the skewed distribution less skewed. For parametric statistical methods, it helps to satisfy the assumption of inferential statistics. For non-parametric m

7 Types of Regression Techniques you should know!

7 Types of Regression Techniques you should know! Introduction Linear and Logistic regressions are usually the first algorithms people learn in predictive modeling. Due to their popularity, a lot of analysts even end up thinking that they are the onl

R中,数据标准化方法

标准化方法(Normalization Method)数据的标准化是将数据按比例缩放,使之落入一个小的特定区间.由于指标体系的各个指标度量单位是不同的,为了能够将指标参与评价计算,需要对指标进行规范化处理,通过函数变换将其数值映射到某个数值区间.一般常用的有以下几种方法.(1) 最小-最大规范化对原始数据进行线性变换.假定MaxA与MinA分别表示属性A的最大与最小值.最小最大规范化通过计算将属性A的值映射到区间[a, b]上的v.一般来说,将最小-最大规范化在用于信用指标数据上,常用的有以下两

特征预处理

# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import numpy as np from sklearn.preprocessing import StandardScaler #模块1 标准化 #无量纲化使不同规格的数据转换到同一规格.常见的无量纲化方法有标准化和区间缩放法. #标准化的前提是特征值服从正态分布,标准化后,其转换成

Kaggle Bike Sharing Demand Prediction – How I got in top 5 percentile of participants?

Kaggle Bike Sharing Demand Prediction – How I got in top 5 percentile of participants? Introduction There are three types of people who take part in a Kaggle Competition: Type 1: Who are experts in machine learning and their motivation is to compete

从 0 到 1 走进 Kaggle

"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 从 0 到 1 走进 Kaggle - aliceyangxi1987的博客 - 博客频道 - CSDN.NET aliceyangxi1987的博客 目录视图 摘要视图 订阅 [活动]2017 CSDN博客专栏评选 &nbsp [5月书讯]流畅的Python,终于等

7 Types of Regression Techniques

https://www.analyticsvidhya.com/blog/2015/08/comprehensive-guide-regression/ What is Regression Analysis? Why do we use Regression Analysis? What are the types of Regressions? Linear Regression Logistic Regression Polynomial Regression Stepwise Regre

coursera机器学习公开课笔记15: anomaly-detection

Note This personal note is written after studying the opening course on the coursera website, Machine Learning by Andrew NG . And images, audios of this note all comes from the opening course. 01_density-estimation In this next set of videos, I'd lik