Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/src/examples/Thermal_Generation_Dispatch_Example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ Plots.plot(
d,
data_results[1, :, 1:(I+1)];
title = "Generation by Demand",
label = ["Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"],
label = [
"Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"
],
xlabel = "Demand [unit]",
ylabel = "Generation [unit]",
)
Expand All @@ -168,7 +170,9 @@ Plots.plot(
d,
data_results[1, :, (I+2):(2*(I+1))];
title = "Sensitivity of Generation by Demand",
label = ["T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"],
label = [
"T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"
],
xlabel = "Demand [unit]",
ylabel = "Sensitivity [-]",
)
Expand All @@ -179,7 +183,9 @@ Plots.plot(
d,
data_results[2, :, 1:(I+1)];
title = "Generation by Demand",
label = ["Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"],
label = [
"Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"
],
xlabel = "Demand [unit]",
ylabel = "Generation [unit]",
)
Expand All @@ -189,7 +195,9 @@ Plots.plot(
d,
data_results[2, :, (I+2):(2*(I+1))];
title = "Sensitivity of Generation by Demand",
label = ["T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"],
label = [
"T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"
],
xlabel = "Demand [unit]",
ylabel = "Sensitivity [-]",
)
16 changes: 12 additions & 4 deletions docs/src/examples/Thermal_Generation_Dispatch_Example_new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ Plots.plot(
d,
data_results[1, :, 1:(I+1)];
title = "Generation by Demand",
label = ["Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"],
label = [
"Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"
],
xlabel = "Demand [unit]",
ylabel = "Generation [unit]",
)
Expand All @@ -164,7 +166,9 @@ Plots.plot(
d,
data_results[1, :, (I+2):(2*(I+1))];
title = "Sensitivity of Generation by Demand",
label = ["T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"],
label = [
"T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"
],
xlabel = "Demand [unit]",
ylabel = "Sensitivity [-]",
)
Expand All @@ -175,7 +179,9 @@ Plots.plot(
d,
data_results[2, :, 1:(I+1)];
title = "Generation by Demand",
label = ["Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"],
label = [
"Thermal Generation 1" "Thermal Generation 2" "Thermal Generation 3" "Generation Deficit"
],
xlabel = "Demand [unit]",
ylabel = "Generation [unit]",
)
Expand All @@ -185,7 +191,9 @@ Plots.plot(
d,
data_results[2, :, (I+2):(2*(I+1))];
title = "Sensitivity of Generation by Demand",
label = ["T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"],
label = [
"T. Gen. 1 Sensitivity" "T. Gen. 2 Sensitivity" "T. Gen. 3 Sensitivity" "Gen. Deficit Sensitivity"
],
xlabel = "Demand [unit]",
ylabel = "Sensitivity [-]",
)
5 changes: 1 addition & 4 deletions docs/src/examples/autotuning-ridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ for α in αs
ŷ_test = X_test *
ŷ_train = X_train *
push!(mse_test, LinearAlgebra.norm(ŷ_test - y_test)^2 / (2 * Ntest * D))
push!(
mse_train,
LinearAlgebra.norm(ŷ_train - y_train)^2 / (2 * Ntrain * D),
)
push!(mse_train, LinearAlgebra.norm(ŷ_train - y_train)^2 / (2 * Ntrain * D))
end

# Visualize the Mean Score Error metric
Expand Down
5 changes: 1 addition & 4 deletions docs/src/examples/autotuning-ridge_new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ for α in αs
ŷ_test = X_test * ŵ
ŷ_train = X_train * ŵ
push!(mse_test, LinearAlgebra.norm(ŷ_test - y_test)^2 / (2 * Ntest * D))
push!(
mse_train,
LinearAlgebra.norm(ŷ_train - y_train)^2 / (2 * Ntrain * D),
)
push!(mse_train, LinearAlgebra.norm(ŷ_train - y_train)^2 / (2 * Ntrain * D))
end

# Visualize the Mean Score Error metric
Expand Down
16 changes: 2 additions & 14 deletions docs/src/examples/sensitivity-analysis-ridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ p = Plots.scatter(
label = "",
)
mi, ma = minimum(X), maximum(X)
Plots.plot!(
p,
[mi, ma],
[mi * ŵ + b̂, ma * ŵ + b̂];
color = :blue,
label = "",
)
Plots.plot!(p, [mi, ma], [mi * ŵ + b̂, ma * ŵ + b̂]; color = :blue, label = "")
Plots.title!("Regression slope sensitivity with respect to x")

#
Expand All @@ -159,13 +153,7 @@ p = Plots.scatter(
label = "",
)
mi, ma = minimum(X), maximum(X)
Plots.plot!(
p,
[mi, ma],
[mi * ŵ + b̂, ma * ŵ + b̂];
color = :blue,
label = "",
)
Plots.plot!(p, [mi, ma], [mi * ŵ + b̂, ma * ŵ + b̂]; color = :blue, label = "")
Plots.title!("Regression slope sensitivity with respect to y")

# Note the points with less central `x` values induce a greater y sensitivity of the slope.
16 changes: 2 additions & 14 deletions docs/src/examples/sensitivity-analysis-ridge_new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ p = Plots.scatter(
label = "",
)
mi, ma = minimum(X), maximum(X)
Plots.plot!(
p,
[mi, ma],
[mi * ŵ + b̂, ma * ŵ + b̂];
color = :blue,
label = "",
)
Plots.plot!(p, [mi, ma], [mi * ŵ + b̂, ma * ŵ + b̂]; color = :blue, label = "")
Plots.title!("Regression slope sensitivity with respect to x")

#
Expand All @@ -159,13 +153,7 @@ p = Plots.scatter(
label = "",
)
mi, ma = minimum(X), maximum(X)
Plots.plot!(
p,
[mi, ma],
[mi * ŵ + b̂, ma * ŵ + b̂];
color = :blue,
label = "",
)
Plots.plot!(p, [mi, ma], [mi * ŵ + b̂, ma * ŵ + b̂]; color = :blue, label = "")
Plots.title!("Regression slope sensitivity with respect to y")

# Note the points with less central `x` values induce a greater y sensitivity of the slope.
Loading