BookmarkSubscribeRSS Feed
quigleym
Fluorite | Level 6

Hi:

 I have weights that range in value from 0 to 1 (for example .05). I am able to run a weighted logistic regression using

 

proc logistic data = logistic outmodel=log_model;
  model  target_good_final (event='1') = &keep_it2  / selection = forward sle=.01;
  output out = stats p = prob_good_log xbeta = logit_good ;
  weight weight;

 

I have also been able to do the same for Neural Nets use Proc HPNeural.

 

proc hpneural data=tempq;

   input &keep_it;

   id perf_seq_num &target &validate &weight ;

   target &target / level=nom;

   hidden 100;

   hidden 50;

partition rolevar=&validate(train=0);

   train outmodel=model_&model numtries=5 maxiter=1000;

   score out=scores_&model;

   code file = "&codefile";

   weight &weight;

 

 But I don't see how I can do this for Support Vector Machines. Proc HPSVM does not have a weight statement. Any suggestions ?

 

                                       Thanks

 

                                             Michael Quigley

1 REPLY 1
DougWielenga
SAS Employee

The non-HP nodes underlying the SAS Enterprise Miner procedure do not support a WEIGHT statement and there is documentation in SAS Enterprise Miner explaining why this is the case.  Certain HP procedures which are used by SAS Enterprise Miner do support a WEIGHT statement or allow fractional frequencies without modifying them.  

 

PROC HPSPLIT -- This procedure is documented in the SAS/STAT documentation and does not document accepting a WEIGHT or FREQ variable in its Syntax, but it will accept a FREQ variable with fractional values.  This is likely because the use of fractional frequencies was initially used by and has historically been limited to Enterprise Miner.

 

PROC HPNEURAL -- This procedure has a WEIGHT statement rather than a FREQ statement, but the FREQ variable is assigned to the WEIGHT statement meaning that the frequency variable will accept non-integer values without modifying them.  

 

PROC HPFOREST -- Accepts non-integer frequencies without modification.

 

I have no additional information on any other HP procedure using non-integer frequencies.  Please note that using non-integer frequencies in procedures that do not have a WEIGHT statement can lead to certain anomalies as these are different concepts in practice.  A variable assigned as the FREQ variable is used to define the actual number of observations represented by the row of data, whereas WEIGHT variables are usually included to try and account for certain sampling issues in an attempt to get a better estimate of error which ultimately results in more meaningful test statistics.  These same tests, however, are not as meaningful when you need to impute missing data which is often necessary for certain methods such as neural networks.   

Hope this helps!

Doug

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 809 views
  • 0 likes
  • 2 in conversation