Comments (6)
from bap3.
En general es mejor abrir un issue por cada tema.
La diferencia entre las barras y los puntos es que el histograma no está normalizado, para que esté normalizado tenés que pasar el argumento density=True a plt.hist
from bap3.
Genial!
Ahora funcionó, sin embargo, obtuve:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[26], line 1
----> 1 pz.BetaBinomial(alpha=10, beta=10, n=5).plot_interactive()
File [~\.conda\envs\pymc_env\Lib\site-packages\preliz\distributions\distributions.py:541](http://localhost:8888/lab/tree/~/.conda/envs/pymc_env/Lib/site-packages/preliz/distributions/distributions.py#line=540), in Distribution.plot_interactive(self, kind, xy_lim, pointinterval, interval, levels, figsize)
539 else:
540 for name, value, support in zip(self.param_names, self.params, self.params_support):
--> 541 sliders[name] = get_slider(name, value, *support)
543 def plot(**args): # pylint: disable=inconsistent-return-statements
544 if self.__class__.__name__ == "Categorical":
File [~\.conda\envs\pymc_env\Lib\site-packages\preliz\internal\plot_helper.py:283](http://localhost:8888/lab/tree/~/.conda/envs/pymc_env/Lib/site-packages/preliz/internal/plot_helper.py#line=282), in get_slider(name, value, lower, upper)
280 min_v, max_v, step = generate_range(value, lower, upper)
282 if isinstance(value, float):
--> 283 slider_type = FloatSlider
284 else:
285 slider_type = IntSlider
NameError: name 'FloatSlider' is not defined
De todas maneras las otras funciones trabajan.
Quedo atento.
Gracias por la inmediatez de la primera respuesta.
from bap3.
Otro detalle, en las versiones nuevas de PreliZ algunas dependencias son opcionales. Podes instalarlas todas haciendo pip install "preliz[full,notebook]"
from bap3.
Genial funcionó perfecto.
Muchas gracias!
Quería agregar esta pregunta, no sé si tengo que abrir un nuevo issue. Entiendo que la primera parte del libro es para desarrollar las intuiciones de los tipos de distribuciones. Sin embargo, en el Código 1.4 obtuve este gráfico, que discrepa del que está en la Figura 1.4. Creo que es por la escala de .rvs(1000)
. Intenté con valores más bajos pero me reduce las barras a una, aunque se aprecia mejor la distribución pdf beta binomial como línea.
plt.hist(pz.BetaBinomial(alpha=2, beta=5, n=5).rvs(1000))
pz.BetaBinomial(alpha=2, beta=5, n=5).plot_pdf();
from bap3.
Muchas gracias Osvaldo!
from bap3.
Related Issues (20)
- chap_01.ipynb warning "Possibly did not call parent GridSpec with the "figure" keyword" HOT 1
- Do you have any plans to add solutions for exercises in chapter 3 and forwards? HOT 2
- Not sure what pz is? HOT 8
- Chapter 2: Savage Dickey Density Ratio HOT 4
- Link on page 88 (Exercise 4) leads to incorrect web site. HOT 1
- Chapter 4 Exercise 5 refers to missing `model_t2` HOT 1
- Question regarding plot for the simple regression example in chapter 4 HOT 2
- Please explain what is the Bernoulli distribution HOT 1
- Typo p. 115 for noise term? HOT 1
- Why no log-normal distributions in the examples? HOT 3
- Possible typos in Code 2.26 of page 81 in BAP3 book HOT 2
- Why is coinflip likelihood a Bernoulli in Chapter 2 when it was a Binomial in Chapter 1? HOT 2
- Fig 3.6
- Pg 105 typo
- pg 133 "model interactions" HOT 2
- pg 194-195
- pg 254 wrong Greek letter for inverse link function
- Minor typo on page 62
- Kurtosis on page 23, third edition HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bap3.