Skip to content

Commit

Permalink
minor updated package dependencies to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodaigh committed Oct 6, 2024
1 parent 5a7d4fd commit 378de72
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JLBoost"
uuid = "13d6d4a1-5e7f-472c-9ebc-8123a4fbb95f"
authors = ["Dai ZJ <[email protected]>"]
version = "0.1.18"
version = "0.1.17"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -17,14 +17,14 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
AbstractTrees = "0.3"
CategoricalArrays = "0.7, 0.8, 0.9"
AbstractTrees = "0.4"
CategoricalArrays = "0.10"
DataFrames = "1"
LossFunctions = "0.5, 0.6"
MappedArrays = "0.2, 0.3, 0.4"
LossFunctions = "0.11"
MappedArrays = "0.4"
Missings = "1"
SortingLab = "^0.2.1"
StatsBase = "0.32, 0.33"
SortingLab = "0.3"
StatsBase = "0.34"
Tables = "1"
julia = "1"

Expand Down
12 changes: 6 additions & 6 deletions benchmarks/benchmark-again-loss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ g4(prevw, target) = ForwardDiff.derivative(prevw->logitbinarycrossentropy(prevw,
g5(prevw, target) = Zygote.gradient(prevw) do prevw
Zygote.forwarddiff(prew->logitbinarycrossentropy(prew, target), prevw)
end[1]
g6(prevw, target) = deriv(LogitProbLoss(), target, 1 / (1 + exp(-prevw)))
g6(prevw, target) = deriv(LogitMarginLoss(), target, 1 / (1 + exp(-prevw)))
easy(prevw, target) = 1 / (1 + exp(-prevw)) - target


Expand All @@ -26,18 +26,18 @@ gtarget = gpu(target)
g6.(gprev, gtarget)


res = logitbinarycrossentropy.(prevw, target)
res = logitbinarycrossentropy.(prevw, target)

value(LogitProbLoss(), target, 1 ./ (1 .+ exp.(-prevw)))
value(LogitMarginLoss(), target, 1 ./ (1 .+ exp.(-prevw)))

deriv(LogitProbLoss(), target, prevw)
deriv(LogitMarginLoss(), target, prevw)

deriv2(LogitProbLoss(), target, prevw)
deriv2(LogitMarginLoss(), target, prevw)


using LossFunctions

value(LogitProbLoss(), target, prevw)
value(LogitMarginLoss(), target, prevw)



Expand Down
3 changes: 1 addition & 2 deletions build-readme.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Weave readme
using Pkg
cd("c:/git/JLBoost")
Pkg.activate("c:/git/JLBoost/jlboost-test")
# Pkg.activate("jlboost-test")
Pkg.update()
upcheck()

Expand Down
2 changes: 1 addition & 1 deletion src/JLBoost.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module JLBoost
using SortingLab
using StatsBase: sample
using Base.Iterators: drop
using LossFunctions: LogitProbLoss, deriv, deriv2, SupervisedLoss
using LossFunctions: LogitMarginLoss, deriv, deriv2, SupervisedLoss
#using Zygote: gradient, hessian
#using ForwardDiff: gradient, hessian
#using Flux: logitcrossentropy, logitbinarycrossentropy
Expand Down
11 changes: 6 additions & 5 deletions src/JLBoostTrees/tree-and-tree-models.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AbstractTrees: AbstractShadowTree
using AbstractTrees: AbstractNode

abstract type AbstractJLBoostTree <: AbstractShadowTree end
abstract type AbstractJLBoostTree{T} <: AbstractNode{T} end

mutable struct JLBoostTreeModel
jlt::Vector
Expand All @@ -22,19 +22,20 @@ trees(jlt::JLBoostTreeModel) = jlt.jlt
v3
end

mutable struct JLBoostTree <: AbstractJLBoostTree
mutable struct JLBoostTree{T} <: AbstractJLBoostTree{T}
weight
parent::Union{JLBoostTree, Nothing}
children::Vector{AbstractJLBoostTree}
splitfeature
split
gain
JLBoostTree(w::T; parent=nothing) where {T <: Number} = new(w, parent, JLBoostTree[], missing, missing, missing)
JLBoostTree(weight; parent=nothing) = new{nothing}(weight, parent, JLBoostTree[], missing, missing, missing)
end

mutable struct WeightedJLBoostTree <: AbstractJLBoostTree
mutable struct WeightedJLBoostTree{T} <: AbstractJLBoostTree{T}
tree::JLBoostTree
eta::Number
WeightedJLBoostTree(tree, eta) = new{nothing}(tree, eta)
end

Base.getproperty(jlt::WeightedJLBoostTree, sym::Symbol) = begin
Expand Down

2 comments on commit 378de72

@xiaodaigh
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116675

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.17 -m "<description of version>" 378de7230fa2e59f385252b5d0d05f9ccd5a536b
git push origin v0.1.17

Please sign in to comment.