You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/workflow_introduction.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ end
66
66
#############
67
67
# Quick example and investigation of the best result:
68
68
ts_clust_result =run_clust(ts_input_data; method="kmeans", representation="centroid", n_init=5, n_clust=5) # note that you should use n_init=1000 at least for kmeans.
@@ -219,7 +219,7 @@ function representation_modification(extr_vals::ClustData,
219
219
k_ids_mod=deepcopy(clust_data.k_ids)
220
220
# if this particular original time series period is though represented in the extreme values, the new period number of the extreme value (clust_data.K+old number) is assigned to this original time series period - in case of feasibility they are all zero and nothing is changed
# NOTE if you need clustered data more precise than 8 digits change the following line accordingly
108
-
n_digits_data_round=8# Gurobi throws warning when rounding errors on order~1e-13 are passed in. Rounding errors occur in clustering of many zeros (e.g. solar).
109
-
returnClustDataMerged(data_norm_merged.region,data_norm_merged.years,n_clust,data_norm_merged.T,round.(centers[ind_mincost]; digits=n_digits_data_round),data_norm_merged.data_type,weights[ind_mincost],k_ids), cost, cost_best, iter
117
+
n_digits_data_round=8# Gurobi throws warning when rounding errors on order~1e-13 are passed in. Rounding errors occur in clustering of many zeros (e.g. solar).
#TODO: not used yet, but maybe best to implement this one later for users who just want to use clustering but do not care about the locally converged solutions
70
-
"ClustResultBest"
71
-
struct ClustResultBest <:ClustResult
72
-
best_results::ClustData
73
-
best_ids::Array{Int,1}
74
-
best_cost::Float64
75
-
data_type::Array{String}
76
-
clust_config::Dict{String,Any}
77
-
end
78
-
79
-
"ClustResultSimple"
80
-
struct ClustResultSimple <:ClustResult
81
-
best_results::ClustData
82
-
#TODO: clust_data::ClustData
83
-
clust_config::Dict{String,Any}
68
+
"ClustResult"
69
+
struct ClustResult <:AbstractClustResult
70
+
clust_data::ClustData
71
+
cost::Float64
72
+
config::Dict{String,Any}
84
73
end
85
74
86
75
"SimpleExtremeValueDescr"
@@ -226,8 +215,8 @@ function ClustData(region::String,
226
215
T::Int,
227
216
data::Dict{String,Array},
228
217
weights::Array{Float64},
229
-
delta_t::Array{Float64,2},
230
218
k_ids::Array{Int,1};
219
+
delta_t::Array{Float64,2}=ones(T,K),
231
220
mean::Dict{String,Array}=Dict{String,Array}(),
232
221
sdv::Dict{String,Array}=Dict{String,Array}()
233
222
)
@@ -268,7 +257,7 @@ function ClustData(data::FullInputData,
0 commit comments