Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
1
vote
1answer
13 views

Autoencoder: predictions missing for nodes in the bottleneck layer

I'm using tf.Keras to build a deep-fully connected autoencoder. My input dataset is a dataframe with shape (19947,), and the purpose of the autoencoder is to predict normalized gene expression values. ...
1
vote
1answer
22 views
+50

Mining repeated subsequences in a given sequence

Given an alphabet $I=\left\{i_1,i_2,\dots,i_n\right\}$ and a sequence $S=[e_1,e_2,\dots,e_m]$, where items $e_j \in I$, I am interested in finding every single pattern (subsequence of $S$) that ...
0
votes
0answers
8 views

How to make specific test data prediction with fitted GaussianNB Classifier in Python

I'm trying to make news classification. Here is the neural network: ...
0
votes
1answer
51 views

Keras DQN Model with Multiple Inputs and Multiple Outputs [closed]

I am trying to create a DQN agent where I have 2 inputs: the agent's position and a matrix of 0s and 1s. The output is composed of the agent's new chosen position, a matrix of 0s and 1s (different ...
0
votes
0answers
12 views

Python Create Keras Neural Network with Bag Of Words Model for News Classification

I want to train a classification neural network then predict some inputs. It's classic classification example as you know. I'm implementing this with python. I searched a lot about it and I always ...
1
vote
1answer
32 views

DQN layers when state space and action space are multi dimensional

I have built my own RL environment, where a state is composed of two elements: the agent's position and a matrix of 0s and 1s (1 if a user has requested a service from the agent, 0 otherwise); an ...
0
votes
0answers
20 views

Fine tune bert to get contexualized embedding

I need to use BERT contextual embedding instead of stochastic Answer network in this model. And for generating the responsed in the same model, I would like to use the generator. Could any one help to ...
1
vote
0answers
40 views

How to design my Neural Network for Game AI

For my school project, I have to develop an agent to play my game. The base I have is a 'GameManager' which call 2 AIs, each taking a random move to do. To make my AI perform, I decided to make a ...
1
vote
0answers
36 views

How am I supposed to code equation 4.57 from the book “Machine Learning: An Algorithmic Perspective”?

Consider the equation 4.57 (p. 108) from section 4.6 of the Book Machine Learning: An Algorithmic Perspective, where the derivative of the softmax function is explained $$\delta_o(\kappa) = (y_\kappa -...
0
votes
0answers
17 views

Relative Weighting of Loss Weights for Self-Play Reinforcement Learning

I am training some self play reinforcement learning agents to play 2 player board games like Connect 4, Othello, and The Game of the Amazons. For each game, there is a single neural network with 2 ...
1
vote
0answers
14 views

How can I predict an anomaly based on FFT of multiple signals?

I have 999 signals, each with separate day timestamp, each T=10s long, sampled with fs=25kHz. This gives N=250,000 samples in total. My task was to obtain the averaged magnitude spectrum for each ...
0
votes
0answers
9 views

sklearn.exceptions.NotFittedError: This LabelEncoder instance is not fitted yet [migrated]

I'm trying to run a voice recognition code from Github HERE that analyzes voice. There is an example in final_results_gender_test.ipynb that illustrates the steps ...
0
votes
0answers
36 views

Distinguishing between handwritten compound fraction and subtraction

I am working in a project named "Handwritten Math Evaluation". So what basically happens in this is that there are 11 classes of (0 - 9) and (+, -) each containing 50 clean handwritten ...
0
votes
1answer
55 views

Q-learning agent stuck at taking same actions

I have created my own RL environment where I have a 2-dimensional matrix as a state space, the rows represent the users that are asking for a service, and 3 columns representing 3 types of users; so ...
0
votes
0answers
16 views

Extracting specific information from an Invoice images

Tried to extract only specific information from the images but Couldn't, We have to automate this process using this as the format of the Images keeps on changing. LinkSample data What I have Tried: <...
0
votes
0answers
19 views

Q-learning in Python (3D grid navigation): Values do not change between episodes

I am trying to implement a Q-learning algorithm in Python for a 3D gird world as part of an assignment, wherein the environment.py file defines the actions to be taken. So far I have tried several ...
1
vote
1answer
57 views

How to create a Q-Learning agent when we have a matrix as an action space?

I have a 2-dimentional matrix as an action space, the rows being a resource to be allocated, and the columns are the users that we will allocate the resources to. (I built my own RL environment) The ...
4
votes
0answers
54 views

Difficulty in agent's learning with increasing dimensions of continuous actions

I have been working on some RL project, where the policy is controlling the robot using its joint angles.Throughout the project I have noticed some phenomenon, which caught my attention. I have ...
0
votes
0answers
11 views

Cocatenate feature extractor layers with different channels

I have a network architecture for feature extraction and I wanted to concatenate layers of the same dimensions but with different feature channels. ...
1
vote
0answers
35 views

Determining if an entity in free text is 'present' or 'absent'; what is this called in NLP?

I'm processing a semi-structured scientific document and trying to extract some specific concepts. I've actually made quite good progress without machine-learning so far, but I got to a block of true ...
0
votes
0answers
26 views

How to make a CNN/RNN on a non-binary dataset?

I am using TensorFlow + Keras to make a CNN/RNN. I'm quite new to AI, I've only made a few relatively basic networks for image regression/classification. The end goal of my project is to determine the ...
0
votes
1answer
43 views

How to use validation dataset in my logistic regression model?

I am new to machine learning and recently I joined a course where I was given a logistic regression assignment in which I had to split 20% of the training dataset for the validation dataset and then ...
0
votes
0answers
13 views

How to design the step() method in a custom-built environment when the action space is a 2-dimentional matrix?

I have an action space that is a matrix. I am struggling with finding how to choose how to take the action when the number of possible actions is huge.
0
votes
1answer
31 views

How to let the agent choose how to populate a state space matrix in RL (using python)

I have an agent (drone) that has to allocate subchannels for different types of User Equipment. I have represented the subchannel allocation with a 2-dimentional binary matrix, that is initialized to ...
0
votes
1answer
35 views

Can I train a neutral network to detect a fingerprint [closed]

I have been using tensorflow For neutral network
0
votes
0answers
29 views

How to implement or avoid masking for transformer?

When it comes to using Transformers for image captioning is there any reason to use masking? I currently have a resnet101 encoder and am trying to use the features as the input for a transformer model ...
1
vote
1answer
39 views

Pytorch Deep q network not learning and step not stepping towards target

I am trying to create a simple deep q network for rl with conv2d layers. I can’t figure out what I am doing wrong, and the only thing I can see that doesn’t seem right is when I get the model ...
1
vote
1answer
32 views

What framework for a project with a custom environment?

I'm planning an RL project and I have to decide which RL framework do I use if any at all. The project has a highly custom environment, and testing different algorithms will be required to obtain ...
0
votes
0answers
26 views

Are there any python implementations of GGP games or how to use game logic written in GDL in python?

I'm writing a General Game Playing (GGP) AI in python. I'd like to test it on some GGP games. So are there any python implementations of GGP games? I found in http://games.ggp.org/base games written ...
1
vote
2answers
44 views

Extract features with CNN and pass as sequence to RNN

I read an article about captioning videos https://blog.coast.ai/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5 and I want to use solution number 4 (extract features ...
0
votes
1answer
26 views

A function in python that identifies the language a document is written in [duplicate]

How can I write a function in python that identifies the language a document is written in. For example I pass "Hello" as the parameter of the function and the function should return English
0
votes
2answers
45 views

How could I convolve a 4D image and a 4D filter with stride?

I want to create a CNN in Python, specifically, only with NumPy, if possible. For optimizing the time of convolution (actually correlation) in the network, I wanna try to use FFT-based convolution. ...
0
votes
0answers
17 views

Strategy to input and get large images in VGG neural networks

I'm using a transfert-style based deep learning approach that use VGG (neural network). The latter works well with images of small size (512x512pixels), however it provides distorted results when ...
0
votes
0answers
13 views

Is there a model suitable to predict one correct value based on a 2D input series?

I am using an encoder-decoder architecture, with 2 layers each in the encoder and decoder and 128 neurons in each hidden layer. The inputs are in a 2D form: one column has the days and the other ...
0
votes
1answer
37 views

Should image augmentation be applied before or after image resizing?

For the purposes of training a Convolutional Neural Network Classifier, should image augmentation be done before or after resizing the training images? To reduce file size and speed up training time, ...
1
vote
2answers
92 views

What are some programming-oriented resources for reinforcement learning?

I have been reading : Reinforcement Learning: An Introduction by Sutton and Barto. I admit it's a good read for learning RL whereas it's more theoretical with detailed algorithms. Now, I want ...
0
votes
1answer
30 views

Wind speed forecasting using ARIMA model in Python3

Recently, I started working on time-series models and would mention that I am very new to python and ML as a whole. I tried to implement a time-series model on wind speed data. Being a newbie, I ...
0
votes
0answers
18 views

Should I move on from R and use Python for AI? [duplicate]

I have been using RStudio for a few years now, for various machine learning and deep learning techniques. For example, I want to build a trading bot that takes into account live news, which is tougher ...
1
vote
0answers
22 views

What are the best techniques to perform text simplification?

I'm evaluating the state of the art techniques to translate legal text to simple text, what are the best approaches for a non-English language (Portuguese)?
0
votes
0answers
23 views

Faster RCNN-RPN Network Training

I am trying to understand RPN network in Faster RCNN. I understand the concept of RPN network, Pass the input images to the pre trained CNN, and get the output as feature maps Make fixed size of the ...
1
vote
1answer
45 views

Implementing Gradient Descent Algorithm in Python, bit confused regarding equations

I'm following the guide as outlined at this link: http://neuralnetworksanddeeplearning.com/chap2.html For the purposes of this question, I've written a basic network 2 hidden layers, one with 2 ...
0
votes
0answers
12 views

Python code in LSTM to look at selective history

My dataset has 3 columns - a,b,c. Using b (and its history), I wish to predict c. Using list function and converting to array, I can tell python to look at last 20 b's for any b, as input to predict c....
2
votes
1answer
50 views

What is the Preferred Mathematical Representation for a Forward Pass in a Neural Network?

I know this may be a question of semantics but I always see different articles explain forward pass slightly different. e.g. Sometimes they represent a forward pass to a hidden layer in a standard ...
1
vote
1answer
101 views

DDPG doesn't converge for MountainCarContinuous-v0 gym environment

I am trying to implement Deep Deterministic policy gradient algorithm by referring to the paper Continuous Control using Deep Reinforcement Learning on the MountainCarContinuous-v0 gym environment. I ...
0
votes
1answer
23 views

Get Neural Network to predict a tag/class on a certain word using the surrounding words as context [PyTorch]?

I am somewhat a novice at the topic of Neural Netoworks and PyTorch. I am trying to create a model that takes a word (that I have modified very slightly) and a 'window' of context around it and ...
0
votes
0answers
14 views

Automated Scoring (non-english language) Using BERT

i'm a student and i'm new to NLP. I want to build an Automated Scoring system which is in Indonesian Language using BERT. The system is expected to be able to measure the similarity of an answer(e.g: ...
0
votes
2answers
50 views

Is there a neural network that accepts both the current input and previous output?

I am quite new to neural networks. I am trying to implement in Python a neural network having only one hidden layer with $N$ neurons and $1$ output layer. The point is that I am analyzing time series ...
1
vote
1answer
53 views

How to deal with very, very small time-series?

I have an ensemble of 231 time series, the largest among them being 14 lines long. The task at hand is to try to predict these time-series. But I'm finding this difficult due to the very small size of ...
2
votes
0answers
58 views

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

How to interpret the final neural network generated in NEAT-Python?

I made a simple obstacle collision game in Python and made a neural network which will play the game using the NEAT (NeuroEvolution of Augmenting Topologies) and I got a final network as follows -> ...

1
2 3 4 5
7