lingpy / lingrex

Linguistic Reconstruction with LingPy

Home Page:https://github.com/lingpy/lingrex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[dev] supervised reconstruction method for lingrex

LinguList opened this issue · comments

This would comprise of a new class that creates reconstructions systematically, using our supervised approach used in the prediction study on Kho-Bwa languages, but in a more systematic form.

Workflow is ready now, code as well, but tests are missing. Dependency from sklearn is not needed, but sklearn is required as a library to run some extended analyses, where the learners can be passed to the lingrex class.

Hi, thank you for sharing this software package! I am trying to pass a SVM classifier to use PatternReconstructor, so instead of

pt = PatternReconstructor(...)
pt.fit()

I tried

from sklearn import svm
pt = PatternReconstructor(...)
pt.fit(clf=svm.SVC())

But with SVM the prediction result is much worse than the default. Is this the correct way to use SVM with the package, or am I missing something?

If you check the code accompanying code to our paper, where we introduce the SVM, you should be able to find readily available versions. Can you first see yourself here and if this does not seem all obvious to you, I will check myself? I am on vacation right now and often not online, this is why I'd ask you to check first, before I help further, in case of need. It also helps if you describe the data on which you test the method or show excerpts here, to verify this is applied well.

Thank you for pointing me to the repo! I will take a look at that.

That was super helpful. I found that I didn't set onehot=True for pt.fit(...), and the prediction looks good now with

pt.fit(clf=svm.SVC(), onehot=True)