English 中文(简体)
SAS中的交叉验证
原标题:cross validation in SAS
  • 时间:2011-10-01 19:34:55
  •  标签:
  • sas

我把我的数据分为《联合国系统会计准则》中的5倍。 因此,我

页: 1

我很想知道,通过每一方面进行交叉验证的最佳方法是什么。 例如,我要把第1条作为我的测试组,第2、3、4、5条作为培训组,第2条将第2条用作测试,第1、3、4、5条用作培训等。

《联合国系统会计准则》中的哪类漏洞能实现这一目标?

Thanks!

最佳回答

Probably best to call upon a macro to make it a bit easier to call upon.

%Macro Validate(cur,i) ;
%Do j = 1 %to 5 ;

  %If &j <> &i %THEN

  %DO;

  Data &Cur._&j. ;

    Set &cur S&j. ;

    <validation steps>

  Run;

  %END;

%End;

%mend Validate ;

Data _null_ ;

Do i = 1 to 5 ;

Call Execute("%Validate(s"||strip(i)||","||strip(i)||");");

End;

Run;
问题回答

Proc gmlselect performs k-folds cross validation with multiple methods to choose best models. It is experimental in 9.1 but released in production for 9.2+

Further info here

Hope this help.





相关问题
SAS stack overflow: PROC SQL reading dictionary.columns

I have a program in which I am reading dictionary.columns. There is a big program with lot of code before and after the program segment in which I read dictionary.column. The program used to work ...

SAS using encrypted (PWENCODE) in EMAILPW= option

My code works fine using plain text code, but fails when I use an encrypted password filename File email emailsys = VIM emailid= "&pa_usr" emailpw= "{sasenc}39AAD23E148A9555508AC84447181DFF" ; ...

How do I change the label in a data step header?

In SAS you can do. data a(rename=(a=b) ); a = 1; run; to rename a variable in the data step data statement (or data step header as I call it). What s the syntax to change the label? I tried ...

What s the easiest way to use SQLite with SAS?

I want to investigate how to access SQLite DB from SAS. What s the easiest way of doing this? Is there a SAS product that we can license to do that? I don t want to use ODBC drivers as that seems to ...

Computing Compounded Return in SAS

I have a dataset of date(monthly), person and return(monthly). I need to calculate the compounded monthly return of the dataset from April Year t to March Year t+1 for each person. For example, ...

Exchange Server and SAS 9.1.3/9.2

has anyone successfully interacted with a microsoft exchange server in SAS 9.1.3 or 9.2? i know it can be done with SAS Ent. Guide 4.x, but i m not interested in that route if regular SAS can do it.

Logging SAS scripts

I ve been developing a lot of Java, PHP and Python. All of which offer great logging packages (Log4J, Log or logging respectively). This is a great help when debugging applications. Especially if the ...

热门标签