Bayesian MCMC model and Bayesian regression analysis model

Đang mở
#1,819 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Không có tệp, bài kiểm thử hoặc điểm vào nào trong repository được xác định. Hãy bắt đầu với mô hình TensorFlow Probability đã được đăng, đặc biệt là JointDistributionCoroutine và sample_chain, đồng thời làm rõ issue cần tài liệu mang tính khái niệm hay một ví dụ có thể chạy được. Công việc được xem là hoàn tất khi có một thay đổi tài liệu với phạm vi rõ ràng, giải thích mối quan hệ giữa hai khái niệm.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I wonder the difference between Bayesian MCMC model and Bayesian regression analysis model.
The tensorflow_probability library is being used. The code has been imported from Excel into the target value and various related values, and we are creating a model that predicts the target value only with related values and sets residuals when comparing actual data and predicted values to examine errors.

  • The libraries used in this process are.

import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

tfd = tfp.distributions
tfb = tfp.bijectors

  • Defining the reliability (pre-probability) of the true value
    sensor_accuracy = 0.90
    prior_loc = tf.cast(actual_value, dtype=tf.float32)
    prior_scale = tf.cast((1 - sensor_accuracy) * actual_value, dtype=tf.float32)

  • After defining the model

joint = tfd.JointDistributionCoroutine(model)
num_results = 10000
num_burnin_steps = 500

def target_log_prob_fn(predicted_value):
return joint.log_prob(predicted_value, n)

initial_state = [tf.constant(actual_value, dtype=tf.float32)]

hmc = tfp.mcmc.HamiltonianMonteCarlo(
target_log_prob_fn=target_log_prob_fn,
num_leapfrog_steps=20,
step_size=0.01)

@tf.function
def run_chain():
return tfp.mcmc.sample_chain(
num_results=num_results,
num_burnin_steps=num_burnin_steps,
current_state=initial_state,
kernel=hmc,
trace_fn=lambda current_state, kernel_results: kernel_results)

samples, kernel_results = run_chain()

I started coding for the first time, so I got advice from people around me, and also used chat gpt to construct the code. As a result, I am asking a question because I do not understand clearly whether the concept that made up this model is Bayesian MCMC or Bayesian regression analysis due to the lack of understanding of the code overall.
Thank you for reading. Please give me a lot of advice.

Ngôn ngữ chính
Jupyter Notebook
Star
4.4k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tensorflow/probability

Tất cả issue của tensorflow/probability

Issue tương tự

Thêm issue về Machine Learning

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.