Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
48
votes
8answers
26k views

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 ...
30
votes
8answers
13k views

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. Is it worth for someone in my position to switch ...
13
votes
5answers
20k views

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

I just want to know why do Machine Learning engineers and AI programmers use languages like python to perform AI task and not C++ even though C++ is technically a more powerful language than python.
12
votes
3answers
16k views

Sentence similarity in Python

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 & ...
9
votes
2answers
833 views

Is neural networks training done one-by-one? [duplicate]

I'm trying to learn neural networks by watching this series of videos and implementing a simple neural network in Python. Here's one of the things I'm wondering about: I'm training the neural network ...
8
votes
1answer
2k views

Meaning of evaluation metrics in Tensorflow

I am pretty much a beginner in Tensorflow and simply follow a tutorial. There is no problem with my code, but I have a question regarding the output ...
7
votes
3answers
2k views

Can neuro-evolution of augmenting topologies (NEAT) neural networks be built in TensorFlow?

I am making a machine learning program for time series data analysis and using NEAT could help the work. I started to learn TensorFlow not long ago but it seems that the computational graphs in ...
6
votes
1answer
395 views

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 ...
6
votes
6answers
395 views

AI beginners books for coding

Does anyone know a good book to buy for beginners to coding for artificial intelligence? I have done some coding in Java and a little with Python, but I would be willing to learn a new language too.
5
votes
2answers
218 views

Why am I getting the incorrect value of lambda?

I am trying to solve for lambda using Temporal Difference Learning I am trying to figure out what lambda I need, to make TD(λ)=TD(1) but I get the incorrect value of lambda. Here is how I did: <...
5
votes
1answer
77 views

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 ...
5
votes
4answers
279 views

What are examples of reference books to start with AI?

Can anyone suggest reference books to start with AI? Preferably, I am looking for books that provide source code in Java or Python.
5
votes
3answers
1k views

TensorFlow batch learning

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 ...
4
votes
4answers
2k views

Learning Artificial Intelligence with Python vs. Java

I am a University student taking an Artificial Intelligence class this semester. Our Professor's programming language of choice is Java, but it seems that perhaps with some nudging, he can change it ...
4
votes
2answers
175 views

Use Machine Learning/Artificial Intelligence to predict next number (n+1) in a given sequence of random increasing integers

The AI must predict the next number in a given sequence of incremental integers (with no obvious pattern) using Python but so far I don't get the intended result! I tried changing the learning rate ...
4
votes
2answers
109 views

Is it possible to teach an AI to edit video content?

Every week I will get a lot of videos from a game that I play, outside the game where you throw wooden skittle bats at skittles, and then I will cut videos, so that, at the end. there is video only ...
4
votes
1answer
38 views

How Machine Learning Studies Correlation?

This is my problem: I have 10 variables that I intend to evaluate two by two (in pairs). I want to know which variables have the strongest relationships with each other. And I'm only interested in ...
4
votes
1answer
109 views

Algorithm For Making Balanced Weapons In A Game?

I am trying to make balanced weapon pairs. So there are five stats per weapon, and I am simulating a number of combats (1000) with different stats randomized, and counting the win, lose, and draw of ...
4
votes
2answers
59 views

How to know whether the object is moving after it is being detected?

If my algorithm detects the type of object, how should I know if that object is moving or not? Suppose a person carrying an umbrella. How to know that the umbrella is moving? I am working on a ...
4
votes
1answer
355 views

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

I'm training a LSTM network with multiple inputs and several LSTM layers in order to setup a time series gap filling procedure. The LSTM is trained bidirectionally with "tanh" activation on the ...
4
votes
2answers
960 views

Different action spaces for different states of the environment

I'm new to this AI/Machine Learning and was playing around with OpenAI Gym a bit. When looking through the environments I came across "Blackjack-v0" which is a basic implementation of the game where ...
4
votes
1answer
219 views

How to implement a neural network for Flappy Bird in Python?

I am new in the field of AI. I am working to create the flappy bird using Genetic Algorithm. After reading and seeing some examples, I saw that most implementations use a Neural Network + Genetic ...
4
votes
1answer
97 views

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....
4
votes
0answers
101 views

Supervised K-means clustering doesn't appear to work

I have a data set containing actions taken by customers (e.g., view a product, add a product to cart, purchase product), the product bought (if any) and times of said actions. I am attempting to use K-...
3
votes
2answers
274 views

Can agent based machine learning achieved with any ML algorithms other than neural network?

I would like to know other tha neural network, is there any ML technique for agent based ML. If so how to train an agent with some predefined rules? Can we use python programming for representing ...
3
votes
2answers
411 views

Creating a self learning Mario Kart game AI?

I will be undertaking a project over the next year to create a self learning AI to play a racing game, currently the game will be Mario Kart 64. I have a few questions which will hopefully help me ...
3
votes
1answer
34 views

Why is batch gradient descent performing worse than stochastic and minibatch gradient descent?

I have implemented a neural network from scratch (only using numpy) and I am having problems understanding why the results are so different between stochastic/minibatch gradient descent and batch ...
3
votes
1answer
103 views

Which approach can I use to generate text based on multiple inputs?

I have a little experience in building various models, but I've never created anything like this, so just wondering if I can be pointed in the right direction. I want to create (in python) a model ...
3
votes
1answer
66 views

