CogComp / saul

Saul : Declarative Learning-Based Programming
Other
64 stars 18 forks source link

Define a collection of Learnables in a loop #297

Open kordjamshidi opened 8 years ago

kordjamshidi commented 8 years ago

we can call learn, train , etc on them at once! they can differ in type/features or some other parameter. This looks like an exciting and simple thing to do!

kordjamshidi commented 8 years ago

Here is the underlying example of what we want to do using different type of features for a collection of Learners:


 val myLearners= (genes() prop gene_KEGG).flatten.toList.distinct.map(
      pathwayX => {
        object t extends Learnable[PatientDrug](patientDrug) {
        def label = drugResponse
        override def feature = using(pathWayGExpression(pathwayX))
        override lazy val classifier = new SparsePerceptron()
      }  }
    )

    myLearners.test(testingData).SortwithAccuracy()
kordjamshidi commented 8 years ago

Can anyone address this issue before CIKM deadline? @sameersingh @danyaljj

danyaljj commented 8 years ago

I would be happy to help; it's just I'm not sure I understand what is the question/issue/target.

kordjamshidi commented 8 years ago

The goal is to be able have a collection of learners such that we can use them like other collections in our queries. One usage is the test example above, there we apply test on a collection of classifiers and we can sort them based on the output of the test i.e. their performance for example.

kordjamshidi commented 8 years ago

Naturally can be addressed. No need to work on this @onlinecco. @danyaljj could add the documentation and close the issue.

kordjamshidi commented 8 years ago

do we have documentation for this one as well? we can close this issue as well I guess. @danyaljj

danyaljj commented 8 years ago

No we don't. Feel free to add.