Skip to content

Register parameters of SVM - #7

Merged
karlnapf merged 1 commit into
shogun-toolbox:masterfrom
vinx13:master
Jul 7, 2018
Merged

karlnapf merged 1 commit into
shogun-toolbox:masterfrom
vinx13:master

Conversation

@vinx13

@vinx13 vinx13 commented Jul 7, 2018

Copy link
Copy Markdown
Member

No description provided.

void CSVMLin::init()
{
SG_ADD(
&use_bias, "use_bias", "Indicates if bias is used.", MS_NOT_AVAILABLE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder: are those things not registered in the base class?
If not why not?

m_parameters->add(&count, "count", "count");
m_parameters->add(&use_bias, "use_bias", "Indicates if bias is used.");
m_parameters->add(&use_regularized_bias, "use_regularized_bias", "Indicates if bias is regularized.");
SG_ADD(&C1, "C1", "Cost constant 1.", MS_AVAILABLE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because then we need to register them everytime ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually they don't inherit from SVM base class

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems quite mad....
can you see any idea why that is?
On the other hand, you are just porting examples, so no need to refactor things ....

m_parameters->add(&use_regularized_bias, "use_regularized_bias", "Indicates if bias is regularized.");
SG_ADD(&C1, "C1", "Cost constant 1.", MS_AVAILABLE);
SG_ADD(&C2, "C2", "Cost constant 2.", MS_AVAILABLE);
SG_ADD(&wscale, "wscale", "W scale", MS_NOT_AVAILABLE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these parameters necessary to be accessible from the outside/equals/serilazation, or are they only to store the intermediate state of training?

@karlnapf
karlnapf merged commit 79d42cb into shogun-toolbox:master Jul 7, 2018
@karlnapf

karlnapf commented Jul 7, 2018

Copy link
Copy Markdown
Member

anyways, will merge for now and we can come back to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants