Questions tagged [python]

For questions related to AI implementation in the Python language

Python was invented by the Dutch software engineer Guido van Rossum in 1990 during his work at the Centre for Mathematics and Computer Science (CWI) in Amsterdam, The Netherlands. He named the language after the British comedy series Monty Python's Flying Circus. The first public version was released in 1991. All releases since version 2.1.1 are GPL compatible through the PSF (Python Software Foundation).

The dedicated domain for the language is python.org.

The language is characterized by several important language features.

  • Highly interactive interpreter
  • Provides a wide variety of integrated types
  • Supports mixed arithmetic
  • Supports object oriented programming and dynamic type creation
  • Unique constructs such as comprehensions and generators
  • Uses indentation instead of end brackets for statement grouping
  • Accelerated around bottlenecks with calls to C/C++ libraries
  • Supported by a broad set of development tools
  • Extensible, through imports, of many common and unusual libraries
  • Well integrated with CPU and GPU based machine learning facilities
341 questions
68
votes
10 answers

Why is Python such a popular language in the AI field?

First of all, I'm a beginner studying AI and this is not an opinion-oriented question or one to compare programming languages. I'm not implying that Python is the best language. But the fact is that most of the famous AI frameworks have primary…
35
votes
8 answers

Is a switch from R to Python worth it?

I just finished a 1-year Data Science master's program where we were taught R. I found that Python is more popular and has a larger community in AI. What are the advantages that Python may have over R in terms of features applicable to the field of…
ItsMeMario
  • 503
  • 1
  • 4
  • 6
27
votes
4 answers

Why does C++ seem less widely used than Python in AI?

I just want to know why do machine learning engineers and AI programmers use languages like Python to perform AI tasks and not C++, even though C++ is technically a more powerful language than Python.
14
votes
3 answers

How do I compute the structural similarity between sentences?

I am working on a problem where I need to determine whether two sentences are similar or not. I implemented a solution using BM25 algorithm and wordnet synsets for determining syntactic & semantic similarity. The solution is working adequately,…
Shubham Tiwari
  • 243
  • 1
  • 2
  • 6
10
votes
3 answers

Can we get the inverse of the function that a neural network represents?

I was wondering if it's possible to get the inverse of a neural network. If we view a NN as a function, can we obtain its inverse? I tried to build a simple MNIST architecture, with the input of (784,) and output of (10,), train it to reach good…
Maverick Meerkat
  • 412
  • 3
  • 11
7
votes
3 answers

Is there an open-source implementation for graph convolution networks for weighted graphs?

Currently, I'm using a Python library, StellarGraph, to implement GCN. And I now have a situation where I have graphs with weighted edges. Unfortunately, StellarGraph doesn't support those graphs I'm looking for an open-source implementation for…
7
votes
1 answer

2 Player Games in OpenAI Retro

I have been using OpenAI Retro for awhile, and I wanted to experiment with two player games. By two player games, I mean co-op games like "Tennis-Atari2600" or even Pong, where 2 agents are present in one environment. There is a parameter for…
6
votes
1 answer

Does it make sense to apply softmax on top of relu?

While working through some example from Github I've found this network (it's for FashionMNIST but it doesn't really matter). Pytorch forward method (my query in upper case comments with regards to applying Softmax on top of Relu?): def…
Jed
  • 61
  • 2
5
votes
3 answers

Does the model learn from the average of all the data points in the mini-batch?

I used the example at - https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/5_DataManagement/tensorflow_dataset_api.py - to create my own classification model. I used different data but the basic outline of datasets was used.…
5
votes
1 answer

Over- and underestimations of the lowest and highest values in LSTM network

I'm training an LSTM network with multiple inputs and several LSTM layers in order to set up a time series gap filling procedure. The LSTM is trained bidirectionally with "tanh" activation on the outputs of the LSTM, and one Dense layer with…
5
votes
1 answer

How can I find a specific word in an audio file?

I'm trying to train and use a neural network to detect a specific word in an audio file. The input of the neural network is an audio of 2-3 seconds duration, and the neural network must determine whether the input audio (the voice of a person)…
5
votes
2 answers

Why isn't my decision tree classifier able to solve the XOR problem properly?

I was trying to solve an XOR problem, and the dataset seems like the one in the image. I plotted the tree and got this result: As I understand, the tree should have depth 2 and four leaves. The first comparison is annoying, because it is close to…
5
votes
1 answer

How do I combine models trained on different data to increase classification accuracy?

I have two trained models. One is using a LinearSVC algorithm and is trained on numerical data from medical examination from patients with diabetic retinopathy. The second one is a neural network trained on images of retina scans from patients with…
5
votes
2 answers

Why am I getting the incorrect value of lambda?

I am trying to solve for $\lambda$ using temporal-difference learning. More specifically, I am trying to figure out what $\lambda$ I need, such that $\text{TD}(\lambda)=\text{TD}(1)$, after one iteration. But I get the incorrect value of…
4
votes
0 answers

What are the ways to calculate the error rate of a deep Convolutional Neural Network, when the network produces different results using the same data?

I am new to the object recognition community. Here I am asking about the broadly accepted ways to calculate the error rate of a deep CNN when the network produces different results using the same data. 1. Problem introduction Recently I was trying…
1
2 3
22 23