avatar
收敛标准的选择# Computation - 科学计算
a*u
1
cannot find cashback on ebay on live.com anymore. anyone still see it?
avatar
p*o
2
i have a question on operators in c++.
/* header file */
class A;
class B
{
public:
operator A*();
double& operator [](unsigned int);
};
/* cpp file */
B b;
b[3] = 2.2;
the compiler will complain about the "b[3]=2.2" line b/c there are two
possible ways to interpret the code:
1. b.operator[](unsigned) -- my desired operation
2. b.operator A*.operator[] -- which is build-in.
the above code can be compiled and run well under linux, but now i am using
g++ under windows. i just realize suc
avatar
s*h
3
min f(x) 的收敛标准如何选择?
f(x)是正的.x是一个4维向量.
一个选择是对f(x)选择一个tol,比如f(x)<1%就停止收敛.
还有一个选择是针对向量x选择一个tol,比如 max(x./abs(x))<1%就停止收敛.
哪个更合适?
我的算法运行时,f(x)下降到1%左右就减不下去了.
不过我发现向量x的值仍然变化很大,向量x中的某些元素的变化大于10%.
还有,我在收敛的时候为防止x的变化过快,对每次迭代的x的变化幅度设置了10%的上限.
这个对收敛性能应该是有帮助吧?
avatar
j*p
4
cashback stall
我刚买了个东西,不过现在还没见到cashback,以往都很快的,皑皑

【在 a**u 的大作中提到】
: cannot find cashback on ebay on live.com anymore. anyone still see it?
avatar
p*o
5
It's in 13.3, though I didn't read it ...

【在 p****o 的大作中提到】
: i have a question on operators in c++.
: /* header file */
: class A;
: class B
: {
: public:
: operator A*();
: double& operator [](unsigned int);
: };
: /* cpp file */

avatar
g*y
6

this is based on the limitation of your algorithm, I think.
means several different solutions can give similar suboptimal value
限.
I don't think so. Why you want to prevent a big change of solution? It may
allow you reach the optimal value faster.

【在 s****h 的大作中提到】
: min f(x) 的收敛标准如何选择?
: f(x)是正的.x是一个4维向量.
: 一个选择是对f(x)选择一个tol,比如f(x)<1%就停止收敛.
: 还有一个选择是针对向量x选择一个tol,比如 max(x./abs(x))<1%就停止收敛.
: 哪个更合适?
: 我的算法运行时,f(x)下降到1%左右就减不下去了.
: 不过我发现向量x的值仍然变化很大,向量x中的某些元素的变化大于10%.
: 还有,我在收敛的时候为防止x的变化过快,对每次迭代的x的变化幅度设置了10%的上限.
: 这个对收敛性能应该是有帮助吧?

avatar
b*8
7
嗯,好像是没了。还好这几天没啥货要进。
avatar
p*o
8
yes, the strictness of the compiler can expose many un-imaginable problems
in the code. it actually takes me quite some time to figure out the error
message because the real code is much more complicated than the sample given.

【在 p***o 的大作中提到】
: It's in 13.3, though I didn't read it ...
avatar
f*a
9
When you apply 10% to limit the change, i think, to the max of my
understanding, it is some sort of regularization.
You my consider apply regularization to the cost function, i.e. Tikhonov
regularizztion. This would have the effect of reducing the variation of x,
at the price of increasing the cost at the solution.

【在 g****y 的大作中提到】
:
: this is based on the limitation of your algorithm, I think.
: means several different solutions can give similar suboptimal value
: 限.
: I don't think so. Why you want to prevent a big change of solution? It may
: allow you reach the optimal value faster.

avatar
j*p
10

cashback stall里面找

【在 b***8 的大作中提到】
: 嗯,好像是没了。还好这几天没啥货要进。
avatar
p*o
11
Oh, yes. But implementing operator T* for [] is strange enough.

given.

【在 p****o 的大作中提到】
: yes, the strictness of the compiler can expose many un-imaginable problems
: in the code. it actually takes me quite some time to figure out the error
: message because the real code is much more complicated than the sample given.

avatar
l*i
12
try to read about "Maratos effect"

限.

【在 s****h 的大作中提到】
: min f(x) 的收敛标准如何选择?
: f(x)是正的.x是一个4维向量.
: 一个选择是对f(x)选择一个tol,比如f(x)<1%就停止收敛.
: 还有一个选择是针对向量x选择一个tol,比如 max(x./abs(x))<1%就停止收敛.
: 哪个更合适?
: 我的算法运行时,f(x)下降到1%左右就减不下去了.
: 不过我发现向量x的值仍然变化很大,向量x中的某些元素的变化大于10%.
: 还有,我在收敛的时候为防止x的变化过快,对每次迭代的x的变化幅度设置了10%的上限.
: 这个对收敛性能应该是有帮助吧?

avatar
a*u
13
哪里??、
link?
what is cashback stall?

【在 j****p 的大作中提到】
: 有
: cashback stall里面找

avatar
r*r
14
shouldn't g++ pick "operator []"? the other path requires more "effort".
avatar
j*p
15
cashback stores

【在 a**u 的大作中提到】
: 哪里??、
: link?
: what is cashback stall?

avatar
p*o
16
in my code, T* is an abstract opaque pointer due to the system design.
while [] is an operator for accessing the real data. so they both make
sense somehow.
now the problem is solved. i declare the operator [] as
double& operator [] (int);
originally i used "unsigned int" for the most strict type checking. but in
practice, the compiler treated all constants like 5 as int but not unsigned.
so there is a conversion from int to unsigned. that's why the compiler does
not know which decoding path to

【在 p***o 的大作中提到】
: Oh, yes. But implementing operator T* for [] is strange enough.
:
: given.

avatar
j*1
17
come back again
avatar
i*h
18
[] by default is pointer reference
I think this way is more elegant than overloading [].
[] overloading can be used for more complicated index operation.

【在 p***o 的大作中提到】
: Oh, yes. But implementing operator T* for [] is strange enough.
:
: given.

avatar
z*e
19
现在是不是真的没有了,已经找不到了呀!
avatar
b*i
20
已经没有了,就这几天的事
avatar
w*n
21
I can still find 8%.

【在 b****i 的大作中提到】
: 已经没有了,就这几天的事
avatar
b*i
22
能否发个链接?

【在 w****n 的大作中提到】
: I can still find 8%.
avatar
l*e
23
bing.com
search wii

【在 b****i 的大作中提到】
: 能否发个链接?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。