Which models accept numerical parameters and produce a numerical output?

I need a model that will take in a few numerical parameters, and give back a numerical answer (Context: predicting a slope based on environmental factors without having to actually take measurements ...
3
votes
1answer
89 views

Python API for publicly available datasets

In my daily machine learning / deep learning workflow, I often want to interact with a dataset in my code. Specifically, I would like to be able to load some module / package which can make sure that ...
3
votes
1answer
97 views

K-means using only certain dataframe columns [closed]

I'm using the k-means algorithm from the scikit-learn library, and the values I want to cluster are in a pandas dataframe with 3 columns: ID ...
3
votes
1answer
1k views

Detecting license plate using tensorflow

I'm currently working on license plate recognition. My system consist of 2 stage: (1) License Plate region extraction & (2) License Plate region recognition. I'm doing (1) with Raspberry pi 3 ...
3
votes
1answer
368 views

How should I approach the game “Achtung, Die Kurve” (“Curve Fever”) using AI?

One of my friends built a version of "Achtung, Die Kurve!", or "Curve Fever" in Python. I was starting to study ML and decided to tackle the game from a learning perspective - write a bot that would ...
3
votes
1answer
65 views

DQN in stochastic environment

I'm trying to apply a DQN to a stochastic environment but i'm having trouble getting it to converge. I found some similar questions asked here, but no solutions yet. I can fairly easy get the DQN to ...
3
votes
1answer
269 views

Convolutional Layers on a hexagonal grid in Keras

Keras' convolutional and deconvolutional layers are designed for square grids. Is there was a way to adapt them for use in hexagonal grids? For example, if we were using axial coordinates, the input ...
3
votes
1answer
328 views

How to parse conjunctions in Natural Language Processing in Python

Is there an accepted way in NLP to parse conjunctions (and/or) in a sentence? By following the example below; how would I parse, ...
3
votes
1answer
786 views

Optimizing Max Pooling Algorithm

The below code is a max pooling algorithm being used in a CNN. The issue I've been facing is that it is offaly slow given a high number of feature maps. The reason for its slowness is quite obvious-- ...
3
votes
1answer
85 views

Disentangled VAE doesn't reconstruct accurate grids

I am trying to implement the disentangled VAE model according to this link. I want to understand the architecture of this model in order to customize it later. As infrastructure, I have a linux kernel ...
3
votes
1answer
89 views

Machine Learning - Is selected models combination good?

I've selected more than 10 discriminative (Classification) models, each wrapped with a BaggingClassifier object, optimized with a GridSearchCV, and all of them placed within a VotingClassifier object. ...
3
votes
2answers
1k views

How to perform gradient checking in a neural network with batch normalization?

I have implemented a neural network (NN) using python and numpy only for learning purposes. I have already coded learning rate, momentum, and L1/L2 regularization and checked the implementation with ...
3
votes
2answers
25 views

Using a neural network to identify a stable region within a set of data?

I am working on a problem in which I am attempting to find a stable region in a spiral galaxy. The PI I'm working with asked me to use machine learning as a tool to solve the problem. I have created ...
3
votes
0answers
79 views

Deep Q-Network (DQN) to learn the game 2048

I am trying to build a Deep Q-Network (DQN) agent that can learn to play the game 2048. I am orientating myself on other programs and articles that are based on the game snake and it worked well (...
3
votes
0answers
39 views

Deep Q-Learning agent poor performing actions. Need help optimizing

I'm trying to make deep q-learning agent from https://keon.io/deep-q-learning My environment looks like this: https://imgur.com/a/OnbiCtV As you can see my agent is a circle and there is one gray ...
3
votes
1answer
698 views

How do you handle multiple categorical values in a single column for wide_deep model in tensorflow?

To start, let me just say that I am very new to tensorflow and Machine Learning in general. But, as part of my learning project I am trying to adapt the tensorflow wide and deep model to generate ...
3
votes
0answers
226 views

How do I make and use a dataset for StackGAN

So I am currently trying to create a program that when provided a list of descriptive words or a passage of text, would create a piece of abstract art based on the feelings evoked by those words. I ...
3
votes
1answer
2k views

Training AI to play NES/SNES games on NN python

I am currently getting into Deep Learning and would like to set up an environment for training an Artificial Neural Network or NEAT to play simple video games on NES (Mario etc.) and SNES ( Donkey ...
2
votes
2answers
149 views

Can anyone suggest a small application based on an Artificial Intelligence which can be done by a beginner in AI?

Any small application based on real world application of AI which can be done easily at home for a beginner who is trying to make use of his basic programming skills into AI at the beginning level.
2
votes
1answer
1k views

Developing a Blackjack AI

I'm currently developing a blackjack program that I posted on code review SE about a month ago and, after making a few changes based on the users suggestions and my friends' suggestions, I want to ...
2
votes
1answer
146 views

Text classification task chatbot

I'm building a customer assistant chatbot in Python, so a text classification task, and I have available more or less 7 hundred sentences of average length 15 words (unbalanced class). What do you ...
2
votes
3answers
87 views

predict customer visit

Suppose we have a data set consists of columns TransactionId, CardNo, TransactionDate then how can we calculate the customer purchase interval (means if customer A purchased on Jan 1st and after ...