Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 import arviz as az 2 from scipy import stats 3 import os 4 import pandas as pd 5 import numpy as np 6 import

1 import arviz as az
2 from scipy import stats 3 import os 4 import pandas as pd 5 import numpy as np 6 import matplotlib. pyplot as plt
7 usecols = I 'LOA', 'LBP', 'BEAM', 'DEPTH', 'DRAFT', ' PROP
POWER', 'AUX POWER', 'TEU', 'SPEED']
8 cwd =
os. path.abspath ('/content/gdrive/MyDrive/Container_ShipData.xls
')
9 ships_data2= pd.read_excel(cwd, usecols = L'LBP', 'TEU',
' SPEED' ])
10 ships_data2. head ()
11 list1= ships_data2['LBP']
12 list2= ships_data2['TEU']
13 x 3= list1. values
14 Y_3= listz. values
15 x_3=x_3- x_3. mean ()16_ ax = plt. subplots (1,2, Figsize=(10,5))
17 beta_c, alpha_c = stats.linregress (x_3, Y_3)1:21
18 import pymc3 as pm
19 with pm. Model () as ship _model_t:
20
x
=
pm.
Normal
('a',
mu=y_
3.
mean
B = pm.HalfNormal ('B', sd =1)
= pm. HalfNormal ('',5)
(),
sd=2)
21
22
23
y_pred
=
pm.
Normall'y_pred',
mu=a
+
B
*x_3,
sd=e, observed=y_3)
24 trace_t = pm. sample (2000)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions