473,769 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Questions about mathematical and statistical functionality in Python

Greetings Pythoners!

I hope you'll indulge an ignorant outsider. I work at a financial software
firm, and the tool I currently use for my research is R, a software
environment for statistical computing and graphics. R is designed with
matrix manipulation in mind, and it's very easy to do regression and time
series modeling, and to plot the results and test hypotheses. The kinds of
functionality we rely on the most are standard and robust versions of
regression and principal component / factor analysis, bayesian methods such
as Gibbs sampling and shrinkage, and optimization by linear, quadratic,
newtonian / nonlinear, and genetic programming; frequently used graphics
include QQ plots and histograms. In R, these procedures are all available
as functions (some of them are in auxiliary libraries that don't come with
the standard distribution, but are easily downloaded from a central
repository).

For a variety of reasons, the research group is considering adopting Python.
Naturally, I am curious about the mathematical, statistical, and graphical
functionality available in Python. Do any of you out there use Python in
financial research, or other intense mathematical/statistical computation?
Can you compare working in Python with working in a package like R or S-Plus
or Matlab, etc.? Which of the procedures I mentioned above are available in
Python? I appreciate any insight you can provide. Thanks!

-- TMK --
212-460-5430 home
917-656-5351 cell
Jun 14 '07 #1
4 3076
On Jun 14, 4:02 pm, "Talbot Katz" <topk...@msn.co mwrote:
Greetings Pythoners!

I hope you'll indulge an ignorant outsider. I work at a financial software
firm, and the tool I currently use for my research is R, a software
environment for statistical computing and graphics. R is designed with
matrix manipulation in mind, and it's very easy to do regression and time
series modeling, and to plot the results and test hypotheses. The kinds of
functionality we rely on the most are standard and robust versions of
regression and principal component / factor analysis, bayesian methods such
as Gibbs sampling and shrinkage, and optimization by linear, quadratic,
newtonian / nonlinear, and genetic programming; frequently used graphics
include QQ plots and histograms. In R, these procedures are all available
as functions (some of them are in auxiliary libraries that don't come with
the standard distribution, but are easily downloaded from a central
repository).

For a variety of reasons, the research group is considering adopting Python.
Naturally, I am curious about the mathematical, statistical, and graphical
functionality available in Python. Do any of you out there use Python in
financial research, or other intense mathematical/statistical computation?
Can you compare working in Python with working in a package like R or S-Plus
or Matlab, etc.? Which of the procedures I mentioned above are available in
Python? I appreciate any insight you can provide. Thanks!

-- TMK --
212-460-5430 home
917-656-5351 cell
I'd look at following modules:

matplotlib - http://matplotlib.sourceforge.net/
numpy - http://numpy.scipy.org/

Finally, this website lists other resources: http://www.astro.cornell.edu/staff/loredo/statpy/

Mike

Jun 14 '07 #2
Talbot Katz wrote:
I hope you'll indulge an ignorant outsider. I work at a financial
software firm, and the tool I currently use for my research is R, a
software environment for statistical computing and graphics. R is
designed with matrix manipulation in mind, and it's very easy to do
regression and time series modeling, and to plot the results and test
hypotheses. The kinds of functionality we rely on the most are standard
and robust versions of regression and principal component / factor
analysis, bayesian methods such as Gibbs sampling and shrinkage, and
optimization by linear, quadratic, newtonian / nonlinear, and genetic
programming; frequently used graphics include QQ plots and histograms.
In R, these procedures are all available as functions (some of them are
in auxiliary libraries that don't come with the standard distribution,
but are easily downloaded from a central repository).
I use both R and Python for my work. I think R is probably better for
most of the stuff you are mentioning. I do any sort of heavy
lifting--database queries/tabulation/aggregation in Python and load the
resulting data frames into R for analysis and graphics.
--
Michael Hoffman
Jun 14 '07 #3
Michael Hoffman wrote:
Talbot Katz wrote:
>I hope you'll indulge an ignorant outsider. I work at a financial
software firm, and the tool I currently use for my research is R, a
software environment for statistical computing and graphics. R is
designed with matrix manipulation in mind, and it's very easy to do
regression and time series modeling, and to plot the results and test
hypotheses. The kinds of functionality we rely on the most are standard
and robust versions of regression and principal component / factor
analysis, bayesian methods such as Gibbs sampling and shrinkage, and
optimization by linear, quadratic, newtonian / nonlinear, and genetic
programming; frequently used graphics include QQ plots and histograms.
In R, these procedures are all available as functions (some of them are
in auxiliary libraries that don't come with the standard distribution,
but are easily downloaded from a central repository).

I use both R and Python for my work. I think R is probably better for
most of the stuff you are mentioning. I do any sort of heavy
lifting--database queries/tabulation/aggregation in Python and load the
resulting data frames into R for analysis and graphics.
I would second that. It is not either/or. Use Python, including Numpy
and matplotlib and packages from SciPy, for some things, and R for
others. And you can even embed R in Python using RPy - see
http://rpy.sourceforge.net/

