Skip to content

Conversation

@danyaljj
Copy link
Member

@danyaljj danyaljj commented May 1, 2016

fyi @kordjamshidi

typedClassifier.getCandidates(head) foreach { candidate =>
typedClassifier.onClassifier.classifier match {
case _: LinearThresholdUnit => trainLinearThresholdUnitOnce[HEAD](typedClassifier, oracle, candidate)
case _: SparseNetworkLBP => trainSparseNetworkLearnerOnce[HEAD](typedClassifier, oracle, candidate)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add the default case and log a warning here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Added it.

@bhargav
Copy link
Contributor

bhargav commented May 1, 2016

Minor comment. Also this PR would conflict with the other PR on ClassifierUtils. LGTM! Assigning to parisa for any comments.

@bhargav bhargav assigned kordjamshidi and unassigned bhargav May 1, 2016
@danyaljj
Copy link
Member Author

danyaljj commented May 4, 2016

@kordjamshidi could you comment on this?

@kordjamshidi
Copy link
Member

it is hard to compare since they are big chucks of moving codes, but the integration of the two is ok, if 1) you have not changed the body of jointTraining loop 2) you have tested the ER results with this change. then it is ok for me to merge.
One minor note: going to the case and checking the type of classifier in each iteration seems redundant though I see this happens because of the recursion style of the loop.

khashab2 added 3 commits May 5, 2016 15:41
…pril30

# Conflicts:
#	saul-examples/src/main/scala/edu/illinois/cs/cogcomp/saulexamples/nlp/EntityRelation/EntityRelationApp.scala
typedClassifier.onClassifier.classifier match {
case _: LinearThresholdUnit => trainLinearThresholdUnitOnce[HEAD](typedClassifier, oracle)(_)
case _: SparseNetworkLBP => trainSparseNetworkLearnerOnce[HEAD](typedClassifier, oracle)(_)
case _ => throw new Exception("ERROR: The joint training is not available for the classifier you have: " +
Copy link
Member Author

Choose a reason for hiding this comment

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

@kordjamshidi I changed the code (using Scala partial functions) so that it calls match-case only once. Let me know if you have any other comments on this.
BTW this is output log of ER joint-training example:

https://shrib.com/HOZcVHWmxugzemB

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI @bhargav

Copy link
Member

Choose a reason for hiding this comment

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

Very interesting! thanks.

@kordjamshidi
Copy link
Member

This is different than the results in the readme?

@kordjamshidi
Copy link
Member

Are the results ok for this change? should I merge this?

@danyaljj
Copy link
Member Author

danyaljj commented Jun 1, 2016

I want to take a closer look into results. Will do it over the weekend.

@bhargav
Copy link
Contributor

bhargav commented Sep 10, 2016

@danyaljj You might have to do this work afresh. There have been some changes in this and related files over the last few months.

@danyaljj
Copy link
Member Author

I'll wait for #380 and then send a fresh copy.

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.

Why two jointTrains?

3 participants