![]() Currently, Normal() (least squares, default), Binomial() (logistic), Poisson(), Multinomial(), CoxPH() (Cox model) are supported. It additionally accepts an optional third argument, family, which can be used to specify a generalized linear model. Glmnet has two required parameters: the n x m predictor matrix X and the dependent variable y. stdloss,xlabel = L" \lambda ",ylabel = "loss ") meanloss, xscale = :log10, legend = false, yerror =iris_cv. Julia > p3 = plot(λs,βs ', legend = :topright,legendtitle = "Variable ", labels =irisLabels,xlabel = L" \lambda ",xscale = :log10) Julia > p2 = plot(λs,βs ',title = "Across Cross Validation runs " sharedOpts. ![]() Julia > p1 = plot(λs,βs ',ylabel = L" \beta_i " sharedOpts. Julia > sharedOpts =(legend = false, xlabel = L" \lambda ", xscale = :log10) Julia > irisLabels = reshape( names(iris),( 1, 4)) ![]() Julia > DataFrame(target =y, set =yht, ver =yht, vir =yht) Julia > yht = round.( predict(iris_cv, X, outtype = :prob), digits = 3) Julia > iTest = setdiff( 1 : size(X, 1), iTrain) Julia > iTrain = sample( 1 : size(X, 1), 100, replace = false) Julia > iris = dataset( "datasets ", "iris ") ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |