[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUDITORY] Query about Python software



Obviously I never used R enough to get productive with it and to get over the newcomers impression, which he states well:

"R is a shockingly dreadful language for an exceptionally useful data analysis environment. The more you learn about the R language, the worse it will feel. The development environment suffers from literally decades of accretion of stupid hacks from a community containing, to a first-order approximation, zero software engineers.1 R makes me want to kick things almost every time I use it."

Dick



On Sun, Mar 14, 2021 at 9:44 PM David Jackson Morris <dmorris@xxxxxxxxx> wrote:

This is just a non judgy comment.  I use R on a daily basis and to hold on to a semblance of sanity I find this blog quite useful - http://arrgh.tim-smith.us

 

Cheers

David

 

 

David Jackson Morris

Associate Professor/Lektor

 

University of Copenhagen/Københavns Universitet

Speech Pathology and Audiology/Audiologopædi

Department of Nordic Studies and Linguistics/Institut for Nordiske Studier og Sprogvidenskab

Emil Holms Kanal 2

2300 København S

 

Department Homepage

 

 

Title: SD_Logo  -

 

Sådan beskytter vi persondata

 

 

 

Fra: AUDITORY - Research in Auditory Perception <AUDITORY@xxxxxxxxxxxxxxx> på vegne af Ronald van Elburg <RonaldAJ@xxxxxxxxxxxx>
Svar til: "RonaldAJ@xxxxxxxxxxxx" <RonaldAJ@xxxxxxxxxxxx>
Dato: søndag den 14. marts 2021 kl. 11.50
Til: "AUDITORY@xxxxxxxxxxxxxxx" <AUDITORY@xxxxxxxxxxxxxxx>
Emne: Re: Query about Python software

 

Dear Tim,

I might have been responding to something I perceived in your email rather than something that is there.

I think you were right on pointing out that bashing a programming language serves no purpose. However, and that is probably something I perceived in your message but don't find on rereading, one can therefore not dismiss the possibility that a sensible comparison can be made. I do think we should be able to say something along the lines of '(programming language) X is not suitable for Y because of Z' without worrying that someone will be offended. I thought the latter statement was in disagreement with what you wrote.

I like to apologize for misrepresenting your position.

Kind regards,

Ronald van Elburg

 

On 3/8/2021 5:32 PM, Timothy Beechey wrote:

Ronald:

 

What is not right about what I said? Note that I did not advocate for the use of a particular language. You are correct that different languages are more or less suitable for different applications. You are also correct that Python is rightly considered a relatively easy language for novice programmers. Neither of these points are inconsistent with what I said. My point is that disparaging other people's tools of choice, as was done by an earlier poster, is unnecessary in the course of advocating for whichever tool you wish to advocate. If someone finds a language inconsistent, unpredictable or horrible it is often because they are expecting it to be like another language they are more familiar with. Such differences are particularly noticeable when the languages in question are based in different paradigms. For example, a functional language such as R is based on concepts like immutability which is very useful for data analysis but requires different memory usage and programming style. Again, I am not advocating that the original poster use R. I am suggesting that people refrain from attacking other people's tools of choice since that is really an equal opportunity passtime.

 

Tim

 

On Sun, Mar 7, 2021 at 11:14 PM Ronald van Elburg <RonaldAJ@xxxxxxxxxxxx> wrote:

Dear All,

Tim is right and not right about dismissing a language. Most popular languages have a target application for which they are well suited. For novices some languages are however more suited than others.

I made a switch from Matlab to Python in 2011 after also briefly considering octave.

What drove that switch was a combination of developments:

 - I was increasingly frustrated with not being able to offer my students the same tool as I had available. With standalone licenses for Matlab with required toolboxes coming at a price of 1200 euro's students where not able to afford themselves a license. Of course many students find their way around this, but we should teach them to use legal options.

- We were developing an IoT application which made the price tag mentioned above even more problematic. Matlab seems to have made policy changes here, but, alas for them, they had lost me already.

-  Python was very much mature and supported by a large community with also involvement from some larger companies. This is an important aspect in choosing open source software. Recent example of a failing choice: I have been using portaudio with the pyaudio Python wrapper but because the community was small these are now effectively discontinued projects and I am forced to find new solutions. That means I have to refactor and redo a lot of work. Alternatively, it is possible to take over maintenance of the module but with complex  software that is often not a feasible option.

- Python was designed with readability in mind which makes it superior to most other languages when teaching novice programmers.

- Python had and has many extensions in the form of community supported modules. In particular numpy makes it possible to work with numerical data in a way very similar to Matlab's handling of matrices and arrays.

- Python had good support for visualization with the Matplotlib module.

- Python supported parallel processing (in its infancy, but it did)

Most of these considerations still stand and because of the large community other aspects mostly improved:

- There is more choice for visualization now with modules like Seaborn and Bokeh and probably others as well.  

- There are the very nice Jupyter notebooks (as is encoded in the name these are available for Julia, Python and R). Which allow you to create documents which mix code, text and visualizations.

- Strong support for deep learning and machine learning in general.

- Python interfaces very well with OpenCV for image processing

Still Matlab also developed:

- they support compilation of Matlab code to some IoT devices. Something I haven't found for Python yet. Although there is now micropython which also serves similar platforms.

