Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference Between J48 and Markov Chains

I am attempting to do some evaluation of the relative rates of different algorithms in the C# and F# realms using WekaSharp and one of the algorithms I was interested in was Markov Chains. I know Weka has an HMM application but I have not been able to implement this into WekaSharp and was wondering if there was a way to modify the J48 Algorithm to suit this purpose. I know there is some similarity between J48 and first order Markov chains but am trying to determine what needs to be modified and if this is a reasonable thing to do. Here is the J48 as implemented in Yin Zhu's WekaSharp:

type J48() =
    static member DefaultPara =  "-C 0.25 -M 2"
    static member MakePara(?binarySplits, ?confidenceFactor, ?minNumObj, ?unpruned, ?useLaplace) =
        let binarySplitsStr = 
            let b = match binarySplits with
                    | Some (v) -> v
                    | None -> false
            if not b then "-B" else ""
        let confidenceFactorStr = 
            let c = match confidenceFactor with
                    | Some (v) -> v
                    | None -> 0.25 // default confi
            "-C " + c.ToString()
        let minNumObjStr = 
            let m = match minNumObj with
                    | Some (v) -> v
                    | None -> 2
            "-M " + m.ToString()
        let unprunedStr = 
            let u = match unpruned with
                    | Some (v) -> v
                    | None -> false
            if u then "-U" else ""
        let useLaplaceStr = 
            let u = match useLaplace with
                    | Some (v) -> v
                    | None -> false
            if u then "-A" else ""
        binarySplitsStr + " " + confidenceFactorStr + " " + minNumObjStr + " " + unprunedStr + " " + useLaplaceStr

Thank you very much.

like image 286
RedMassiveStar Avatar asked Nov 12 '22 17:11

RedMassiveStar


1 Answers

J48 is just an implementation of the C4.5 algorithm that learns decision trees by considering the entropy of each attribute (dimension) and taking the attribute that has maximum entropy as root of the current subtree. This algorithm does not need reinforcement.

I guess that by Markov Chains you mean Hidden Markov Model that is used in reinforcement learning.

You should take a look to HMMWeka.

A related question is: What is the equivalent for a Hidden Markov Model in the WEKA toolkit?

like image 180
Vitaly Olegovitch Avatar answered Nov 15 '22 08:11

Vitaly Olegovitch