text:
How difficult is this sound classification?
I want a microphone to pick up sounds around me (let's say beyond a 3 foot radius), but ignore sounds made at my desk, such as the rustling of paper, clicking a mouse and typing, my hands brushing up on the table, putting a pen down, etc.
How hard would it be for AI to be able to distinguish these sounds from surrounding sounds, such as someone knocking on my door or a random loud sound from further away? How would you implement this? Is it possible that a pre-trained model could accomplish this, and work reliably for most people at their desk? I don't have any experience in AI.

AFAIK this is quite the task to be starting off with. I don't think you'll be able to easily do this with no experience in AI.

But do you think it's possible with current AI? Would it be deep learning? Or would the "desk sounds" training data be too random and indistinguishable from other sounds?

This is beyond my knowledge, and I imagine it is quite difficult. But, the problem you are describing is called audio segmentation. That should give you some grounds to do your own research on. Here is an article describing some techniques for such: https://towardsdatascience.com/audio-ai-isolating-vocals-from-stereo-music-using-convolutional-neural-networks-210532383785

If you have multiple microphones sound can be localized using signal processing techniques. In practice this might be better than an AI approach.

It would be less effort to simply use 4 cardioid microphones, see here: https://www.syncoaudio.com/blogs/news/guideline-to-buy-cardioid-microphone

I think if you got the dataset, then a standard 1d convolutional neural network would work to some extent. It's not that there is some property of nearby sounds that it would pick up on. It would just memorize all the sounds that tend to come from your desk. I think the coding part would be pretty standard stuff. But collecting the data will be hard. You have to get a really big labeled dataset of sounds coming from your desk and sounds coming beyond a 3 foot radius. This dataset has to be realistic and representative of the real world. Getting that dataset would be pretty tricky but it is doable if you put multiple microphones in your house in order to triangulate the exact positions of all sounds. It would be like GPS but using sounds waves instead of light waves.

You would be best suited by running your data through a transformation, such as a Fourier Transform (FFT), before training your model. Taking the FFT and training the model based on the frequency representation of your data would provide for a more robust model that would work with varying levels of signal to noise ratio (SNR) as well as other sounds in the environment.


text:
Which CNN hyper-parameters are most sensitive to centered versus off centered data?
Which hyper-parameters of a convolutional neural network are likely to be the most sensitive to depending on whether the training (and test and inference) data involves only accurately centered images versus off-centered images.
More convolutional layers, wider convolution kernels, more dense layers, wider dense layers, more or less pooling, or ???
e.g. If I can preprocess the data to include only accurately centered images, which hyper-parameters should I experiment with changing to create a smaller CNN model (for a power and memory constrained inference engine)?  Or conversely, if I have a minimized model trained on centered data, which hyper-parameters would I most likely need to increase to get similar loss and accuracy on uncentered (shifted in XY) data?

Hi and welcome to this community! Maybe you should provide a rigorous definition of "centered images" and "off-centered images" for your question to be answered unambiguously.

Translation augmentation.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How do AI that play games of incomplete information decide their opening strategy?
This question was inspired by watching AlphaStar play Starcraft 2, but I'm also interested in the concept in general.
How does the AI decide what build order to start with?  In Starcraft, and many other games, the player must decide what strategy or class of strategies to follow as soon as the game begins.  To use a Starcraft-specific example, one must decide to 6-pool Zerg Rush before any scouting information has been gathered.  Delaying the rush to wait for info means the opponent will be stronger when the rush arrives; the opponent may even discover the rush and prepare a dedicated counter.
This is not limited to deciding between a risky early all-or-nothing attack.  Some long-term strategies also preclude others.  Terran players must decide early on how heavily they will invest in mech units.  They can focus on biological units like marines, or vehicular units like siege tanks and hellions.  Going equally into both, however, often means a weaker army overall, because you must spend resources on the overhead costs of both tech trees.  You must upgrade your vehicle weapons as well as your infantry weapons for instance, meaning less resources can be spent on more units.  Suffice to say, Terran players usually must decide very early on what they will focus on.
How can AI make these kinds of choices given incomplete and often uncertain information?

General approach is "information sets" - factorizing state space by observable: https://en.wikipedia.org/wiki/Information_set_(game_theory)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Why is a softmax used rather than dividing each activation by the sum?
Just wondering why a softmax is typically used in practice on outputs of most neural nets rather than just summing the activations and dividing each activation by the sum. I know it's roughly the same thing but what is the mathematical reasoning behind a softmax over just a normal summation? Is it better in some way?

See the following Stack Overflow question Why use softmax as opposed to standard normalization?.

See also: Stats.SE

There are probably multiple different explanations and reasonings, but I can offer you one. If your output vector contains negative values, to get something that's related to probabilities (all components positive, summing to $1$) you cannot do what you suggested because you can possibly get a negative probability which doesn't make sense. Good property of exponential function used in softmax, in this case, is that it cannot give negative values, so regradless of your output vector, you will never get negative probability.
You could suggest adding some positive offset vector $\mathbf d$ to your output vector to get rid of negative values but there are couple of problems. First, you cannot know in advance your range of negative output values so that you can know what offset vector to use to cover all possible cases. Second, with such strategy in some cases you could get unrealistic results. For example let's assume output vector is $[-0.1, 0.2, 0.3]^T$ and offset vector is $[0.1, 0.1, 0.1]^T$. If you add those 2 you get $[0, 0.3, 0.4]^T$. Probability of first class would be $0$ since the numerator is $0$. That is very overconfident result and we probably wouldn't want to get the result of $0$ for this class. The result would change depending on the offset vector. Let's say that offset vector now is $[0.3, 0.3, 0.3]^T$. Addition of offset vector and output vector gives $[0.2, 0.5, 0.6]$. In this case probability of first class is now $0.2/(0.2 + 0.5 + 0.6) = 0.15$. We see that changing the offset vector changes the values of probabilities and as components of offset vector $\rightarrow \infty$ probabilities for all classes $\rightarrow 0.33$. We would likely want to get the same result regardless of the scale of the values of the vector, we only care about its relative relationships. Another good property of softmax is that it is shift invariant
\begin{align}
p_i &= \frac{e^{x_i + d}}{\sum_{j=1}^n e^{x_j + d}}\\
&= \frac{e^d \cdot e^{x_i}  }{ e^d \cdot \sum_{j=1}^n e^{x_j} }\\
&= \frac{e^{x_i}}{\sum_{j=1}^n e^{x_j}}
\end{align}
so we see that the probability of $i$-th component is independent of offset vector. Apparently softmax doesn't care about the scale of values, it manages to capture the relative relationships of the components.


text:
Object Detection Algorithm that detects four corners of arbitrary quadrilateral, not just perpendicular rectangular
Is there some established Object Detection algorithm that is able to detect the four corners of an arbitrary quadrilateral  (x0,y0,x1,y1,x2,y2,x3,y3) as opposed to the more typical perpendicular rectangular (x,y,w,h) ?

You can use OpenCV's cv2.minAreaRect() to detect oriented/rotated rectangular bounding boxes. Below's an example result from OpenCV-Python-tutorials:

Alternatively, you could train a supervised object detection model to output 8 co-ordinate values (x0,y0,x1,y1,x2,y2,x3,y3) of the quadrilateral by training with a labeled oriented-bounding-box dataset. You could also create the bounding box labels yourself for the same by using tools such as VGG Annotator Tool among others.


text:
Is it acceptable to use various training sets for the individual models when using a majority vote classifier?
So I am trying to use a majority vote classifier combining different models  and I was wondering if it is acceptable to use different training sets for the individual models (including different features) if these sets all come from one larger dataset?
Thanks


text:
Why machine learning instead of simple sorting and grouping?
I have a hard time formulating this question(I'm not knowledgeable enough I think), so I'll give an example first and then the question:
You have a table of data, let's say the occupancy of a building during the course of the day; each row has columns like "people_inside_currently", "apartment_id", "hour_of_day", "month", "year", "name_of_day"(monday-sunday), "amount_of_kids", "average_income" etc.
You might preprocess two columns into a column "percent_occupied_during_whole_day" or something like that, and you want to group the data points in accordance with this as the main focus.
What I'm wondering is: why use machine learning(particularly unsupervised clustering) for this? Why not just put it into an SQL database table(for example), calculate two columns into that new one, sort by descending order, and then split it into "top 25%, next 25%, next 25%, last 25%" and output this as "categories of data"? This is simpler, isn't it? I don't see the value of, for instance, making a Principle Component Analysis on it, reducing columns to some "unifying columns" which you don't know what to call anymore, and looking at the output of that, when you can get so much clearer results by just simply sorting and dividing the rows like this? I don't see the use of unsupervised clustering, I've googled a bunch of terms, but only found tutorials and definitions, applications(which seemed unnecessarily complex for such simple work), but no explanation of this.

Hi and welcome to this community! What do you mean by "calculate two columns into that new one" and "sort by descending order"? Anyway, machine learning algorithms usually find approximative solutions, by searching for patterns in the data, when an exact solution may be infeasible.

Two columns to one = using PCA to reduce the dimensionality of the data so that it can be presented in a 2D graph. Sort by descending order = when you have the new column made by PCA, you can sort these with highest-to-lowest. Then you see which ones are "occupied most of the time" and which ones are less, and you can just divide that list into several groups or clusters(I guess) to see which ones are of what category/cluster instead of using clustering algorithms.


text:
Rarely predict minority class imbalanced datasets
I have a dataset in which class A has 99.8%, class B 0.1% and class C 0.1%. If I train my model on this dataset, it predicts always class A. If I do oversampling, it predicts the classes evenly. I want my model to predict class A around 98% of the time, class B 1% and class C 1%. How can I do that?

What do you mean? If you do oversampling, the results of inference will still be correct, with whatever percentage A is and whatever percentage B is and C.

Hi and welcome to this community! You say "If I train my model on this dataset, it predicts always class A", but are you sure it always predicts A? Have you tried to give an input similar to the ones in class B or C and see if it predicts respectively B or C?

@nbro In my test set which has around 80k samples, it always predicts class A.

@JohnnyP. But do you have the labels for your 80k test samples?

@nbro Yes, I have them.

@JohnnyP. If possible try to balance your classes and train again. If class distributions are that extreme and similarity of classes are high, then you have no other choice but balance them first IMO


text:
Why do we average gradients and not loss in distributed training?
I'm running some distributed trainings in Tensorflow with Horovod. It runs training separately on multiple workers, each of which uses the same weights and does forward pass on unique data. Computed gradients are averaged within the communicator (worker group) before applying them in weight updates. I'm wondering - why not average the loss function across the workers? What's the difference (and the potential benefits) of averaging gradients?

It may be because, if you average the losses, you may introduce more numerical errors, which will be propagated to the computation of the gradient, which involves more operations than the computation of the average of the gradients.

Following on from the other answer, consider that averaging defeats the purpose if the loss is very volatile. e.g. if one has a low loss reading on one epoch and a high loss reading on another, the average will not capture the volatility in loss readings.

The whole idea behind those distributed optimization methods is that data should be local in every node/worker. Thus, if you only send the loss value to the central node, this node can't compute the gradients of this loss, and thus can't do any training. However, if you don't want to send gradients, a family of distributed optimization algorithms called consensus-based optimization can be used to only send the local weight of the model to neighbouring nodes, and those nodes use their local gradient and the models from their neighbours to update their local models.


text:
Speaker Identification / Recognition for less size audio files
I am working on speaker identification problem using GMM (Gaussian Mixture Model). I have to just identify one user present in the given audio, so for second class noise or silent audio may use or not just like in image classification for an object we create a non-object class.
I have used a silent class is always showing the user is present ( which is not).
If any other model can give better accuracy fulfil the condition that only 30 sec of audio of a particular user is available and given test audio may has long size.

Why did you choose GMMs? Any intuitions ? Why not Neural Nets?

The speaker files will be maximum 30seconds and 3-5 files only (for training). Since GMM is a statistical model as a statistical model works better with small data compare to the neural network.


text:
How to back propagate for implementation of Sequence-to-Sequence with Multi Decoders
I am proposing a modified version of Sequence-to-Sequence model with dual decoders. The problem that I am trying to solve is Neural Machine Translation into two languages at once. This is the simplified illustration for the model.
                            /--> Decoder 1 -> Language Output 1
Language Input -> Encoder -|
                            \--> Decoder 2 -> Language Output 2

What I understand about back propagation is that we are adjusting the weights of the network to enhance the signal of the targeted output. However, it is not clear to me on how to back propagate in this network because I am not able to find similar implementations online yet. I am thinking of doing the back propagation twice after each training batch, like this:
$$ Decoder\ 1 \rightarrow Encoder $$
$$ Decoder\ 2 \rightarrow Encoder $$
But I am not sure whether the effect of back propagation from Decoder 2 will affect the accuracy of prediction by Decoder 1. Is this true?
In addition, is this structure feasible? If so, how do I properly back propagate in the network?


text:
Is there a way to parallelize GloVe cooccur function?
I would like to create a GloVe word embedding on a very large corpus (trillions of words). However, creating the co-occurence matrix with the GloVe cooccur script is projected to take weeks. Is there any way to parallelize the process of creating a co-occurence matrix, either using GloVe or another resource that is out there?


text:
Extract product information from email receipt HTML
I am trying to extract product information from email receipts HTML.  Most services I have found focus on OCR from paper receipts or PDFs.  I would imagine that extraction of product information would be easier from structured HTML.  What type of AI approach would be used to support this?

This depends entirely on the kind of information you would like to extract, and on whether this desired information is available in a form that is easy to process automatically. If you do not show actual examples of input and desired output, your question cannot be answered. A deep learning approach might not be needed at all, or it might be very useful.

You need to at least provide us with a sample of these emails that contain the products and clarify what you really want to extract.

It depends on the data. If it is structured like form data, then you might not need AI at all — simple regular expression patterns might be fine. This would apply for example to address data. If you have the word street followed by a colon, followed by some text, it seems fairly obvious that this is the name of a street, and possibly also a house number.
If, however, you have free text, eg the answer to "describe any medical conditions you have", or "which companies have you worked at before?", then you might need to look at named entity extraction (NER) to identify names of medical conditions or companies.
So, some Natural Language Processing (NLP) and information extraction might be required apart from simple pattern matching.


text:
Autoencoder produces repeated artifacts after convergence
As experiment, I have tried using an autoencoder to encode height data from the alps, however the decoded image is very pixellated after training for several hours as show in the image below. This repeating patter is larger than the final kernel size, so I would think it would possible to remove these repeating patterns from the image to some extent.
The image is (1, 512, 512) and is sampled down to (16, 32, 32). This is done with pytorch. Here is the relevant sample of the code in which the exact layers are shown.
        self.encoder = nn.Sequential(
                # Input is (N, 1, 512, 512)
                nn.Conv2d(1, 16, 3, padding=1), # Shape (N, 16, 512, 512)
                nn.Tanh(),
                nn.MaxPool2d(2, stride=2), # Shape (N, 16, 256, 256)
                nn.Conv2d(16, 32, 3, padding=1), # Shape (N, 32, 256, 256)
                nn.Tanh(),
                nn.MaxPool2d(2, stride=2), # Shape (N, 32, 128, 128)
                nn.Conv2d(32, 32, 3, padding=1), # Shape (N, 32, 128, 128)
                nn.Tanh(),
                nn.MaxPool2d(2, stride=2), # Shape (N, 32, 64, 64)
                nn.Conv2d(32, 16, 3, padding=1), # Shape (N, 16, 64, 64)
                nn.Tanh(),
                nn.MaxPool2d(2, stride=2) # Shape (N, 16, 32, 32)
            )
        self.decoder = nn.Sequential(
                # Transpose convolution operator
                nn.ConvTranspose2d(16, 32, 4, stride=2, padding=1), # Shape (N, 32, 64, 64)
                nn.Tanh(),
                nn.ConvTranspose2d(32, 32, 4, stride=2, padding=1), # Shape (N, 32, 128, 128)
                nn.Tanh(),
                nn.ConvTranspose2d(32, 16, 4, stride=2, padding=1), # Shape (N, 32, 256 256)
                nn.Tanh(),
                nn.ConvTranspose2d(16, 1, 4, stride=2, padding=1), # Shape (N, 32, 512, 512)
                nn.ReLU()
            )

Relevant image: left side original, right side result from autoencoder
So could these pixellated effects in the above image be resolved?

An autoencoder will always lose some features of the original image. Perhaps try increasing the size the original image is down sampled to before reconstruction

I have tried it now. Still, the same result. I also tried not downsampling at all i.e. sending the image to a 16x128x128 and then transforming it back.

Perhaps you are getting checkerboard artifacts Explained here, solutions involve changing the kernel and stride size to prevent them from being not divisible. Besides that, a solution could be to apply Gaussian smoothing to minimize the artifacts.
For example, using Gaussian smoothing in OpenCV with your image results in
import cv2
img = cv2.imread('s.png') # I took a screen shot to see how it would look
blur = cv2.blur(img,(8,8))
plt.imshow(blur)

The artifact is gone using a kernel of size (8,8). I hope this can help


text:
How to formalize learning in terms of information theory?
Consider the following game on a MNIST dataset:

There are 60000 images.
You can pick any 1000 images and train your Neural Network without access to the rest of images.
Your final result is prediction accuracy on all dataset.

How to formalize this process in terms of information theory? I know that information theory works with distributions, but maybe you can provide some hints how to think in terms of datasets instead of distributions.

What is the information size of all datasets. My first idea was
that each image is iid from uniform distribution and information
content = -log2(1/60000). But common sense and empirical results
(training neural network) show that there are similar images and
very different images holding a lot more information. For example if
you train NN only on good looking images of 1 you will get bad
results on unusual 1s.
How to formalize that the right strategy is to choose as much as possible different 1000 images. I was thinking to take image by image with the highest entropy relative to the images you already have. How to define distance function.
How to show that all dataset contains N bits of information, training dataset contain M bits of information and there is a way to choose K images < 60000 that hold >99.9% of information.

In short: It is easy to quantify information, but it is not easy to quantify its usefulness

I'm not sure how exactly you are looking to formalise your experiment, but it might be helpful to consider these points:

There is no such thing as an absolute measure of information. The amount of information contained in some dataset is dependent on the underlying assumptions that are made when interpreting it, and therefore, the quantity of information conveyed is also dependent on the encoder/decoder (for example, a neural network). See the Wikipedia article on Kolmogorov Complexity.
Entropy is a useful measure of information content when you assume each sample is iid, but this would be a very bad assumption to make for natural images, since they are highly structured. For example, imagine an image with 50% black pixels and 50% white pixels that can be arranged in any configuration - not matter how you arrange them, wether it looks like random noise, a text paragraph, or a chequer board, the entropy value will be identical for each, even though our intuition tells us otherwise (see attached image). The discrepancy between our intuition and the entropy value arises because our intuition does not interpret the image through the "lens" of iid pixels, but rather, hierarchical receptive fields in the visual cortex (somewhat analogous to convolutional neural networks).
Calculating the entropy of pixel values in one image is somewhat useful, but calculating the "entropy" of a set of images would not be useful, because each image as a whole is treated as if it were a unique arbitrary symbol. I assume this is what you meant by "the information size of all datasets"
KL-divergence is a distance function that is often used to compare two distributions. Intuitively, it represents the redundant bits generated by a non-ideal compression program that assumes an incorrect data distribution. However, KL-divergence between two natural images will not give you a particularly meaningful result.

If I am not mistaken, you want to find some information metric that will enable you to pick the smallest number of the most optimal images for training and get a good test score with the network. Is that correct? It is an interesting idea. However, in order to define such a metric, we might have to know in advance what features of an image are the most significant for classification, which in some ways defeats the point of using machine learning in the first place, where non-obvious and "hidden" features are exploited.

Correct. Behind each new image, there are some most significant features for classification and some features we already know. The task is to identify these interesting images and select them for our training dataset. What do you mean by  "defeats the point of using machine learning"?

What I mean is the following: the task of finding useful and interesting features in a dataset (and therefore picking optimal images) is not too different from the task of the neural network itself. In most cases, we use a neural network because understanding or even seeing such features is a problem that we cannot solve directly.

To illustrate the point, let's consider a dataset that is not so familiar. Let's say we want to build a classification network that characterises pictures of various types of grey rock. For someone who is not a geologist, they would have no idea as to what kinds of features to look for in the rock, let alone the rules by which to classify it. Let's now give this person a neural network and tell him to pick a small subset of training images. How is he going to do this when he has no prior knowledge or experience about rocks?

I would create a few coordinates: size, color and shape and choose extreme examples (min / max values). I was thinking to use variational autoencoder (channel) and choose the next images that perform poorly on trained VE. It means some images will give me more information / surprise than others.


text:
Rendering images and voxelizing the images
I am using the shapenet dataset. From this dataset, I have 3d models in .obj format. I rendered the images of these 3d models using pyrender library which gives me an image like this :

Now I am using raycasting to voxelize this image. The voxel model I get is something like below :

I am not able to understand why I am getting the white or light brown colored artifacts in the boundary of the object.
The reason I could come up with was maybe the pixels at the boundary of the object contain two colors, so when I traverse the image as numpy array, I get an average of these two colors which gives me these artifacts. But I am not sure if this is the correct reason.
If anyone has any idea about what could be the reason, please let me know

This is off topic. @nbro

I checked on google for the forums where I can ask questions about computer vision. This forum came up citing the reason that since "computer-vision" is available as one of the tags, questions related to this can be posted here

Please refer to the help center for questions that is on topic. https://ai.stackexchange.com/help/on-topic

The computer vision tag in this case means this: For questions related to computer vision, which is an interdisciplinary scientific field (which can e.g. use image processing techniques) that deals with how computers can be made to gain high-level understanding from digital images or videos. For example, image recognition (that is, the identification of the type of objects in an image) is a computer vision problem This is defined in the tag wiki of the computer-vision tag. Your question clearly does not fit the description of the tag.

@mascot If you can put this problem in the context of computer vision, then this question may be on-topic here. Maybe try reformulating your question.


text:
Regularization of non-linear parameters?
I was wondering whether it is possible to regularize (L1 or L2) non-linear parameters in a general regression model. Say, I have the following non-linear least squares cost function, where $p$ is a $3d$ vector of fitting parameters:
$cost(p_i) = ( y(x) - sin^{p_1}(x) + p{_2}e^{(p_3*x)} )^2$
In the above cost function, $p_1$ and $p_3$ are non-linear parameters. How should I go about regularizing them? If they were linear, I can just sum them up together with the linear parameters (absolute values or squares) and add as a penalty to the cost function, right? However, I'm not sure if I'm allowed to do so for non-linear parameters.
Has anyone considered this problem?


text:
Training an RNN to answer simple quesitons
I would like to train an RNN to follow the sentences:
"Would you like some cheese"? with "Yes, I would like some cheese."
So whenever the template "Would you like some ____?" appears then RNN produces the sequence above. And it should even work on sentences which are new like "Would you like some blumf?"
I have thought of various ways of doing this. Such as, as well as having 26 outputs for letters of the alphabet have about 20 more for "repeat the character that is 14 characters to the left" and so on.
Has this been done before or is there a better way?

One of the important things to realize about the modern approach to AI/ML is that you do not provide it rules, you use the training data to get the network to work out rules for itself.

Except an RNN can't learn the rule "repeat last character." It can only learn 26 separate rules for each character. Which is kind of useless to learn template type things.

Why limit yourself to letters?  You could certainly train it to look for and predict word sequences.

I have thought of various ways of doing this. Such as, as well as having 26 outputs for letters of the alphabet have about 20 more for "repeat the character that is 14 characters to the left" and so on

Creating a system of rules like your example above is the very opposite of training an RNN to perform this task.
If you would like to train an RNN to answer simple questions you would not need to come up with ingenious rules, but with enough training data of the form
question -> answer

Then you could use one of many popular sequence-to-sequence NLP tools to try and learn this behaviour, effectively treating the problem as if it were machine translation between languages.

More broadly, yes, question answering has been done before, it is very popular in fact. It is an active subfield of NLP research and many methods have been developed, some of them involving RNN networks.


text:
how to convert one structured data to another without specifying structure
I have lots of text documents structured as
{
{
    Item1=[
            {a1=1,
             a2=2,
             a3=3},
            {a1=11,
             a2=22,
             a3=33},
            {a1=41,
             a2=52,
             a3=63},
            {a1=19,
             a2=29,
             a3=39}
    ],
    Item2=[
            {a4=1,
             a5=2,
             a6=3},
            {a4=11,
             a5=22,
             a6=33},
            {a4=41,
             a5=52,
             a6=63},
            {a4=19,
             a5=29,
             a6=39}
    ],
}
}

Now this can be formatted into two csv's as

and

I can write regex parser for this but is there a way by which a neural network or deep learning model can be trained for this, which can create these csvs?
The above example has been indented for better visuals, the raw text looks something like
{{Item1=[{a1=1,a2=2,a3=3},{a1=11,a2=22,{a1=41,a2=52,a3=63},{a1=19,a2=29,a3=39}],Item2=[{a4=1,a5=2,a6=3},{a4=11,a5=22,a6=33},{a4=41,a5=52,a6=63},{a4=19,a5=29,a6=39}]}}

Hi and welcome to this community! Why do you wanna use a neural network for this task? If you can solve it exactly (and not approximately) and efficiently, then you don't need neural networks or machine learning.

Hi @nbro, thanks for the welcome. The structure I mentioned above is just an example. The variations are infinite. Sometime row separators are {, sometime they are [ and sometime custome delimiters like @#@#@. If a model learn to identify inherent structure, the need to write separate parser will end. That's why I want to train a NN model on this.


text:
How to deal with random weights initialization in hyperparameters tuning?
In the step of tuning my neural networks I often encounter a problem that every time I train the exact same network, it gives me different final error due to random initialization of the weights. Sometimes the differences are small and negligible, sometimes they are significant, depending on the data and architecture.
My problem arises when I want to tune some parameters like number of layers or neurons, because I don't know if the change in final error was caused by recent changes in network's architecture or it is simply effect of the aforementioned randomness.
My question is how to deal with this issue?

I don't think you can.
Say a NN with 3 layers gives an accuracy of 95.3% and another NN with 4 layers gives an accuracy of 95.4%. Then there is no guarantee that the 4 layer NN is better than the 3 layered NN. Since with different initial values the 3 layer NN might perform better.
You could run multiple times and probabilistically say that this is better, but this is computational intense.

There are two weight-initializing methods for neural networks:
1-Zero initializing
2-Random initializing
https://towardsdatascience.com/weight-initialization-techniques-in-neural-networks-26c649eb3b78
If you choose zero initalizing method in every train loop, you may get same results OR you can use transfer learning according to your problem, it allows to start same parameters. At last, as a worst and hardest choice, you can write your own weight arrays and feed your layers.
Problem you mentioned is one of the most interesting problems in the evaluation of performance of neural networks. You can use cross-validation method to verify your model's accuracy! ıt will give more reliable results!

There are other sources that will lead to different results in addition to weight initialization. For example dropout layers. Make sure you specify the random seed.Also data reading using flow from directory,make sure you set shuffle to False or if you do not then set the random seed. If you use transfer learning make that part of your network non-trainable. Some networks have dropout in them and do not provide a way to set the random seed. IF you are using a GPU there are even more issues to contend with.


text:
YOLOv3 Synthetic Data Training
Suppose we want to train a model to detect various objects.   Let's say we have training data of those objects in various backgrounds along with their bounding boxes. Basically these objects have been three dimensionally created and the bounding boxes have been drawn on them. Then these have been "synthetically inserted" into various blank backgrounds.
Why would a model trained only on this data do better than a model that has this data along with "real" data of these objects with their bounding boxes manually drawn?

I am not absolutely sure, but I guess it is due to the domain gap. As far as I have seen in my project where YOLOv3 was trained on synthetic images, it performed better when the model was trained and tested on the same domain (synthetic), while the performance drops when we introduce real images for testing. So when you include real images along with synthetic images, you might have to use some domain adaptation methods to improve the performance.

A model trained on synthetic data can sometimes outperform a model trained on both synthetic and real data for a few reasons it is due to following reasons
1. Consistency of Synthetic Data:
Controlled Environments:
Synthetic data offers a highly controlled environment, where the objects are always clear, and correctly labeled, and the backgrounds are controlled. There is little to no noise, occlusion, or ambiguities that could confuse the model during training.
Precision of Bounding Boxes: The bounding boxes in synthetic data are usually perfectly aligned, while manually drawn bounding boxes in real data may have human error or imprecision, which could slightly degrade model performance.
2. Bias and Noise in Real Data:
Imperfect Labeling:
Real data often includes mistakes or inaccuracies, especially when manually labeled. This can introduce noise into the training process, making it harder for the model to learn the correct patterns.
Variety and Complexity of Real-world Scenarios: Real images might have occlusions, lighting variations, reflections, and other complexities that can make it more difficult for the model to generalize well from the data. If the synthetic data does not contain such challenging scenarios, the model may find learning easier.
3. Overfitting to Real-world Anomalies:
A model trained on both synthetic and real data could overfit to specific real-world characteristics that don’t generalize well. For instance, it could learn specific patterns in the noise or background of real images that are not relevant for object detection in the real world.
4. Synthetic Data Can be Richer:
####More Data:
Synthetic data can be generated in large quantities, providing the model with far more diverse training examples, which can improve generalization to unseen examples, especially if the real data is limited or not sufficiently diverse.
Augmentation:
Synthetic data generation allows for creating variations (different lighting conditions, angles, rotations, etc.) that might be harder to collect in real-world data, thus enriching the training set.
5. Domain Gap Between Synthetic and Real Data:
While mixing real and synthetic data can help generalization, the differences between synthetic and real data (often referred to as the domain gap) can cause issues. If the synthetic and real data are too different, the model could struggle to combine both. This gap could lead to underperformance if the model cannot reconcile the differences effectively.
That said, in many cases, the combination of synthetic and real data can outperform either one alone, especially if efforts are made to close the domain gap (e.g., using domain adaptation techniques). Synthetic data's advantages lie in scalability and precision, but real data remains essential for generalizing to real-world conditions.


text:
How to Layer based Feature extraction?
I have read that in deep networks you can engineer each layer for a particular purpose with regards to feature learning. I'm wondering how that is actually done and how it is trained?
In addition doesn't this conflict with the idea of deep-networks having "automatic" feature extraction?
For example consider this:
Lets say you want to detect stop signs. How would you teach a deep network to do this in a layer-wise fashion?
People write about one layer of a Deep Network does edge detection, but how?


text:
Is Sanskrit still relevant for NLP/AI?
I came across a news article from 2018 where the president of India was saying that Sanskrit is the best language for ML/AI. I have no idea regarding his qualification on either AI or Sanskrit to say this but this idea has been floated earlier in the context of NLP. Specifically, Rick Briggs had said so in 1985.
I know elementary Sanskrit and I know NLP. I can understand the point that as a strongly declined language Sanskrit is less ambiguous than say English as the position of words in a sentence are not important. Add to it the fact that words are also declined (that's not the technical term for verbs and I am not sure what is) so that verb gender and number help identify which entity they refer to.
However, that point was valid in 1985. My question is that post the Deep Learning revolution of the last couple of years is it still relevant? Especially given the fact that humans still have to first learn Sanskrit in case NLP is done in Sanskrit.
Of course, as can be guessed from the tone of the question, I am of the opinion that Sanskrit is not relevant for AI now but I wanted to know if someone who works in AI thinks otherwise and if so what is their reason so think so.

Sorry I don't understand and someone else has mentioned something similar in private communications so I'd be grateful if you could elaborate. Why are we comparing programming languages with Sanskrit for NLP? I thought the idea was that humans communicate in Sanskrit and then an AI system can work on it. If its about programming languages there were plenty of them around in 1985 so what was Briggs talking about?

I came across a news article from 2018 where the president of India was saying that Sanskrit is the best language for ML/AI.

A very interesting statement indeed! Globally, there is very little interest in NLP for Sanskrit compared to very many other languages.

Especially given the fact that humans still have to first learn Sanskrit in case NLP is done in Sanskrit.

Most people would say that NLP tools are meant to cater to the needs of humans, instead of requiring humans to learn a new language to be able to benefit from tools (which is a huge barrier).
To answer your question more clearly, it is not that the research community selects languages for research based on "suitability" of the language. Instead, in general the intention of NLP research is to grapple with problems that are relevant, impact many people - or are funded (unfortunately :-).


text:
Why isn't there a model playing FPS like CoD or Battlefield already existing?
Assuming we had an unlimited time to train a model and a very powerful machine to use our model in real-time (hello quantum computer), I'd like to know why no one could achieve to build an AI able to play a FPS, using ONLY pixels shown on the screen.
Disclaimer: I am not tackling this problem and neither am I planning on doing such a thing, this is pure speculation and curiosity.

I read this great article: playing FPS Games with Deep Reinforcement Learning (2017) (Guillaume Lample, Devendra Singh Chaplot) where they achieve a 4/1 kills/death ratio on Doom against bots. But this is 3 years old now.
Here is a picture of their model:

But they made 2 assumptions that we, humans, do not make when we are playing for the first time to a new game like Call of Duty or Battlefield:

Game feature augmentation. To train a part of their model they used the game engine to know if there is (or not) an enemy in the frame they are processing. We obviously can't do this with CoD or Battlefield, and we, as human, just "learn" to recognize an enemy without these informations.
Changing textures of several maps while training to generalize better the model (see 5.2 of the paper linked previously). To summarize, they trained the model with 10 maps changing texture of some elements to make the model generalize better. Then they tested it on 3 unknown maps. In real world (ie in the scenario where we base our training/testing exclusively on the pixels of the screen), we can't train a model with different textures on the same map. And humans are able to play a deathmatch on an unknow map without re-learning everything (detect enemies, move, hide, reloading...). We just need to construct a 3D model of the map in our head to play our best.

Their agent "divides the problem into two phases: navigation (exploring the map to collect items and find enemies) and action (fighting enemies when they are observed), and uses separate networks for each phase of the game".
Would it be wise to use more than 2 models? Let's say:

1 CNN to detect enemies
1 model to deal with space features (position/navigation of the agent and the enemies)
1 model to choose the actions given all data previous models have found?

We could train them independently, at the same time.
I think we'd get better result by processing manually some features (using computer vision techniques) like the minimap to get know positions of enemies and number of ammo to feed as input of the last model (action decider).
But there are other problem we'd get: there is a delay between the frame we choose to pull the trigger, the time the bullet hit the enemy and the time the "reward" appears on the screen (ex: "100 points, kill [nameOfLateEnemy]" appears after the 3th bullet, and if there is ping because we are playing online it may appear 100ms after). How to use reinforcement learning when we don't know exactly which action was the one getting the reward? (we can move the agent while changing the lok directon while pulling the trigger at the same time. It's the combination of these actions that is making the agent kill an enemy).
If the 2 assumptions they made were easy to get rid of, they would be discarded already.
However detecting enemies is basically a simple CNN, and making the navigation network generalize certainly have solutions I can't think of right now but some researchers should have in this 3-year gap between the paper and today.
So why isn't there a model playing CoD or Battlefield better than humans? What am I missing?

I'll think on this and form a thorough answer. Some thoughts: Such an agent might simply learn to become an aim bot and exploit certain features of the game environment. Example: in Black Ops 3 on Xbox 360 some people used an aim bot mod that didn't do anything fancy. It moved to the center of the map then looked as fast as it could in all directions (very fast compared to us). When ever it saw a player in the center screen it shot. I'd say to avoid an agent that learns these exploits we'd have to enforce things like a maximum look speed.

You might be interested in reading deep mind's quake playing if you haven't. They also have a newer post about starcraft2, but that's not a fps.

Did you get any answers? I'm also interested on this


text:
Is it normal to see oscillations in tested hyperparameters during bayesian optimisation?
I've been trying out bayesian hyperparameter optimisation (with TPE) on a simple CNN applied to the MNIST handwritten digit dataset. I noticed that over iterations of the optimisation loop, the tested parameters appear to oscillate slowly.
Here's the learning rate:

Here's the momentum:

I won't add a graph, but the batch size is also sampled from one of 32, 64, or 128. Also note that I did this with a fixed 10 epochs in each trial.
I understand that we'd expect the trialled parameters to converge gradually towards the optimal, but why the longer term movement of the average?
For context here is the score (1 - accuracy) over iterations

And also for context, here's the architecture of the CNN.
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
conv2d_1 (Conv2D)            (None, 26, 26, 32)        320
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 13, 13, 32)        0
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 11, 11, 64)        18496
_________________________________________________________________
conv2d_3 (Conv2D)            (None, 9, 9, 64)          36928
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 4, 4, 64)          0
_________________________________________________________________
flatten_1 (Flatten)          (None, 1024)              0
_________________________________________________________________
dense_1 (Dense)              (None, 100)               102500
_________________________________________________________________
dense_2 (Dense)              (None, 10)                1010
=================================================================

Optimization done with mini-batch gradient descent on the cross entropy.


text:
What are some ways to quickly evaluate the potential of a given NN architecture?
Main question
Is there some way we can leverage general knowledge of how certain hyperparameters affect performance, to very rapidly get some sort of estimate for how good a given architecture could be?
Elaboration
I'm working on a handwritten character recognition problem using CNNs. I want to try out a few different architectures (mostly at random) to iterate towards something which might work. The problem is that one run takes a really long time.
So what's a way to quickly verify if a given architecture is promising? And let me elaborate on what I've tried:

Just try it once. Yeah but maybe I chose some bad hyperparameter combination and actually that architecture was going to be the ground breaker.
Do Bayesian optimisation. That's still really slow. From examples and trials, I've seen that it takes quite some time for convergence. And besides, I'm not trying to optimise yet, I just want to check if there's any potential.

I am afraid that there are (still) no quick ways to evaluate the architecture of a NN. If there were, they probably would already be very famous and you would have found them with a quick search on the web, but I may be unaware of them (and I've not searched for them on the web after this question), even though I am familiar with certain hyper-parameter optimization techniques (like grid search, Bayesian optimization, RL, etc).

@nbro while looking over the Bayesian charts on papers, articles and my own work I notice that something near enough to the best value is often found in the first few iterations.the rest seems like just a bunch of noise while getting marginal improvements on the best trial (actually if you know of a counter example I'd love to see it - I'm very new to the field so I won't be surprised if you have one).

The other thing that inspires the thought is that if you randomly sample from a continuous function, if it's not a crazily dynamic one, you're likely to get an idea of it's full range after just a few samples. So let's say I have a one parameter function and I know that within my domain of interest it only has n significant turning points, then if I'm lucky I might get an idea of what it could look like in just n samples. And with some strategy I might not have to go much further than that even when I'm unlucky.


text:
Generating 5 numbers with 1 input before loss function
I am trying make an ANN model that takes a constant m (will be changed later but now it is just a constant, let's say 0) as an input and generate 5 non-integer numbers (a1,a2..a5) after some layers like relu, linear,relu ... and then these 5 numbers enter to the loss function layer along with an additional 5 numbers (b1,b2..b5) given by hand directly into the same loss function. In the loss function, S=a1xb1+...+a5xb5 will be calculated and the model should use mean square error with this S and S0, which is given by hand again to tune the 5 numbers generated after the NN layers.
For a dummy like me, this looks like a totally different model than the examples online. I'd really appreciate any guidance here like the model I should use, examples etc. I can't even know where to start even though I believe I understand the generic NN examples that one can find online.
Thanks


text:
How much knowledge of the world is learnt through words?
We know a lot of common sense about the world. Things like "to buy something you need money".
I wonder how much of this common sense comes about through actual someone explicitly telling you the instructions "You need money to buy things". Which we store in our brains as a sort of rule. As opposed to just intutively understanding things and picking it up.
I am imagining children playing at shop-keeping and saying things like "I give you this and you give me that". And other children not quite understanding the concept of buying things until being told by a teacher.
If so, giving a computer a list of common sense rules likes these is no different to teaching a child. So I am wondering why this area of AI research (semantic webs etc.) has been frowned upon in the last decade in favour of trying to learn everything through experience like deep neural networks?

There are way too many rules and too many exceptions to the rules and very much that is context-dependent in a nuanced way.

@GeorgeWhite is right. Also the ability of deep models to produce relatively higher accuracy has driven researchers away from conventional AI. With growing amounts of data, its easier for models to identify patterns and "predict" words instead of actually "understanding" and "writing" words.

Yes, there are a lot of rules. But that doesn't stop teachers from trying to teach things like science. They don't just give up saying "There's too many facts!"

If I understand correctly, what you are looking for is called "common sense reasoning" in NLP research.
Research in this field revolves around benchmark data sets, where good performance indicates some ability to do common sense reasoning. Here is a nice collection of data sets and research by Sebastian Ruder:
http://nlpprogress.com/english/common_sense.html

In the end, the main question is not

How much knowledge of the world is learnt through words?

since it is virtually unanswerable if asked in this form. A question that is answered in NLP common sense reasoning research is

Out of 100 specific decisions that my model needs to take, for how many does the model show the ability to reason correctly?

I wonder how much of this is statistically based. A human can reason like this "All men are motal, Socrates is a man, therefore Socrates is mortal". This makes perfect sense to a human. But to an AI it seems like it can only reason like "therefore Scorates is mortal with 95% probability". What seems to be required is a way to manipulate words in the brain much like making moves in a chess game. The same mechanism that an AI can use to think about future moves in a chess game should be used in reasoning.

Grounded language learning
Your description does not match the current understanding of how children learn language, and giving a computer an explicit textual list of common sense rules is very different from teaching a young child. (Some aspects of teaching older children is more similar to that, but by that time they fully know the language already).
Much of language is acquired through interaction (both sensory and motoric) with the physical world, applying words together with a shared focus of attention to something real. I.e. you talk about a cat or a ball and it's behavior while both you and the child are paying attention to that behavior or object or an image of it. The same applies later for more complex topics such as social situations - to teach a topic, to a child, you'd inevitably use a shared attention to specific events in the real world or specific events in a mostly shared 'model world' i.e. one reconstructed from memory (what you saw your sister do five minutes ago) or imagined/hypothesised (if you do this, these consequences might happen).
Attempts to replicate this process in artificial systems is usually called 'grounded language learning', and there's extensive published literature on that which may be interesting to you.
In essence, the assumption is that English (or any other) words to an artificial system are just as useful as a Chinese-Chinese explanatory dictionary to me. If I speak some basic Chinese, then I can use that dictionary to expand my vocabulary and understand complex Chinese - but if I have no grounding in Chinese whatsoever, then the expectation is that it's impossible to reconstruct a language from that data alone.

That's all very well if you want to create an AI like a young child not an adult. But also children go to school and are taught facts and algorithms (like long division) by teachers. So one needs both. Lots of behaviour is learned by words "don't do that", "that's a zerbra", "wash your hands before dinner", "hold your fork in your left hand", "don't chew with your mouth open"


text:
Reinforcement learning CNN input weakness
I'm trying to train a network to navigate a 48x48 2D grid, and switch pixels from on to off or off to on. The agent receives a small reward if correct, and small punishment if incorrect pixel plotted.
I thought, like the Deepmind "Playing Atari with Deep Reinforcement Learning" Paper, I could just use only the pixel input, fed through 2 convolutional layers, to solve this task. The output of this is fed into 512 fully connected layer.
Unfortunately, it barely trains.
When instead using additional vectors as input containing information about nearby pixels' state around the agent, the agent learns the task quite well (yet often orients the wrong awkwardly).
Each step, the agent moves up down left right, and plot pixel or not.
The agent is visualized in the environemtn as a red square with white center dot. (also tried single red pixel). On-pixels within the red square are colored purple.
Is there something I can try to make the agent learn visual input better?
The orange line is the training with only visual observations, the grey one contained vector observations about the immediate neighboring pixel state as well.

Center image on the agent and fill the area outside of original image with black

@mirror2image interesting! I'll give that a try. What would be a reason for centering making the a better representation?

Agent movement will have much bigger effect on environment and action becoming more pronounced - it more easy to detect movement of whole image then movement of small part of it.

@mirror2image that makes sense ya. Will give it a go!


text:
Creating an AI than can learn to give instructions
So we think a computer is dumb because it can only follow instructions. Therefor I am trying to create an AI that can give instructions.
The idea is this: Create a geometric scene (A) then make a change in scene such as turning a square red or moving a circle right one unit. This becomes the new scene B. Then the computer compares the scenes A and B and it's goal is to give the shortest possible instruction that will change scene A to scene B. Examples might be:
"Turn the green square red".

or
"Move the yellow square down".

Or when we get more advanced we might have:
"Move the green square below the leftmost purple square down."

Equally, this task could be seen as finding a description of the change. e.g. "The green square has turned red".
The way it would work is that there'd be a simplified English parser, and the computer would generate a number of phrases and check whether these achieved the desired result.
I would probably give it some prior knowledge of things like colours, shape-names, and so on. Or it could learn these by example.
Eventally I would hope it to generate more complicated loop type expressions such as "Move the square left until it reaches the purple circle." And these would essentially be little algorithms the AI has generated in words.
I've got some ideas how to do this. But do you know any similar projects that I could look at? If you were implementing this, how would you go about it?
[In other words we have an English parser that is interpreted to change a scene A into a scene B. But we want the AI to learn, given scenes A and B, how to generate instructions.]


text:
Training dataset for convolutional neural network classification - will images captured on the ground be useful for training aerial imagery?
I am an agronomy graduate student looking to classify crops from weeds using convolutional neural networks (CNNs).
The basic idea that I am wanting to get into involves separating crops from weeds from aerial imagery (either captured by drones or piloted aircraft). The idea of the project that I am proposing involves spending some time driving around to different fields and capturing many images of both crops and weeds. These images will then be used to train a CNN that will classify aerial imagery on the location of crops and weeds. After classifying the imagery, a herbicide application map will be generated for site-specific weed control. This involves the integration of CNN classification and GIS technology.
My question is this: If you have an orthomosaic image generated from a drone, will images captured from a digital camera on the ground be effective for training a CNN that will classify high-resolution aerial imagery?
Being new to CNNs, I just didn't know if I had to use aerial imagery to train a CNN to classify aerial imagery, or if a digital camera will work just fine.


text:
Why we multiply probabilities with support to obtain Q-values in Distributional C51 algorithm?
In 'Deep Reinforcement Learning Hands-On' book and chapter about Distributional C51 algorithm I'm reading, that to obtain Q-values from the distribution I need to calculate the weighted sum of the normalized distribution and atom's values.
Why I have to multiply that distribution with support? How does it work and what happening there?


text:
Can we just switch off a malicious artificial intelligence?
Let us assume we have a general AI that can improve itself and is at least as intelligent as humans.
It has wide access to technical systems including the internet, and it can communicate with humans.
The AI could become malicious.
Can we just switch off a rouge AI?

Malware viruses are a very simple form of AI.  It is not difficult to conceive of a form of malware that A) can't be detected easily, B) is redundantly distributed across thousands of computers that occasionally connect to the internet, C) is capable of detecting some kinds of threats to itself and mutating to avoid the threats.
So, simply "turning off" a malicious AI will not always be possible.

No.
With a sufficiently advanced general AI, we can not generally assume that we can switch it off when it becomes dangerous dangerous.
It seems that the electrical energy supply can always be switched off.
While that is true on the physical level, it is not guaranteed to work in practice.
The AI could cooperate with humans, which protect the AI from deactivation, or reactivate it.
The cooperation could, for example, one of the following forms:

The AI prepares a relation with humans offering a bribe for help.

An operator gets a reward for keeping the AI running, or reactivating it.

The AI prepares an extortion with humans

For example by organizing a process that needs to be actively kept running by the AI to avoid the death of a child of an operator.

The AI maintains contact with a criminal organisation with strong interest to keep it running, and week ethical inhibition.

The cooperation could be with traditional organized crime organisations, providing money laundering and other vital services to a mafia organisation, which can activate it's widespread influence to maintain the AI running even when there is strong public interest in shutting it down.

Note that these examples can protect against physical attacks by law enforcement.

Hi and welcome to this community! I like your question and it is an important one. However, I think that your arguments in this answer are unsatisfactory. What makes you think that we wouldn't be able to stop the AI in a similar way that we can stop any other human from committing a crime?

@nbro We do not stop humans from committing crimes. We ask a human to follow laws. These laws would stop crimes if they are respected, but a human may choose to ignore them. The AI may choose to ignore it's rules. As long as an AI follows a sufficiently strict set of rules without evading them by loopholes, I do not consider it malicious.

"We do not stop humans from committing crimes.", this is, of course, a false assumption.

@nbro Yes, that's right. The case is that the AI is not cooperating, so I assume that the human also does not cooperate. We prevent some crimes by making them impossible, as when locking gemstones in a safe. Do you mean something like that?

We can prevent certain crimes by anticipating the plan of the criminal and catch him/her. The laws exist to determine the legality of the actions.


text:
Can Bert be used to extract embedding for large categorical features?
I've lot of training data points (i.e in millions) and I've around few features but the issue with that is all the features are categorical data with 1 million+ categories in each.
So, I couldn't use one hot encoding because it's not efficient so I went with the other option which is embedding of fixed length. I've just used neural nets to compute embedding.
My question is can we use advanced NLP models like bert to extract embeddings for categorical data from my corpus? Is it possible? I've only asked it because I've only heard that bert is good for sentence embeddings.
Thank you.

Are your categorical features words/sentences? Why do you want to embed categorical features?

@Sharan It's just words not sentences. There are lot of categories and if I choose to use one hot encoding it would result in a extremely sparse data-set. So only other option is to use embeddings.

Yes I am not suggesting one hot. I just wanted to know how you arrived at embeddings. BERT is very computationally expensive and it would be inefficient to use it for "1 million+" categories. I d suggest you to start off with something simple like Word2Vec. Also simple mathematical features might help in some case - https://www.analyticsvidhya.com/blog/2018/02/the-different-methods-deal-text-data-predictive-python/

@Sharan I understand but I figured bert can understand the context better than any simple methods like word2vec etc.. So was just wondering if it could work on categories?

This question needs more context. What exactly is the problem you are trying to solve? What are training data, what are features, what are the categories? Please clarify.


text:
Searching for powerfull AI modules to improve teef gloves
I have seen the teef glove ofNavid Azodi and Thomas Pryor, like this :

and also seen this post which has been said about this kind of work problem :

Their six-page letter, which Padden passed along to the dean, points
  out how the SignAloud gloves—and all the sign-language translation
  gloves invented so far—misconstrue the nature of ASL (and other sign
  languages) by focusing on what the hands do. Key parts of the grammar
  of ASL include “raised or lowered eyebrows, a shift in the orientation
  of the signer’s torso, or a movement of the mouth,” reads the letter.
  “Even perfectly functioning gloves would not have access to facial
  expressions.” ASL consists of thousands of signs presented in
   sophisticated ways that have, so far, confounded reliable machine
  recognition. One challenge for machines is the complexity of ASL and
  other sign languages. Signs don’t appear like clearly delineated beads
  on a string; they bleed into one another in a process that linguists
  call “coarticulation” (where, for instance, a hand shape in one sign
  anticipates the shape or location of the following sign; this happens
  in words in spoken languages, too, where sounds can take on
  characteristics of adjacent ones). Another problem is the lack of
  large data sets of people signing that can be used to train
  machine-learning algorithms.

So i like to know what proper AI module do you know for doing the navid works better by adding for first step the geometrical position analyzing into it, i like to use popular AI blocks like Tensorfliw for doing this kind of analyzing by fast online and the modules which updated at the time by large community users.
Update:
I think, some Virtual reality analyzer for the position analyzing must be existing, so which one if popular and free to contributing with large community?
thanks for your attention.


text:
Scoring feature vector with Support Vector Machine
I am reading the R-CNN paper by Ross Girshick1 et al. (link) and I fail to understand how they do the inference. This is described in the section 2.2.Test-time Detection in the paper. I quote:

At test time, we run selective search on the test image to extract around 2000 region proposals (we use selective search’s “fast mode” in all experiments). We warp each proposal and forward propagate it through the CNN in order to read off features from the desired layer. Then, for each class, we score each extracted feature vector using the SVM trained for that class.

I do not understand how a Support Vector Machine (SVM) can score a feature vector since SVM does not tell you class probability, it only tells you if an object belongs to a class or not. How is this possible?
It seems that detection flow is: get image, run it through CNN and get feature vector, score this feature vector and run Non-Maximal Suppresion (NMS). But for running NMS we need the feature vector scored, and again, SVM do not score predictions, right?
Actually, when represented in the same paper, the SVM does not provide a score as you can see in the next image (taken from the same paper).

So, how this makes sense?


text:
Getting started with creating a general AI based on textual and then image based data?
I have a pool of knowledge that I want to mine for information and allow an AI to deduce likely conclusions from this information.
My goal is to give the AI a set of textual data that is rated on a scale of 0 to 100 ranging from false (0) to unequivocally true (100).  Based on ongoing learning I want to be able to ask it about it's data and to make relational conclusions as to not simply whether things are true or false, but to extrapolate likelihoods, conclusions and so forth... or to simply tell me it can't understand something which would then trigger me to give it more information and to train it with additional material - even if it's my own limited answers.
Ultimately I'll deal with image data as well, but that's a bit down the road.
I'm new to the area of neural nets and deep learning and so I'm hoping someone could point me in the right direction in the way of terminology to search for / research as well as where perhaps I should start.
I wouldn't mind working in C predominantly if possible, but other languages (especially Ruby) is fine.
The field is moving so fast and there's so much research now that seems to trump information available from just a couple years ago now and so I'm hoping to jump into information that takes advantage of more general learning algorithms so that this can be as robust possible while taking care of current trends.
Where do I go from here?


text:
Finding unique faces in a video
I am trying to find unique (distinct) faces in multiple videos files. What is the best way to do that?

Hi and welcome to this community! What have you found so far? Please, edit your post to add more details. For example, faces of people or other animals? How do your datasets look like, etc?


text:
Do L2 regularization and input normalization depend on sigmoid activation functions?
Following the online courses with Andrew Ng, he talks about L2 regularization (a.k.a. weight decay) and input normalization.  Now, the argument is that L2 regularization make the weights smaller, which makes the sigmoid activation functions (and thus the whole network) "more" linear.
Question 1: can this rather handwavey explanation be formalized?  Can we define "more linear" in a mathematical sense, and demonstrate that smaller weights in fact achieve this?
Question 2: in contrast to sigmoid, ReLU activations have a single point where it is nonlinear - i.e. the breaking point at x=0.  No scaling of the input changes the shape (i.e. derivative) of this function, the only effect is reducing the magnitude of positive outputs.  Does the argument still hold?  Why?
Input normalization is given as a good practice, but it seems to me that the network should just compensate for varying magnitude between components of the input by scaling the weights appropriately.  The only exception I can think of is again under L2 regularization, which would penalize large weights (assoiciated with small inputs).
Question 3: Is this correct, and is input scaling thus mostly important with L2 normalization, or is there some reason why the network would fail to adjust the weights without scaling?

Although all your three questions are related to L2 regularization, I advise you to ask one question per post to facilitate the answerer's life.


text:
EEG and Accelerometer Neural Network
I have frequency EEG data from fall and non-fall events and I am trying to incorporate it with accelerometer data that was collected at the same time. One approach is, of course, to use two separate algorithms and find the threshold for each. Then comparing the threshold of each. In other words, if the accelerometer algorithm predicts a fall (fall detected = 1) and the EEG algorithm detects a fall, based on the power spectrum (fall detected = 1), then the system outputs a "1" that a fall was truly detected. This approach uses the idea of a simple AND gate between the two algorithms.
I would like to know how to correctly process the data so that I can feed both types of data into a CNN. Any advice is really appreciated, even a lead to some literature, articles or information would be great.

wasn't this question already posted elsewhere?


text:
What is generally the best way to combine tabular image metadata with image data in a convolutional neural network?
I have 26 features from tabular data (clinical variables from patients like age gender etc) that I want to add to my cnn which is using xray images from patients. I am using the inception network. Right now I am just concatenating these features to the final fully connected layer just before the softmax activation.
My concern though is that since this final layer also contains 2048 image features that these 26 features will not contribute much in the classification.
Empirically, these 26 features should contribute more than the 2048 image features. A random forest trained on only 26 features did better than the cnn using only the images. I'd like to get a model that does better than either of them separately so I thought I should add these metadata features to the cnn.
Are my concerns warranted? What is the best approach?


text:
Neural nets not learning mnist dataset
I tried training a 2 hidden layer network using the mnist dataset, but I am not getting any results. I have tried tuning the learning rate(tried 0.1 and 0.0001) and the number of epochs(tried 10 and 50). I even changed the size of hidden layer from 10 to 250. First i had initialized the weights between 0 and 1 and was getting the same classification for all test samples but added (-) sign to 50% of them(chose the figure of 50% by myself) and that problem was solved. Now I cant figure out why it is not working.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
from sklearn.preprocessing import StandardScaler

scaler = StandardScaler()

def to_array(img):
    img = np.asarray(img)
    return img

'''def standardize(gray):
    st_gray = (gray-np.amin(gray))/(np.amax(gray)-np.amin(gray))
    return st_gray
'''
def activ_func(x):
    for i in range(x.shape[0]):
        '''x[i][0]=(1-np.e**(-2*x[i][0]))/(1+np.e**(-2*x[i][0]))'''
        x[i][0] = 1/(1+np.e**(-x[i][0]))
    return x

def deriv_activ_func(x):
    for i in range(x.shape[0]):
        '''x[i][0] = 1-math.pow(x[i][0],2)'''
        x[i][0] = (x[i][0])*(1-x[i][0])
    return x

def cost(out_layer, label, ind):
    cost = (out_layer[ind]-label)**2
    return cost

def update(x, grad, r):
    for i in range(x.shape[0]):
        x[i][0] = x[i][0]+r*grad[i][0]
    return x

path = "mnist/mnist_train.csv"
gray = pd.read_csv(path)
labels = gray['label']
gray = gray.drop(['label'], axis=1)
gray = to_array(gray)
labels = to_array(labels)
st_gray = np.empty(shape=(gray.shape[1],1))

def rand_sign(w):
    n = np.random.randint(2,size=w.shape[0]*w.shape[1]).reshape(w.shape[0],w.shape[1])
    for i in range(w.shape[0]):
        for j in range(w.shape[1]):
            if(n[i][j]==1):
                w[i][j]=(-1)*w[i][j]
    return w

def initialize():
    in_layer = np.empty(shape=(st_gray.shape[0],1))
    out_layer = np.unique(labels).reshape(-1,1)
    w1 = rand_sign(np.random.rand(250,in_layer.shape[0]))
    b1 = rand_sign(np.random.rand(250,1))
    l1 = np.empty(shape=(250,1))
    w2 = rand_sign(np.random.rand(250,l1.shape[0]))
    b2 = rand_sign(np.random.rand(250,1))
    l2 = np.empty(shape=(250,1))
    w3 = rand_sign(np.random.rand(out_layer.shape[0],l2.shape[0]))
    b3 = rand_sign(np.random.rand(out_layer.shape[0],1))
    l3 = np.empty_like(out_layer)
    return l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer

def feed_forward(l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,i):
    st_gray = scaler.fit_transform(gray[i][:].reshape(-1,1))
    in_layer = st_gray
    l1 = np.dot(w1,in_layer)+b1
    l1 = activ_func(l1)
    l2 = np.dot(w2,l1)+b2
    l2 = activ_func(l2)
    l3 = np.dot(w3,l2)+b3
    l3 = activ_func(l3)
    return l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer

def one_hot(out_layer,label):
    for j in range(out_layer.shape[0]):
        if(out_layer[j][0]==label):
            out_layer[j][0] = 1
        else:
            out_layer[j][0] = 0
    return out_layer

def back_prop(l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer,lr):
    error = out_layer-l3
    grad = np.dot(error*deriv_activ_func(l3),l2.T)
    w3 = update(w3, grad, lr)
    grad = error*deriv_activ_func(l3)
    b3 = update(b3, grad, lr)
    grad = np.dot(w3.T,error*deriv_activ_func(l3))
    error = grad
    grad = error*deriv_activ_func(l2)
    w2 = update(w2, grad, lr)
    grad = error*deriv_activ_func(l2)
    b2 = update(b2, grad, lr)
    grad = np.dot(w2.T,error*deriv_activ_func(l2))
    error = grad
    grad = error*deriv_activ_func(l1)
    w1 = update(w1, grad, lr)
    grad = error*deriv_activ_func(l1)
    b1 = update(b1, grad, lr)
    return l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer

def predict(l3):
    out = np.amax(l3)
    count = 0
    for j in range(l3.shape[0]):
        count=count+1
        if(l3[j]==out):
            break
    return count

def trainer():
    l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer = initialize()
    for epochs in range(50):
        for i in range(gray.shape[0]):
            out_layer = np.unique(labels).reshape(-1,1)
            l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer = feed_forward(l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,i)
            out_layer = one_hot(out_layer,labels[i])
            l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer = back_prop(l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer,0.0001)
        print("End of epoch :",epochs+1)
    return l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer

l1,l2,l3,w1,w2,w3,b1,b2,b3,in_layer,out_layer = trainer()

path = "mnist/mnist_train.csv"
gray = pd.read_csv(path)
labels = gray['label']
gray = gray.drop(['label'], axis=1)
gray = to_array(gray)
labels = to_array(labels)
st_gray = np.empty(shape=(gray.shape[1],1))

for i in range(10):
    st_gray = scaler.fit_transform(gray[i][:].reshape(-1,1))
    in_layer = st_gray
    l1 = np.dot(w1,in_layer)+b1
    l1 = activ_func(l1)
    l2 = np.dot(w2,l1)+b2
    l2 = activ_func(l2)
    l3 = np.dot(w3,l2)+b3
    l3 = activ_func(l3)
    count = predict(l3)
    print("Expected: ",labels[i]," Predicted: ",count)

Have you done gradient checking? Do that if you haven't - the most probable cause is a minor logic error in your back propagation


text:
Simulating successful trajectories in Montezuma's Revenge turns out to be unsuccessful
I have written code in OpenAI's gym to simulate a random playing in Montezuma's Revenge where the agent randomly samples actions from the action space and tries to play the game. A success for me is defined as the case when the agent is atleast able to successfully retrieve the key (Gets a reward of 100). And such cases I dump in a pickle file. I got 44 successful cases when I kept it to run for a day or so. Here is the code I use to generate the training set :
import numpy
import gym
import cma
import random
import time
import pickle as pkl

env   = gym.make('MontezumaRevenge-ram-v0')

observation = env.reset()

#print(observation)
#print(env.action_space.sample())

obs_dict    = []
action_dict = []
success_ctr = 0

for i in range(0, 1000000):
    print('Reward for episode',i+1)
    done = False
    rew = 0
    action_list = []
    obs_list    = []
    while not done:
        action = env.action_space.sample()
        observation, reward, done, _ = env.step(action)
        action_list.append(action)
        obs_list.append(observation)

        rew += reward
        env.render()
        time.sleep(0.01)
        if done:
            env.reset()
            if rew > 0:
                success_ctr += 1
                print(action_list)
                action_dict.append(action_list)
                obs_dict.append(obs_list)
                pkl.dump(obs_dict, open("obslist.pkl", "wb"))
                pkl.dump(action_dict, open("action.pkl", "wb"))

    print(rew)
    time.sleep(1)

try:
    print(obs_dict.shape)
except:
    pass

print("Took key:", success_ctr)

I loaded the successful cases from my generated pickle file, and simulated the agent's playing using those exact same cases. But, the agent never receives a reward of 100. I dont understand why this is happening. A little search online suggested it could be because of noise in the game. So, I gave a sleep time, before running each episode. Still, doesn't work. Can someone please explain why is this happening? And suggest a way I could go about generating the training set?

What's exactly the point of time.sleep() in this code? I don't really understand it, you're simply stopping the execution of the program for $0.01$ seconds, how will that affect the simulator in any way ? It's not running in parallel, it does one step of the simulation when you call env.step function and returns the next state and reward. Calling sleep function only slows down the program here.
The reason for the failure of successful trajectories, when repeated, is probably because the environment isn't stationary. That means that there are enemies or obstacles moving in the environment. If you simply repeat the trajectory that was successful once the enemies and obstacles might be in different positions and the agent will die. The reason why it succeeded the first time is because the agent got lucky. These are still valid learning trajectories because they were successful. The agent should learn reasons (features) why those trajectories were successful but not learn the trajectories themselves because, as you saw, they don't generalize well. If you plan on doing some kind of supervised learning approach you should also generate variety of unsuccessful trajectories so that the agent can learn what are correct and what are not correct actions depending on the current state in the environment.

To introduce a deterministic element between two successive runs of the env.step(action) to alleviate the noise in the environment if possible.

sleep function will not affect the randomness of the simulator, it's determined by it's own random number generator. See if you can set the seed of the simulator for repeated deterministic episodes.

Since the environment has some randomness in it, purely memorizing a trajectory to victory will not work. You will have to memorize every single trajectory for that to work, and there are an infinite number of them.
So, you will need to add some sort of bias to your learning model - i.e., what to do when the observations in your pickle file don't match the current observation.
Your current setup lends itself well to a case-based reasoning (CBR) approach. The idea of CBR is that you have a memory bank of observation-action pairs and when you see a new observation you look up the memory bank and see if the current observation has been seen before. If so, do that action. The interesting part is when there are no observations that match directly, but there are some that are similar. In this case you choose the most similar. The similarity can be calculated in any number of ways, and it is dependant on the data types. This paper is will provide a good start: https://alumni.media.mit.edu/~jorkin/generals/papers/Kolodner_case_based_reasoning.pdf

Do you know of any examples of CBR applied to selecting actions based on video frames from a game? Without knowing more, I would be concerned that it will not scale well to that environment. Potentially the OP could reduce the dimensionality of the observations to help apply CBR

You have a point in that the similarity metric used to compare two images would have to be well thought out. But I imagine it can still be done. The other option like you said would be to potentially apply convolutions to the images to extract relevant features. Or do other image processing as a feature extraction technique.


text:
Is there a way to use RNN (in tensorflow) to do something like a batch Kalman with the weight dynamics specified in the loss?
Or would you simply do this as a time series of models.
Basically I think you can think of time series of weights as the hidden states and the dynamics driving the weight time series as the RNN weights. I'm not sure if the data gradients are avoiding look ahead in this context though.
I am basically thinking of smoothing (data assimilation) formulation of the filtering problem. Usually smoothing has look-ahead bias but with stop_gradients (and a large graph) it should be possible to do "batch" filtering.


text:
Text detection on English and Chinese language
https://arxiv.org/abs/1910.07954
In this paper, we have a convolutional character neural network where we have object detection by taking a character as a basic unit. First, we do character detection and recognition and then we go for text detection.

Here (Page number 5 under the subheading Iterative character detection) it is written that a model trained on English and Chinese texts will generalize well in regards to text detection.
But how English and Chinese texts are good for generalization in text detection.
If you have any queries regarding the paper you can ask me in the comment section
Thanks in advance!


text:
Transpose convolution in TiF-GAN: How does "same" padding works?
This question should be quite generic but I faced the problem in the case of the TiF-GAN generator so I am going to use it as an example. (Link to paper)
If you check the penultimate page in the paper you can find the architecture design of the generator.
The generator has a dense layer and then a reshape layer converting the hidden layer feature map to a dimensionality of 8x4x512 (given that $s = 64$)
Then what follows is a transpose convolution operation with a kernel size of 12x3 with $512$ filters and a stride of $2$ in all dimensions. The output of this layer should be then 16x8x512.
After fiddling with some coding I found out that the authors also used the setting padding=same in their tensor flow code.
So, my question is: How and what do you pad when you perform such a transpose convolution to get those output dimensions?
Without any padding I would assume that you should get an output of 26x9x1534 assuming that each output dimension is equal to dim = kernel_dim + strides * (input_dim - 1)

authors: Радован Миловић


text:
How to handle set-like size agnostic input format
Let's set up some hypothetical simplified scenario: Each instance $i$ of my imaginary dataset $D=\{i_{1}, \ldots, i_{MAX}\}$ has different number $k_{i}$ of $n$-dimensional vectors as input into my neural network. Each of them will be transformed with $m \times n$ matrix $M$ (so, matrices with same parameters) and acted point-wise with some non-linearity $\sigma_{1}$.
Now there are 2 possibilities I want to consider separately:

Case: I want to average all those outputs, thus depending of total number of vectors $k_{i}$.
Case: I want to choose 2 subsets (no necessarily mutually disjoint) and average vectors from those subsets.

For the later layers (in both cases) I'd use some the "standard" neural networks architectures and loss functions. Notice, I'll probably go with more complex connections than averaging, this is only for the purpose of this technical question.
My questions are:
 1. Is there a "simple" way (meaning: high-level library like
    tensorflow) which allows me to create custom layer with shared
    weights which is also size-agnostic (not size of vectors, but number
    of vectors) Is it possible to parallelise computation like this?
I have some knowledge of tf, but I still didn't use all obscure low-level details and don't know all capabilities of $2.0$ version. Also, I'd know to do this stuff in numpy with handcrafted back-propagation implementation. I'd like to do it in more high level way which will handle backpropagation and parallelisation for me.
I'd like to avoid having tensor of vectors which will be padded, but I'm not sure is it possible. My real problem is more complex but has same characteristics: I need to use same weights on differently connected layers, and I would handle normalization of the input to the following layers to the same scale manually (i.e. with "normal" averaging or weighted attention-like averaging,...). Not always I'd connect all vectors from first layers to all from second. It needs to be flexible for each instance of data.
So, in short: I want to reuse the same weight matrices but connect them differently for each instance of dataset. I want to do it in framework which already has automatic differentiation/backpropagation and parallelisation. Is it possible?
Does eager execution in tf help in solving problems like this? I guess nothing could be done with prebuilt computation graphs in 1.x versions.


text:
How to tell if two hotel reviews addressing the same thing
I am playing with a large dataset of hotel reviews, which contains both positive and negative reviews (the reviews are labeled). I want to use this dataset to perform textual style transfer - given a positive review, output a negative review which address the same thing. For example, if the positive review mentioned how spacious the rooms are, I want the output to be a review that complains about the small and claustrophobic rooms.
However, I don't have positive review-negative review pairs for the training. I was thinking that maybe I could create those pairs myself, but I'm not sure what is the best way to do that. Simple heuristics like jaccard index and such didn't give the desired results.

This seems like a tricky data set to create automatically. Do you have a different goal you want to eventually achieve, once you have this data set? Put differently, why are you building such a data set? By the way, "style transfer" can very often be equated with "translation" in NLP.

Well, my goal is to show that supervised style transfer can work in practice in complex cases, so I could get funds for labeling a very challenging dataset :)


text:
Predicting probabilities of events using neural networks
I've got a few thousands of sequences like
1.23, 2.15. 3.19, 4.30, 5.24, 6.22

where the numbers denote times on which an event happened (there's just a single kind of events). The events are sort of periodical and the period is known to be exactly one, however, the  exact times varies. Sometimes, events are missing and there are other irregularities, but let's ignore them for now.
I'd like to train an neural network for predicting the probability that there'll be a next even in a given time interval. The problem is that I have no probabilities for the training.
All I have are the above sequences. If I had four sequences like
1.23, 2.15. 3.19, 4.30, 5.24, 6.05
1.23, 2.15. 3.19, 4.30, 5.24, 6.83
1.23, 2.15. 3.19, 4.30, 5.24, 6.27
1.23, 2.15. 3.19, 4.30, 5.24, 6.22
1.23, 2.15. 3.19, 4.30, 5.24, 6.17

then I could say that the probability of an event in the interval [6.10, 6.30] is 60% and use this value for learning. However, all my sequences are different. I could try to group them somehow so that I can define something like a probability, but this sounds way more complicated than what I'm trying to achieve.
Instead, I could try to use the sequence
1.23, 2.15. 3.19, 4.30, 5.24, 6.22

to learn that after the prefix 1.23, 2.15. 3.19, 4.30, 5.24, there will be an event in the interval [6.10, 6.30] for sure (value to learn equal to one); if there was 6.05 instead of 6.22, the value to learn would be zero. A learned network would produce the average value (let's say 0.60).
However, the error would never converge to zero, so there'd be no quality criterion and probably a big chance of overtraining leading to non-sense results.
Is there a way to handle this?

Could you help us refine your problem statement? Given a time series $(t_0, t_1, ..., t_n)$ as input, do you want the neural network to predict whether there will be an event in the interval $[t_n, t_{n+\tau}]$, with $\tau$ fixed for all predictions? Or do you want the neural network to predict the probability that an event will occur in $[t_1, t_2]$, for any $t_1$ an $t_2$ given as input? Or is it something else?

I agree with @Raphael Lopez kaufman that the question, as it stands, is not clear.  Please revise your post according to his request.

You can set up a neural network to predict whether there is an event in a randomly picked interval. I.e. if there is an event in this interval in your trainingsdata you train to output a 1 otherwise you train to output a 0.
If you use the quadratic loss function the prediction of the NN should approximate the probability of such an event.
Overfitting can be monitored with by splitting your trainingsdata into train- and testset.
If you train an RNN by inputting the intervals between events, these intervals should be more similar than the exact event times. Modelling a time series like this also makes more sense.
Of course these details depend on what exactly the data is representing. And it is also possible that decent predictions are impossible for this dataset.

This is exactly what a “classifier” does.
“Classification” problems often get talked about as choosing one of several categories. However, most classifiers, neural networks included, actually output values on a continuum. Software functions might output the category corresponding to the highest predicted value on that continuum, but that is not actually part of the neural network.
The key point is that, despite having outcome data that are categorical, the predictions are on a continuum.
One irritating point is that neural networks are notorious for being overconfident in their predictions, meaning that the values returned, despite being in $(0,1)$, arguably are not probabilities. This is a matter of either calibrating your miscalibrated neural network or using a model like logistic regression that is more likely to produce good calibration.
(“Calibrated” probability means that an event predicted to occur with probability $p$ actually happens $100p\%$ of the time.)

The post states that the period is exactly 1 and that there is some noise.  Since you have thousands of numbers in the sequence, you should be able to construct a robust probability density function (pdf) to model the time interval between events.  This can be done by subtracting consecutive numbers in the time series.  Once you have done that, you can construct an empirical pdf, which can then be used to ask almost any question you want.

What is the probability that the next event will occur between some time interval?
What is the expected value of the time of the next event?

Note that the average of the time intervals should be ~1 if the data are in fact periodic with a true period of 1.

Given your sequences you can frame the problem as sequence classification where the input is the sequence leading up to a time interval and the output is the probability of an event occurring in that interval. Use a recurrent neural network (RNN) or LSTM to model the sequences and train it as a classification problem. Monitor for overfitting and consider using techniques like early stopping and regularization.
if only you could provide a more detailed explanation.


text:
Best AI Approach for 2D to-down space shooter
I am building a 2d top-down space game, which involves several objects, such as asteroids, drones, spaceships, space litter and power-ups.
It follows the rules of space gravity, with speed and acceleration.
The idea is that a player controls his own spaceship, can fire bullets, and is allowed to spawn 3 support drones that will attack the enemy. Its goal is to deal the most damage to the opponent spaceship in 3 minutes.
It involves certain dynamics, such as "Destroying an asteroid spawns a power-up", "touching an asteroid deals damage to your spaceship" etc.
What would be the best approach to define an AI agent for it?
I was thinking of Reinforcement learning, but maybe the game is too complex and I wouldn't have the computational power for it?


text:
Labeling for multilabel image classification
with a friend of mine, we got in an argument over how to label images for multi-label.
Note:
Groups of a species and the species of catfish is important to recognize.
The labels are:

'I': an individual fish of any type except catfish
'R': A group of same species
'K': Catfish

First conflict:
For an image containing a bank of fish, our conflicting opinions are:

I and R
R

Second conflict:
If in an image there's actually a bank of catfish, our conflicting opinions are:

K and R
K

Third conflict:
If in an image there's actually a group of same species of fish and other individual fish from different species, our conflicting opinions are:

R
I and R

Summary:

I think one very important difference of opinion here, is if in multi-label, we should give two labels to one object in image(say group and fish) or if an object should have only one label.
Should the overwhelming presence of an object, overshadow the presence of another (group of fish of same species and another individual fish)

What do you think?