Machine learning in Pharo?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Machine learning in Pharo?

tinchodias
Hi all,

I'm playing with weka [1] for classifying data using data mining/machine learning. I'm really new on this field so I want to give you a concrete example of my use case to make it clear: 

I have elements that can be classified as true or false. In a training phase, I set up a bayesian network with elements that I manually classified. Then, I can use such network for predicting the classification of new elements.

---> my question is: 
Do we have a package for replacing weka-in-my-use-case in Pharo? It doesn't need to be exactly a bayesian network, it could be simpler.


I looked a bit in Moose-Algos and in BioSmalltalk but I think they don't have what I need.

I would appreciate any help. Cheers.
Martín




Reply | Threaded
Open this post in threaded view
|

Re: Machine learning in Pharo?

hernanmd
In BioSmalltalk you can do something like this:

| cluster classifier trainedData observations|
 cluster := BioGroupOrganization forSimilarityOn: #value.
trainedData := { 'Polaromonas naphthalenivorans CJ2' .
        'Polaromonas sp. JS666' .
        'Planctomyces limnophilus DSM 3776' .
        'Nautilia' .
        'Lactobacillus crispatus ST1' .
        'Acidithiobacillus ferrooxidans' }.
trainedData do: [ : feature | cluster addOrganization: (BioOrganization new feature: feature) ].
classifier := BioClassifier new organization: cluster.
observations := 'Acidithiobacillus ferrooxidans ATCC 53993 chromosome, complete genome
Lactobacillus crispatus ST1, complete genome
Nautilia profundicola AmH chromosome, complete genome
Planctomyces limnophilus DSM 3776 plasmid pPLIM01, complete sequence
Planctomyces limnophilus DSM 3776 chromosome, complete genome
Polaromonas sp. JS666 plasmid 2, complete sequence
Polaromonas sp. JS666 plasmid 1, complete sequence
Polaromonas sp. JS666, complete genome
Polaromonas naphthalenivorans CJ2, complete genome
Polaromonas naphthalenivorans CJ2 plasmid pPNAP08, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP07, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP06, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP05, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP04, complete sequence
' lines.
observations do: [ : obs | classifier classify: obs ].
classifier classesSize = 6.
classifier maxClasses = 6.
classifier maxClass feature = 'Polaromonas naphthalenivorans CJ2'.
classifier minClasses = 1.
classifier minClass feature = 'Nautilia'.

Hernán

2014-09-25 7:08 GMT-03:00 Martin Dias <[hidden email]>:
Hi all,

I'm playing with weka [1] for classifying data using data mining/machine learning. I'm really new on this field so I want to give you a concrete example of my use case to make it clear: 

I have elements that can be classified as true or false. In a training phase, I set up a bayesian network with elements that I manually classified. Then, I can use such network for predicting the classification of new elements.

---> my question is: 
Do we have a package for replacing weka-in-my-use-case in Pharo? It doesn't need to be exactly a bayesian network, it could be simpler.


I looked a bit in Moose-Algos and in BioSmalltalk but I think they don't have what I need.

I would appreciate any help. Cheers.
Martín





Reply | Threaded
Open this post in threaded view
|

Re: Machine learning in Pharo?

tinchodias
Thanks Hernán!

On Thu, Sep 25, 2014 at 8:59 PM, Hernán Morales Durand <[hidden email]> wrote:
In BioSmalltalk you can do something like this:

| cluster classifier trainedData observations|
 cluster := BioGroupOrganization forSimilarityOn: #value.
trainedData := { 'Polaromonas naphthalenivorans CJ2' .
        'Polaromonas sp. JS666' .
        'Planctomyces limnophilus DSM 3776' .
        'Nautilia' .
        'Lactobacillus crispatus ST1' .
        'Acidithiobacillus ferrooxidans' }.
trainedData do: [ : feature | cluster addOrganization: (BioOrganization new feature: feature) ].
classifier := BioClassifier new organization: cluster.
observations := 'Acidithiobacillus ferrooxidans ATCC 53993 chromosome, complete genome
Lactobacillus crispatus ST1, complete genome
Nautilia profundicola AmH chromosome, complete genome
Planctomyces limnophilus DSM 3776 plasmid pPLIM01, complete sequence
Planctomyces limnophilus DSM 3776 chromosome, complete genome
Polaromonas sp. JS666 plasmid 2, complete sequence
Polaromonas sp. JS666 plasmid 1, complete sequence
Polaromonas sp. JS666, complete genome
Polaromonas naphthalenivorans CJ2, complete genome
Polaromonas naphthalenivorans CJ2 plasmid pPNAP08, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP07, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP06, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP05, complete sequence
Polaromonas naphthalenivorans CJ2 plasmid pPNAP04, complete sequence
' lines.
observations do: [ : obs | classifier classify: obs ].
classifier classesSize = 6.
classifier maxClasses = 6.
classifier maxClass feature = 'Polaromonas naphthalenivorans CJ2'.
classifier minClasses = 1.
classifier minClass feature = 'Nautilia'.

Hernán

2014-09-25 7:08 GMT-03:00 Martin Dias <[hidden email]>:

Hi all,

I'm playing with weka [1] for classifying data using data mining/machine learning. I'm really new on this field so I want to give you a concrete example of my use case to make it clear: 

I have elements that can be classified as true or false. In a training phase, I set up a bayesian network with elements that I manually classified. Then, I can use such network for predicting the classification of new elements.

---> my question is: 
Do we have a package for replacing weka-in-my-use-case in Pharo? It doesn't need to be exactly a bayesian network, it could be simpler.


I looked a bit in Moose-Algos and in BioSmalltalk but I think they don't have what I need.

I would appreciate any help. Cheers.
Martín