Monte Carlo Integration in Python || Complex Integrals Computing & Simulation

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ •

  • @kirill_good_job
    @kirill_good_job 2 місяці тому +1

    your tutorial good, I like it

  • @amineaissiou
    @amineaissiou 9 місяців тому

    I absolutely love your content, keep going mate !

    • @YounesLab
      @YounesLab  9 місяців тому

      Thank you for your support @Amine !

  • @javierrendon2194
    @javierrendon2194 8 місяців тому +1

    How would you do a variable limits integral in D dimensions instead of that integral in a rectangular D-dimensional region? wouul you create numbers following a given distribution?

    • @YounesLab
      @YounesLab  8 місяців тому +1

      Exactly! To handle variable limits in D-dimensional integrals using Monte Carlo, employ importance sampling. Generate points based on probability distributions reflecting the integrand's behavior along each dimension, concentrating samples where the function has higher values for more accurate integration estimates.

  • @angelamusiemangela
    @angelamusiemangela 9 місяців тому +1

    Ma secondo te se il valore dell' integrale varia da 1 a infinito ,in considerazione del valore stesso . Da 1a 10 , in variazione in successione ; qual'e' la soluzione?

    • @YounesLab
      @YounesLab  8 місяців тому

      "infinite" in numerical computing often comes down to what precision you are looking for (since we can't really reach it practically) but to answer yes I would say so. I think to address this, it would be beneficial to assess the convergence behavior of your integration method. Analyzing the convergence patterns and adjusting parameters, such as the number of samples or precision, may help optimize the accuracy of your Monte Carlo integration in Python.

  • @mariatoumi7524
    @mariatoumi7524 9 місяців тому

    Great !

  • @kirill_good_job
    @kirill_good_job 2 місяці тому

    hi, maybe this code better ? do you have mistake ?
    for i in range(1, 10_000):
    x = np.random.choice(x_sample, N_random_samples)
    y = np.random.choice(y_sample, N_random_samples)
    z = np.random.choice(z_sample, N_random_samples)
    you wrote:
    for i in range(1, 10_000):
    x = np.random.choice(x_sample, N_random_samples)
    y = np.random.choice(x_sample, N_random_samples)
    z = np.random.choice(x_sample, N_random_samples)

    • @kirill_good_job
      @kirill_good_job 2 місяці тому

      21:32 time

    • @YounesLab
      @YounesLab  2 місяці тому

      Indeed! I made a little typo mistake there abd it should be x, y, and z. Thank you for for letting me know!
      I will correct it in the github as well