File:Wasserstein-GAN critic vs GAN discriminator.svg

Summary

Description
English: Generated in Julia 1.7.2 by

```julia using Distributions

μ = Normal(0, 1) ν = Normal(2, 2)

using Roots

cdfdiff = (x -> cdf(μ, x) - cdf(ν, x)) cdfzeros = find_zeros(cdfdiff, -5, 5)

function optimalf(x)

   return 0.5 - 0.1*abs(x-cdfzeros[1])

end

function optimalD(x)

   return 0.4 * pdf(ν, x)/(pdf(μ, x) + pdf(ν, x))

end

function logminusoptimalD(x)

   return log(1-optimalD(x))+0.6

end

using StatsPlots using LaTeXStrings

p1 = plot(μ; label="Generator's distribution") plot!(ν; label="reference distribution")

  1. plot!(cdfdiff; linestyle=:dashdot, label=L"CDF_{\mu} - CDF_{\nu}")

vline!(cdfzeros; linestyle=:dashdot, label="equal CDF") plot!(optimalf;label="optimal Wasserstein critic (scaled)") plot!(optimalD; label="optimal GAN discriminator (scaled)") scene = plot(p1, size=(800,400), xlim=(-4, 4), ylim=(-0.3, 0.5), legend=:bottomright, legendfont=9)

```
Date
Source Own work
Author Cosmia Nebula

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Wasserstein-GAN%20critic%20vs%20GAN%20discriminator.svg
Category:Self-published work Category:Probability plots
Category:CC-BY-SA-4.0 Category:Probability plots Category:Self-published work