Learners

Similar to SKPreprocessor, most of the Learners in AMLP for its initial release are based on Scikitlearn libraries.

Note

For more information and specific details of arguments to pass and learner's behaviour, please consult the Scikitlearn documentation.

SKLearner Structure

    SKLearner(Dict(
       :name => "sklearner",
       :output => :class,
       :learner => "LinearSVC",
       :impl_args => Dict()
      )
    )

Helper Function:
    SKLearner(learner::String,args::Dict=Dict())

SKLearner maintains a dictionary of learners which can be listed by invoking the function: sklearners() The :impl_args is a dictionary of paramters to be passed as arguments to the Scikitlearn learner.

Let's try loading some learners with some arguments based on Scikitlearn documentation:

julia> using AutoMLPipeline
julia> iris = getiris();
julia> X = iris[:,1:4];
julia> Y = iris[:,end] |> Vector;
julia> rf = SKLearner("RandomForestClassifier",Dict(:n_estimators=>30,:random_state=>0));
julia> crossvalidate(rf,X,Y,"accuracy_score",3)fold: 1, 0.94 fold: 2, 1.0 fold: 3, 0.94 errors: 0 (mean = 0.96, std = 0.034641016151377574, folds = 3, errors = 0)
julia> ada = SKLearner("AdaBoostClassifier",Dict(:n_estimators=>20,:random_state=>0));
julia> crossvalidate(ada,X,Y,"accuracy_score",3)fold: 1, 0.98 fold: 2, 0.96 fold: 3, 0.94 errors: 0 (mean = 0.96, std = 0.020000000000000018, folds = 3, errors = 0)
julia> svc = SKLearner("SVC",Dict(:kernel=>"rbf",:random_state=>0,:gamma=>"auto"));
julia> crossvalidate(svc,X,Y,"accuracy_score",3)fold: 1, 0.96 fold: 2, 0.94 fold: 3, 0.98 errors: 0 (mean = 0.96, std = 0.020000000000000018, folds = 3, errors = 0)