We use the combination of Python, Numpy (actually, the older Numeric
Python package, but soon to be converted to Numpy), RPy and R in our
NetEpi Analysis project - exploratory epidemiological analysis of large
data sets - see http://sourceforge.net/projects/netepi - and it is a
good combination - Python for the Web interface, data manipulation and
data heavy-lifting, and for some of the more elementary statistics, and
R for more involved statistical analysis and graphics (with teh option
of using matplotlib or other Python-based graphics packages for some
tasks if we wish). The main thing to remember, though, is that indexing
is zero-based in Python and 1-based in R...

Tim C
Jun 14 '07 #4
On Thursday 14 June 2007 5:54 pm, Tim Churches wrote:
Michael Hoffman wrote:
Talbot Katz wrote:
I hope you'll indulge an ignorant outsider. I work at a financial
software firm, and the tool I currently use for my research is R, a
software environment for statistical computing and graphics. R is
designed with matrix manipulation in mind, and it's very easy to do
regression and time series modeling, and to plot the results and test
hypotheses. The kinds of functionality we rely on the most are standard
and robust versions of regression and principal component / factor
analysis, bayesian methods such as Gibbs sampling and shrinkage, and
optimization by linear, quadratic, newtonian / nonlinear, and genetic
programming; frequently used graphics include QQ plots and histograms.
In R, these procedures are all available as functions (some of them are
in auxiliary libraries that don't come with the standard distribution,
but are easily downloaded from a central repository).
I use both R and Python for my work. I think R is probably better for
most of the stuff you are mentioning. I do any sort of heavy
lifting--database queries/tabulation/aggregation in Python and load the
resulting data frames into R for analysis and graphics.

I would second that. It is not either/or. Use Python, including Numpy
and matplotlib and packages from SciPy, for some things, and R for
others. And you can even embed R in Python using RPy - see
http://rpy.sourceforge.net/

We use the combination of Python, Numpy (actually, the older Numeric
Python package, but soon to be converted to Numpy), RPy and R in our
NetEpi Analysis project - exploratory epidemiological analysis of large
data sets - see http://sourceforge.net/projects/netepi - and it is a
good combination - Python for the Web interface, data manipulation and
data heavy-lifting, and for some of the more elementary statistics, and
R for more involved statistical analysis and graphics (with teh option
of using matplotlib or other Python-based graphics packages for some
tasks if we wish). The main thing to remember, though, is that indexing
is zero-based in Python and 1-based in R...

Tim C
Thirded. I use R, Python, Matlab along with other languages (I hate pipeline
pilot) in my work and from what I've seen nothing can compare with R when it
comes to stats. I love R, from its brilliant CRAN system (PyPI needs serious
work to be considered in the same class as CPAN et al) to its delicious Emacs
integration.

I just wish there was a way to distribute R packages without requiring the
user to separately install R.

In a similar vein, I wish there was a reasonable Free Software equivalent to
Spotfire. The closest I've found (and they're nowhere near as good) are
Orange (http://www.ailab.si/orange) and WEKA
(http://www.cs.waikato.ac.nz/ml/weka/). Orange is written in Python, but its
tied to QT 2.x as the 3.x series was not available on Windows under the GPL.
Josh Gilbert
Jun 15 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1729
by: dont bother | last post by:
Hey, I was just wondering if python has any support modules for statistical techniques as Bayesian, Markovian Style Models etc. Any hints? Thanks Dont __________________________________
6
1724
by: administrata | last post by:
Hi! I'm programming maths programs. And I got some questions about mathematical signs. 1. Inputing suqare like a * a, It's too long when I do time-consuming things. Can it be simplified? 2. Inputing fractions like (a / b) + (c / d), It's tiring work too. Can it be simplified? 3. How can i input root?
162
14903
by: techievasant | last post by:
hello everyone, Iam vasant from India.. I have a test+interview on C /C++ in the coming month so plz help me by giving some resources of FAQS, interview questions, tracky questions, multiple choice questions.etc.. I'll be indebted to everyone.. Thanks in advance.. regards vasant shetty Bangalore
81
7348
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there be any advantage in having strcat and strcpy return a pointer to the "end" of the destination string rather than returning a
3
3699
by: Thomas Nelson | last post by:
Sorry if this is a FAQ, but I couldn't find a good summary through google. What kinds of statistical analysis tools exist in python? I really just need t-tests, chi-squared test, and other such tests of statistical significance. A few things point to numpy and scipy, but I was surprised to find the documentation for numpy is not freely available, and I thought it would be wise to ask here before I download it and start hunting through...
5
4439
by: jeremito | last post by:
I am extending python with C++ and need some help. I would like to convert a string to a mathematical function and then make this a C++ function. My C++ code would then refer to this function to calculate what it needs. For example I want to tell my function to calculate "x^2 + 3x +2", but later on I may want: "x + 3". Does anybody know how I can get an arbitrary string in Python (but proper mathematical function) turned into a C++...
6
3008
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python interface is providing a convenient scripting toolkit for the application. One example is that a user can write a python script like: player = Player() game.loadPlayer(player) player.moveTo(location)
8
7984
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying to catch up again with Python. I am now appearing for Job Interviews these days and I am wondering if anybody of you appeared for a Python Interview. Can you please share the questions you were asked. That will be great help to me.
2
1579
by: mc | last post by:
I'm looking for a library which can do mathematical stuff like solving equations. Or calculation the nulls of a function and so on. Does anyone know one? Thanks in advance!
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.