由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - data prediction by regression or better ways (转载)
相关主题
问一个regression问题请问multi variate linear regression 选择risk factor 问题 (转载)
Predict values of vectors generated by black box functions刚面了一家prop shop,基本功太差,活该被虐了
找矿工的一些感想和经验-第一次问一个fat tail的问题
[合集] A problem in linear regression有用 deep learning 赚钱的吗?
一道关于regression的面试题请教线性回归在portfolio中的问题,求助。
Does Time Series Forecasting really work?两道面试题目我也不知道我的答案对不对
[求助] 分析annuity关于函数的逼近问题 (转载)
求暑期实习内推,fall term的实习也可CS quantitative admission test
相关话题的讨论汇总
话题: prediction话题: regression话题: any话题: data话题: negative
进入Quant版参与讨论
1 (共1页)
m******t
发帖数: 273
1
【 以下文字转载自 Statistics 讨论区 】
发信人: myregmit (myregmit), 信区: Statistics
标 题: data prediction by regression or better ways
发信站: BBS 未名空间站 (Fri Mar 7 17:24:34 2014, 美东)
I am working on data prediction.
Given data of a random variable X and Y, find out how to predict Y by X.
I know how to do it by linear regression, y = k x + b .
But, here, x is always non-negative and y is required to be non-negative.
Sometimes, b is not non-negative so that y < 0.
How to assure that b > 0 and also minimize the prediction error ?
Are there other better ways (not regression) to do the prediction ?
Any help would be appreciated.
f******y
发帖数: 2971
2
做个transform可以不?
比如说ln(y)= k ln(x) + b

【在 m******t 的大作中提到】
: 【 以下文字转载自 Statistics 讨论区 】
: 发信人: myregmit (myregmit), 信区: Statistics
: 标 题: data prediction by regression or better ways
: 发信站: BBS 未名空间站 (Fri Mar 7 17:24:34 2014, 美东)
: I am working on data prediction.
: Given data of a random variable X and Y, find out how to predict Y by X.
: I know how to do it by linear regression, y = k x + b .
: But, here, x is always non-negative and y is required to be non-negative.
: Sometimes, b is not non-negative so that y < 0.
: How to assure that b > 0 and also minimize the prediction error ?

m******t
发帖数: 273
3
【 以下文字转载自 Statistics 讨论区 】
发信人: myregmit (myregmit), 信区: Statistics
标 题: data prediction by regression or better ways
发信站: BBS 未名空间站 (Fri Mar 7 17:24:34 2014, 美东)
I am working on data prediction.
Given data of a random variable X and Y, find out how to predict Y by X.
I know how to do it by linear regression, y = k x + b .
But, here, x is always non-negative and y is required to be non-negative.
Sometimes, b is not non-negative so that y < 0.
How to assure that b > 0 and also minimize the prediction error ?
Are there other better ways (not regression) to do the prediction ?
Any help would be appreciated.
f******y
发帖数: 2971
4
做个transform可以不?
比如说ln(y)= k ln(x) + b

【在 m******t 的大作中提到】
: 【 以下文字转载自 Statistics 讨论区 】
: 发信人: myregmit (myregmit), 信区: Statistics
: 标 题: data prediction by regression or better ways
: 发信站: BBS 未名空间站 (Fri Mar 7 17:24:34 2014, 美东)
: I am working on data prediction.
: Given data of a random variable X and Y, find out how to predict Y by X.
: I know how to do it by linear regression, y = k x + b .
: But, here, x is always non-negative and y is required to be non-negative.
: Sometimes, b is not non-negative so that y < 0.
: How to assure that b > 0 and also minimize the prediction error ?

m******t
发帖数: 273
5
what if x = 0 ? also, in some cases, y is also 0.
thanks!

【在 f******y 的大作中提到】
: 做个transform可以不?
: 比如说ln(y)= k ln(x) + b

m******t
发帖数: 273
6
x and y are discrete and between 0 and 100,000.
Any help would be appreciated.

【在 f******y 的大作中提到】
: 做个transform可以不?
: 比如说ln(y)= k ln(x) + b

m******t
发帖数: 273
7
This y and x scatter plot.
Any help would be appreciated.

【在 m******t 的大作中提到】
: x and y are discrete and between 0 and 100,000.
: Any help would be appreciated.

m******t
发帖数: 273
8
The data are not counts and not number of success either.
They are numerical values calculated by black box functions.
Any help would be appreciated.

【在 m******t 的大作中提到】
: This y and x scatter plot.
: Any help would be appreciated.

m******t
发帖数: 273
9
This is the log-norm scatter plot.
log with base as 10.
For the x =0 and y =0, we change it to be 1.
Any help would be appreciated.

【在 m******t 的大作中提到】
: The data are not counts and not number of success either.
: They are numerical values calculated by black box functions.
: Any help would be appreciated.

k***g
发帖数: 7244
10
如果有现成的 non-linear least-square 的library,let m = ln(k), 把你的formula
变成 y = exp(m)x+b 来做回归,estimate m 之后,用 k = exp(m)来得到 k, k 肯定
是大于零的;
如果没有现成的 nls library,直接用optimizer来 minimize sum of squared
residuals subject to b>0 就行了,也很简单。

【在 m******t 的大作中提到】
: This is the log-norm scatter plot.
: log with base as 10.
: For the x =0 and y =0, we change it to be 1.
: Any help would be appreciated.

m******t
发帖数: 273
11
for y = exp(m)x + b , what if k > 0 but b < 0 ?
In this way, y is still possible to be < 0.
Thanks

formula

【在 k***g 的大作中提到】
: 如果有现成的 non-linear least-square 的library,let m = ln(k), 把你的formula
: 变成 y = exp(m)x+b 来做回归,estimate m 之后,用 k = exp(m)来得到 k, k 肯定
: 是大于零的;
: 如果没有现成的 nls library,直接用optimizer来 minimize sum of squared
: residuals subject to b>0 就行了,也很简单。

k***g
发帖数: 7244
12
哦,我把你的k 和 b 看串了,一样的,你可以把 b 作同样的形变,这是一个
constrained linear regression 里常用的trick

【在 m******t 的大作中提到】
: for y = exp(m)x + b , what if k > 0 but b < 0 ?
: In this way, y is still possible to be < 0.
: Thanks
:
: formula

1 (共1页)
进入Quant版参与讨论
相关主题
CS quantitative admission test一道关于regression的面试题请教
问面试题Does Time Series Forecasting really work?
问个简单题目[求助] 分析annuity
Predictive Power of Hull White Model求暑期实习内推,fall term的实习也可
问一个regression问题请问multi variate linear regression 选择risk factor 问题 (转载)
Predict values of vectors generated by black box functions刚面了一家prop shop,基本功太差,活该被虐了
找矿工的一些感想和经验-第一次问一个fat tail的问题
[合集] A problem in linear regression有用 deep learning 赚钱的吗?
相关话题的讨论汇总
话题: prediction话题: regression话题: any话题: data话题: negative