-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression same values predicted #139
Comments
Could you give more details? What's the screen output of the training
process?
…On 2019-03-18 05:40, John Karasev wrote:
When I train my regression problem, I only get 1 and -1 for the
weights of support vectors and it produces an exact same prediction
for the test vectors.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub [1], or mute the
thread [2]. [ { ***@***.***": "http://schema.org", ***@***.***":
"EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target":
"#139", "url":
"#139", "name": "View Issue" },
"description": "View this Issue on GitHub", "publisher": { ***@***.***":
"Organization", "name": "GitHub", "url": "https://github.com" } } ]
Links:
------
[1] #139
[2]
https://github.com/notifications/unsubscribe-auth/AFGwnij8M33tZJm7v3xaAjZJZhbS7Ppxks5vX4k4gaJpZM4b5rop
|
What I got is the same ! |
Could you provide more details? Sometimes you need to scale the target
values before training SVR.
…On 2022-04-28 00:13, Nuist-Lee wrote:
What I got is the same !
I always get the same prediction value, even if I've already changed
the inputdata.
Specifically, I used 9 precipitation factors and real precipitation
data from 1951 to 2010 to train the SVM regression model. Then I input
the factors from 2011 to 2016 to the model in order to get the
predicted precipitation data. But ALL I GOT WAS AN ARRAY WITH THE SAME
6 NUMBERSlike[248 248 248 248 248 248]. When I change the inputdata,
the result may change but still an array with the same six numbers.
Sometimes the result array can be 'almost' the same, like
[222.121971040339 217.475177855453 221.321911068434 215.667836808570
222.829461145174].
It's also been found that only if I input the data that is VERY VERY
closed to the trainnig data(1951-2010 factors), the result can be
quite well.
Ironically, when I use some classic dataset (from my reference books),
the result will be pretty pretty good.
Add on, RBF kernel was used, too.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you commented.Message ID:
***@***.***> [ { ***@***.***":
"http://schema.org", ***@***.***": "EmailMessage", "potentialAction": {
***@***.***": "ViewAction", "target":
"#139 (comment)",
"url":
"#139 (comment)",
"name": "View Issue" }, "description": "View this Issue on GitHub",
"publisher": { ***@***.***": "Organization", "name": "GitHub", "url":
"https://github.com" } } ]
Links:
------
[1] #139 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/ABI3BHWTXT32F7WA54ORUZTVHFRRZANCNFSM4G7GXIUQ
|
In addition , @kevin031060 said he met the same issue when using Java interface ,and Python/Matlab is fine.While mine is using Matlab toolbox. |
how does your TSX and TS look like? Could you show a few elements of
them?
…On 2022-04-28 13:26, Nuist-Lee wrote:
This is the code for trainning.
clear all
load ("predictionfactors.mat");
[tsx,TSXps]=mapminmax(InputdataS1');
[ts,TSps]=mapminmax(JHy');
TSX=tsx';
TS=ts';
%% 选择回归预测分析最佳的SVM参数c&g
[bestmse,bestc,bestg] = gaSVMcgForRegress(TS,TSX);
% 打印选择结果
disp('打印选择结果');
str = sprintf( 'Best Cross Validation MSE = %g Best c = %g Best g =
%g',bestmse,bestc,bestg);
disp(str);
%% 利用回归预测分析最佳的参数进行SVM网络训练
cmd = ['-c ', num2str(bestc), ' -g ', num2str(bestg) , ' -s 3 -p 0.01
-t 2 '];
model = svmtrain(TS,TSX,cmd);
When I load ("predictionfactors.mat"), the workspace is as follows:
[1]
InputdataS1 is precipitation factors in the former 60 years, which is
the trainning data.InputdataS2 is that in the latter 6 years, and is
used for prediction.
JHy is precipitation data in the former 60 years, and JHt is the
former one.
GASVMCGFORREGRESSis a function written by Faruto, which can find the
best c and g in SVM by using Genetic Algorithm.
Then is the code for SVM regression prediction:
ttx=mapminmax('apply',InputdataS2',TSXps);
tty=mapminmax('apply',JHt',TSps);
TTX=ttx';
TTY=tty';
[predict_,mse] = svmpredict(TTY,TTX,model);
predict_ = mapminmax('reverse',predict_',TSps);
predict_ = predict_';
And then the value 'predict_' always be an array with same numbers,
which means however I change my inputdata to the model, the prediction
result is the same one.
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you commented.Message ID:
***@***.***> [ { ***@***.***":
"http://schema.org", ***@***.***": "EmailMessage", "potentialAction": {
***@***.***": "ViewAction", "target":
"#139 (comment)",
"url":
"#139 (comment)",
"name": "View Issue" }, "description": "View this Issue on GitHub",
"publisher": { ***@***.***": "Organization", "name": "GitHub", "url":
"https://github.com" } } ]
Links:
------
[1]
https://user-images.githubusercontent.com/78215393/165681156-c3ffb18d-82bd-4c3b-9981-0da5b3189034.png
[2] #139 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/ABI3BHROA6QBSFC5FZSJQU3VHIOQBANCNFSM4G7GXIUQ
|
I mean 60x1 and 60x9 |
问题解决了!谢谢林老师的耐心指导! |
OK. Glad to know your problems are solved
…On 2022-04-29 01:18, Nuist-Lee wrote:
问题解决了!谢谢林老师的耐心指导!
Issue solved!!! Thanks for your patient help!!!
The key is Y, which is the real precipitation data in my code named
TS.
In fact , I have 3 precipitation data for 3 different regions. And
when I choose JH region, the issue occurs.
I was always focused on the X, which is prediction factor in my code.
While the Y is another part of trainning an SVR model, which was
ignored for a long time.
So the result is : One region cannot match well with those
precipitation factors, while another region can.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you commented.Message ID:
***@***.***> [ { ***@***.***":
"http://schema.org", ***@***.***": "EmailMessage", "potentialAction": {
***@***.***": "ViewAction", "target":
"#139 (comment)",
"url":
"#139 (comment)",
"name": "View Issue" }, "description": "View this Issue on GitHub",
"publisher": { ***@***.***": "Organization", "name": "GitHub", "url":
"https://github.com" } } ]
Links:
------
[1] #139 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/ABI3BHQBNKWNO2ARFYCP2RLVHLB6TANCNFSM4G7GXIUQ
|
When I train my regression problem, I only get 1 and -1 for the weights of support vectors and it produces an exact same prediction for every test vectors.
The text was updated successfully, but these errors were encountered: