Polynomial expansion from Python to Mathematica

Click For Summary
SUMMARY

The discussion centers on generating polynomial expansions using the Python library chaospy, specifically the command cp.orth_ttr, which creates orthogonal polynomials for random variables such as normal and uniform distributions. Users seek to replicate this functionality in Mathematica, but there is no definitive solution provided. The conversation highlights a potential issue with the user's Python code, indicating a missing matplotlib installation, which may affect the output. The discussion underscores the need for cross-platform compatibility in polynomial expansion tools.

PREREQUISITES
  • Familiarity with Python programming and libraries, specifically chaospy version 2.0.
  • Understanding of polynomial expansions and orthogonal polynomials.
  • Basic knowledge of Mathematica for potential implementation.
  • Experience with error handling in Python, particularly related to module installations.
NEXT STEPS
  • Research Mathematica's capabilities for polynomial expansions and orthogonal polynomials.
  • Explore the chaospy library documentation for advanced features and examples.
  • Learn about error handling in Python, focusing on module installation issues.
  • Investigate alternative libraries in Python or Mathematica that can perform similar polynomial expansion tasks.
USEFUL FOR

Data scientists, mathematicians, and software developers interested in polynomial expansions and those transitioning between Python and Mathematica for statistical modeling.

confused_engineer
Messages
34
Reaction score
1
Hi everybody.

In Python there is a library called chaospy. One useful command is cp.orth_ttr which generates a polynomial expansion, e. g. a series of orthogonal polynomials or orders zero, one, two... for a random variable e.g normal, uniform...

For more information see https://pypi.python.org/pypi/chaospy/2.0

I use it as shown in the attached image.

Can someone tell me if there exists a way to obtain these same results in Mathematica?https://ibb.co/dEuFQx

Edit: since it seems that the image is not working properly, I also provide a link https://ibb.co/cm2Vsc
 
Technology news on Phys.org
Not sure what your question is. The link to the image doesn't work (as you know) -- my browser says that page doesn't exist. In your other link, your python code has an error, possibly because the matplotlib module hasn't been installed.

If your question is about Mathematica, I'm not knowledgeable to answer that question.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 46 ·
2
Replies
46
Views
9K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
518
  • · Replies 13 ·
Replies
13
Views
7K
  • · Replies 7 ·
Replies
7
Views
17K
  • · Replies 1 ·
Replies
1
Views
4K