Skip to content

Commit

Permalink
Merge pull request #22 from JuliaTrustworthyAI/21-incorporate-breakin…
Browse files Browse the repository at this point in the history
…g-changes-to-cejl

done?
  • Loading branch information
pat-alt authored May 1, 2024
2 parents 8074520 + 2ddd652 commit 7d796e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TaijaPlotting"
uuid = "bd7198b4-c7d6-400c-9bab-9a24614b0240"
authors = ["Patrick Altmeyer"]
version = "1.1.2"
version = "1.1.3"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -22,7 +22,7 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
[compat]
CategoricalArrays = "0.10"
ConformalPrediction = "0.1, 0.1.12, 1"
CounterfactualExplanations = "0.1, 1"
CounterfactualExplanations = "1.1.5"
DataAPI = "1"
Distributions = "0.25"
Flux = "0.12, 0.13, 0.14"
Expand Down
14 changes: 7 additions & 7 deletions src/CounterfactualExplations/data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ using MLUtils
function embed(data::CounterfactualData, X::AbstractArray = nothing; dim_red::Symbol = :pca)

# Training compressor:
if isnothing(data.compressor)
if typeof(data.input_encoder) <: MultivariateStats.AbstractDimensionalityReduction
tfn = data.input_encoder
else
X_train, _ = DataPreprocessing.unpack_data(data)
if size(X_train, 1) < 3
tfn = data.compressor
tfn = nothing
else
@info "Training model to compress data."
if dim_red == :pca
tfn = MultivariateStats.fit(PCA, X_train; maxoutdim = 2)
tfn = MultivariateStats.fit(PCA, X_train; maxoutdim=2)
elseif dim_red == :tsne
tfn = MultivariateStats.fit(TSNE, X_train; maxoutdim = 2)
tfn = MultivariateStats.fit(TSNE, X_train; maxoutdim=2)
end
data.compressor = nothing
data.input_encoder = nothing
X = isnothing(X) ? X_train : X
end
else
tfn = data.compressor
end

# Transforming:
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ConformalPrediction = "0.1"
CounterfactualExplanations = "0.1, 1"
CounterfactualExplanations = "1.1.5"
Flux = "0.12, 0.13, 0.14"
LaplaceRedux = "0.1, 0.2"
MLJBase = "0.21, 1"
Expand Down

2 comments on commit 7d796e4

@pat-alt
Copy link
Member Author

@pat-alt pat-alt commented on 7d796e4 May 1, 2024

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/105965

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 v1.1.3 -m "<description of version>" 7d796e4f313250cedb5afbc3664a9289b1dbaeca
git push origin v1.1.3

Also, note the warning: Version 1.1.3 skips over 1.1.2
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.