Code Monkey home page Code Monkey logo

Comments (6)

aloctavodia avatar aloctavodia commented on June 23, 2024 1

from bap3.

aloctavodia avatar aloctavodia commented on June 23, 2024 1

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.

bwcastillo avatar bwcastillo commented on June 23, 2024

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.

aloctavodia avatar aloctavodia commented on June 23, 2024

Otro detalle, en las versiones nuevas de PreliZ algunas dependencias son opcionales. Podes instalarlas todas haciendo pip install "preliz[full,notebook]"

from bap3.

bwcastillo avatar bwcastillo commented on June 23, 2024

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();

image

from bap3.

bwcastillo avatar bwcastillo commented on June 23, 2024

Muchas gracias Osvaldo!

from bap3.

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.