Pages: [1]
  Print  
Author Topic: Modification request to LinearRegressionModel  (Read 2228 times)
mtgreen
Newbie
*
Posts: 9


« on: December 06, 2008, 10:37:23 PM »

I have a simple modification request.  I'd like to have the LinearRegressionModel (maybe other regression models) modified such that it does not require the input exampleSet exactly match the exampleset used to train the model.  Instead, I think that the inputed example set should merely contain all required attributes for the model (in any order).  The great news is that the change can be done without modifying any method signatures. 

This could be done very easily using a hashmap (attribute name paired with coefficient).  All of the required information to do this is provided in the constructor.  I'm happy to provide my tested code if that makes life simpler.   Just a (very) small way of giving back for such a great toolkit.

mtgreen
Logged
mtgreen
Newbie
*
Posts: 9


« Reply #1 on: December 06, 2008, 10:42:57 PM »

one additional note...

My suggested method would require matching attribute names for the inputed example set. I can see why this may also be undesirable.  The code could be written to default to one (e.g., name match) and then switch to the second if all required attribute names are not in the provided exampleset.  You can get the best of both worlds.
Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2426


« Reply #2 on: December 08, 2008, 12:55:23 PM »

Hi,
the behaviour you wished to have is in fact the behavior we aim at. But some, especially the early implemented learners, are not adapted yet. All I can say: its on our ToDo.

Greetings,
  Sebastian
Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2426


« Reply #3 on: December 15, 2008, 03:43:11 PM »

Hi,
the linear regression model now uses the attributes names of needed attributes for calculation on apply time.
Hence it not only works on extended data sets, instead it even copes with example sets with fewer attributes than on training time, if only attribute having a weight of 0 were removed.

Greetings,
  Sebastian
Logged
Pages: [1]
  Print  
 
Jump to: