Code Monkey home page Code Monkey logo

Comments (4)

willtebbutt avatar willtebbutt commented on June 10, 2024 2

Hi @ritesh99rakesh thanks for your interest. In the first instance it would be great to be able to provide an interface along the lines of

plot(f, xmin, xmax)

where f is a GP that's assumed to be 1-dimensional, and xmax and xmin are real numbers that say what range to plot the GP on. You could look here or at any of the other examples for ideas - they all follow the same basic pattern (and you'll quickly see that there's a lot of repeated code -- hence this issue 🙂 ):

  1. Plot the mean.
  2. Fill +/- 3 std. devs. around the mean with fairly low alpha.
  3. Plot some samples.

Pseudo-code for this might be something like:

x_plot = range(xmin, xmax; length=N_plot)
mean, std = marginals(f(x_plot))
samples = rand(f(x_plot), number_of_samples)

# plot_mean
# plot_mean +/- 3 std
# plot_samples

The second example on the landing page also provides a really good example of what I'm on about. In particular if you look at the Latent Function bit of the figure, you can see an example of what I mean by the above.

I was imagining that we would integrate with Plots.jl. In particular take a look at the recipes documentation. I've not really worked with recipes in plots before now, so I'll leave it to you to figure out how all of that works.

Please do open a work-in-progress PR as early as possible so that we can discuss the design a bit.

I would suggest adding your code to a file called src/util/plotting.jl and including it after the include("util/model.jl") line in src/Stheno.jl. Please do let me know if there's anything here that's not clear 🙂 .

from stheno.jl.

ritesh99rakesh avatar ritesh99rakesh commented on June 10, 2024 1

I want to work on this issue. As I am applying for GSoC'19 under Turing for GP project, I think that solving this issue will ease implementation of papers for Turing model zoo. Please guide me on how to proceed with this issue.

from stheno.jl.

nathanaelbosch avatar nathanaelbosch commented on June 10, 2024 1

Hi @willtebbutt, I would like to help with this issue. I think I already have a reasonable proposal that should make basic plotting easier, especially regarding the basic functionality of plotting the mean +/- 3 std. devs. I also implemented support for the plotting of samples, as well as specifying the type of the sample plot (such as :line or :scatter), but I'm less sure here about the best design.

I also have two example scripts, corresponding to the two examples on the landing page. I am not sure how to best share them with you so please let me know about that.

Overall, I am quite new to Julia so I hope I followed common practices, and this is also my first ever open source contribution :) I will open a pull issue shortly (my first open source contribution ever!), and I'm looking forward to your feedback!

from stheno.jl.

nathanaelbosch avatar nathanaelbosch commented on June 10, 2024

I created two gists in order to share the two example scripts, which are modifications of the two examples that were used for the landing page plots:
simple_sensor_fusion.jl
process_decomposition.jl

from stheno.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.