Skip to content

Commit

Permalink
Replace deprecated mldatautils
Browse files Browse the repository at this point in the history
  • Loading branch information
AP6YC committed Sep 5, 2024
1 parent a523b45 commit 80e1b00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MLBase = "f0e99cf1-93fa-52ec-9ecc-5026115318e0"
MLDataUtils = "cc2ba9b6-d476-5e6d-8eaf-a92d5412d41d"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
NumericalTypeAliases = "be9b823e-291e-41a1-b8ce-806204e78f92"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
Expand Down Expand Up @@ -61,7 +61,6 @@ JLD2 = "0.4"
JSON = "0.21"
Latexify = "0.16"
MLBase = "0.9"
MLDataUtils = "0.5"
NumericalTypeAliases = "0.1, 0.2"
PlotThemes = "3"
Plots = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/DCCR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using
# Latexify, # latexify
Logging, # Printing diagnostics
MLBase, # confusmat
MLDataUtils, # stratifiedobs
MLUtils, # splitobs
NumericalTypeAliases, # RealMatrix, IntegerVector, etc.
Plots, # Plotting
Printf, # Formatted number printing
Expand Down
4 changes: 2 additions & 2 deletions src/lib/c3/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,14 @@ function get_n_categories(ddvfa::DDVFA, n_classes::Int)
end

"""
Wrapper of `stratifiedobs`, returns a manual train/test x/y split from a data matrix and labels using MLDataUtils.
Wrapper of `splitobs`, returns a manual train/test x/y split from a data matrix and labels using MLDataUtils.
# Arguments
- `data::RealMatrix`: the feature data to split into training and testing.
- `targets::IntegerVector`: the labels corresponding to the data to split into training and testing.
"""
function get_manual_split(data::RealMatrix, targets::IntegerVector)
(X_train, y_train), (X_test, y_test) = stratifiedobs((data, targets))
(X_train, y_train), (X_test, y_test) = splitobs((data, targets))
return (X_train, y_train), (X_test, y_test)
end

Expand Down

0 comments on commit 80e1b00

Please # to comment.