- they support visual programming with Simulink (this is not new, but I don't think Python caught up)

In functionality I think we mostly see convergence between general purpose programming languages. And with interoperability added to the mix functionality is often not the right guide to make a choice. R can for example be called from Python and I suppose the opposite is also true.

Python has also effectively replaced some special purpose scripting languages. The example I know is the NEURON simulator which used Hoc originally, but moved to Python as the main scripting language.  Also popular databases often have a Python interface. Again this is probably a side effect of the community size and I guess R also supports most databases. For Python this applies to most scientific software: many of them offer a Python interface.

I think several of the Ten Simple Rules articles from PLOS Computational Biology are also worth reading in this context:

Ten simple rules for biologists learning to program: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005871
Ten Simple Rules for Digital Data Storage: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005097
Ten simple rules for documenting scientific software: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006561
Ten simple rules to colorize biological data visualization: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1008259

I would be tempted to say Python is the language of choice to teach or to learn when starting to program for scientific purposes. But your personal context can give counter indications. So it is probably wise to ask around what other people are using in the same work environment, but keeping in mind that these choices might be driven more by tradition or personal history than a critical evaluation of the options available. And then, each time when you start a large project it is worth to reevaluate the language and software choices.

Kind regards,

Ronald van Elburg

 

 

 

On 3/6/2021 1:46 PM, Timothy Beechey wrote:

The different languages you mention are each based on different programming paradigms (e.g. object-oriented, functional, etc.). This is often a source of confusion and frustration when moving from one language to another. Dismissing a widely used language because it is different from what you are used to or expecting tends to offend people who use that language productively.

 

Tim

 

On Sat, Mar 6, 2021 at 12:48 AM Richard F. Lyon <dicklyon@xxxxxxx> wrote:

>   if you need proper statistics, R might be a better choice

 

I'm mostly a Matlab user for the last 30 years or so, but getting to be more comfortable with Python.  I had occasion to do a bit of R programming, and it was pretty horrible, with what seemed like a pretty irregular syntax and unpredictable set of idioms.  Don't go there.

 

Dick

 

 

On Thu, Mar 4, 2021 at 9:19 PM Krzysztof Basiński <k.basinski@xxxxxxxxxxxx> wrote:

Dear Kishorekumar,

 

I'm a Python aficionado but I had spent a lot of time with different languages before settling in on Python (Java, C, JS, Ruby, R...). I can wholeheartedly recommend it for (what I guess) is your use case and in general as a first programming language to learn. Why?

 

1. Python is super easy to learn in comparison to other programming languages. It has an easy syntax and you don’t have to worry about a lot of technical things such as memory management, strict typing, garbage collection etc.

 

2. There are wonderful free resources, as others mentioned. I can recommend A Byte of Python as a starting point https://python.swaroopch.com.

 

3. Python Standard Library offers great solutions for common problems (such as file handling, http, json interfaces etc)

 

4. Python docs is something that you can actually read and understand. Same thing with error messages. These can be cryptic in other languages (like R!:)

 

5. There is the Jupyter ecosystem for interactive programming in Python. I know, I know, it supports other languages as well but Python Jupyter Kernels are really great (in comparison to R kernels for example). Also, Google Colab provides a free, interactive Python environment without the need to setup anything.

 

6. Most ML is done in Python and TensorFlow and PyTorch are industry standards.

 

7. Librosa (https://librosa.org) and Surfboard (https://github.com/novoic/surfboard) are great packages for audio feature extraction if you want to do that.

 

8. Python is fun! Try `import this` to see what I mean.

 

 

That said, Python can be kind of slow in some cases (though you can overcome this easily if you know what you’re doing). If you really need the speed, Julia promises to be as efficient and as fast as C. To be honest though, in 3+ years of working in Python the whole “Python is slow” thing didn’t really bother me. I would say it’s faster than R, at least in my use cases.

 

Also, if you need proper statistics, R might be a better choice. Statsmodels is the standard package for statistics in Python and you can do a lot with it. Unfortunately it can be a bit challenging and the docs are not so great. My current favourite for statistics in Python is Pingouin (https://pingouin-stats.org), though it is missing some stuff (no mixed models yet).

 

Best of luck,

Chris

 

--

Krzysztof Basiński, PhD
Assistant Professor
Department of Psychology
Medical University of Gdańsk, Poland
http://mug.edu.pl | http://kbas.gumed.edu.pl



On 2 Mar 2021, at 09:50, kishorekumar Bharshetty <kumarbharshetty@xxxxxxxxx> wrote:

 

Dear all, 

I am Kishorekumar Bharshetty, Audiologist from India. I am currently working as an Clinical Audiologist at Amplifon India Pvt Ltd. 

 

I am curious to learn about Python software which is a language coding software, thinking that it will help me to set a base to learn more about Machine Learning technology. 

 

I wanted to know, whether learning Python software for an audiologist is a good idea? If yes, how can I be benefitted with this in future? 

 

Kindly, help me with this query. 

 

 

Thanks, and Regards

Kishorekumar Bharshetty

Audiologist

Amplifon India Pvt Ltd, India

+91-9663148361

 



--

Timothy Beechey, PhD

Postdoctoral Associate

Department of Speech-Language-Hearing Sciences

215C Shevlin Hall, 164 Pillsbury Dr SE, Minneapolis, MN 55455

University of Minnesota



--

Timothy Beechey, PhD

Postdoctoral Associate

Department of Speech-Language-Hearing Sciences

215C Shevlin Hall, 164 Pillsbury Dr SE, Minneapolis, MN 55455

University of Minnesota