Skip to content

Commit

Permalink
Merge pull request #50 from Evovest/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jeremiedb authored Jun 19, 2020
2 parents 4235aa2 + 4791e85 commit 5282cda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ language: julia
julia:
- nightly
- 1.0
- 1.1
- 1.2
- 1.3
- 1.4

matrix:
fast_finish: true
allow_failures:
- julia: nightly
- julia: 1.0
- julia: 1.1
- julia: 1.2
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "EvoTrees"
uuid = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
authors = ["jeremiedb <[email protected]>"]
version = "0.4.7"
version = "0.4.8"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -13,9 +13,9 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
CategoricalArrays = "0.7"
CategoricalArrays = "0.7, 0.8"
Distributions = "0.22, 0.23"
MLJModelInterface = "0.1, 0.2"
MLJModelInterface = "0.3"
StaticArrays = "0.12"
StatsBase = "0.32, 0.33"
julia = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/MLJ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
function predict(model::EvoTreeClassifier, fitresult, Xnew)
Xnew = MLJModelInterface.matrix(Xnew)
pred = predict(fitresult, Xnew)
return [MLJModelInterface.UnivariateFinite(fitresult.levels, pred[i,:]) for i in 1:size(pred,1)]
return MLJModelInterface.UnivariateFinite(fitresult.levels, pred)
end

function predict(model::EvoTreeCount, fitresult, Xnew)
Expand Down
4 changes: 2 additions & 2 deletions test/MLJ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ fit!(mach, rows=train, verbosity=1)
pred_train = predict(mach, selectrows(X,train))
pred_train_mode = predict_mode(mach, selectrows(X,train))
cross_entropy(pred_train, selectrows(y, train)) |> mean
sum(pred_train_mode .== y[train])
sum(pred_train_mode .== y[train]) / length(y[train])

pred_test = predict(mach, selectrows(X,test))
pred_test_mode = predict_mode(mach, selectrows(X,test))
cross_entropy(pred_test, selectrows(y, test)) |> mean
sum(pred_test_mode .== y[test])
sum(pred_test_mode .== y[test]) / length(y[test])
pred_test_mode = predict_mode(mach, selectrows(X,test))

##################################################
Expand Down

0 comments on commit 5282cda

Please sign in to comment.