text:
How to estimate the AI player's strength in multiplayer game?
I have implemented multiple MCTS based AI players for the Love Letter game (rules). It is a 2-4 players zero sum card game where players make alternating moves. I am struggling with how to properly conduct experiments for estimating AI player strength against human players:

In 2 player game where one of the players is AI bot
In 4 player game where one (or multiple) of players is AI bot

Do you have data (preferably lots) regarding human play choices? Do you have some humans available to help testing?

@NeilSlater I don't have human play data. However, I have some humans availlable to help me in testing. Is it good approach to take 15 players (including 1 AI bot)  with initial Elo rating and let them play against each other?

If you are only concerned with win/loss outcomes, you can use the ELO system.

The following are extremely simple ways of tackling this problem.
A very simple way
It can simply be
strength of AI=(# of games won)/(total # of games).

In case data for each move is available
Something like
score per game=# of correct decisions/total number of decisions.
Then
strength of AI=sum(score per game)/total # of games.

If each move/decision has a score associated with it
then you doscore per move=scored points by taking a decision/maximum possible score.
then
score per game=sum(score per move)/total # of moves
and finally,
strength of AI=sum(score per game)/total # of games.

How to choose optimal number of games to play?
It depends on your requirements. If you want to report your AI's strength in percentage of the games it played correct to 1 decimal place (for example, this AI won 95.1%) then 10000 is an optimal number of games your AI needs to play. Suppose your AI won 9508 games out of 10000 then you will have 95.08% strength of AI. To be able to correctly round it to 1 decimal place you need to have an additional decimal place so that you can quote the strength of you AI with reasonable confidence, in this case 95.1%.

Can you explain how to select optimal number of total games  and how many people to engage for the experiment?

I have tried to explain the optimal number of total games in the edit of the answer above.

I am not sure how you can determine the optimal number of people to choose.

@DuttaA That's true, most probably. It very well looks like it as well.

This experiment can be repeated against multiple people who are aware of how to play the game. Then average strength can be reported as the final one.

The experiment can also be repeated with only one top tier human player and an average can be reported


text:
How to calculate the output of this neural network?
What is the output value of the network for these inputs respectively, and why?
(Linear activation function is fine.)
[2, 3][-1, 2][1, 0][3, 4]
My main question is how you take the 'backwards' directed paths into account.

The neural Network in the image is a "Recurrent Neural Network"(RNN). Because of the connection leading backward from h10 to h01, h10 has to be a "memory node" (mn), meaning it can store its value from the previous input. The basic functionality of an RNN can be seen in this animation:

Your example:
In the beginning, the storage of the mn is initialized with a value, probably 0.
Now the first input is fed into network:

i0 = 2
i1 = 3
h00 = (i0 * 0.4) = 0.8
h01 = (i1 * -0.9) + ("the stored value of h10" * 1.2) = -2.7
("the stored value of h10" in the first run is 0.)
h10 = (h00 * 0.85) + (h01 * -0.2) = 1.22
out = (h10 * 0.3) + (h01 * 0.1) =  0.096

Now you can feed the next input through the network and use -2.7 as "the stored value of h10" and so on. You can also add an activation function as you would for any other NN.

Why is out calculated later than h10? Technically, out and h10 is on the same layer, just like h00 is to h01. What is the algorithm for the calculation order?

source: Stack Exchange

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

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

sort: votes


text:
Fuzzy confusion matrix for fuzzy classifier
Let us suppose I have a NxN matrix and I want to classify in M classes each entry of the matrix using a fuzzy classifier. The output of my classifier will be, for each matrix entry, an M-dimensional vector containing the probabilities for the entry to be classified in each class.
A naive way to build a confusion matrix would be to select the highest probability in each vector and use it as a crips classification. However, I would like to take into account all the probabilities associated to each entry and compute a "fuzzy" confusion matrix. Is this possible?

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


text:
Social network filtering for specific topic
I created and operate a social network for meeting new people.  As a result of the recent FOSTA legislation, it’s imperative that I implement an automated system to prevent users from posting advertisements relating to prostitution. I do not have much expierence with AI/Machine learning.  What library, algorithm, method should I look into to solve this problem?

please elaborate on the type of content your social media website allows? do you need your 'algorithm' to look into only text data or do you need to look into image data as well? are videos allowed on your social media website?

Machine learning-Supervised learning algorithm can do better.


text:
Best practices to classify recurring patterns using an LSTM or GRU
I'm working with acoustic data (filterbank features) and I want to build a neural network to detect claps using an LSTM (or a GRU) with a binary output (present/abscent), and I'm wondering about how I should prepare my data before feeding them to the RNN.
If I have 20 seconds of claps (separate claps separated by ~ 0.1 seconds) what is the difference between :

Feeding the network a series of N claps as one example (with variable N : 1, 2, .., 10, ..) + padding with zeros to fit the longest sequence.
Feeding the network multiple examples of 1 clap.

My problem is not restricted to claps but covers patterns that can be observed as separated occurrences, periodic sequence of occurrences, variable-length-period "quasi-periodic" sequence of occurrences, etc.
Unlike an ergodic HMM, an RNN doesn't have any loops to "jump back" to a previous "acoustic state", so what should-I do with this kind of data ?


text:
Looking to build, compile, and/or find dataset for serial-parallelized code examples
I'm looking to perform two tasks:

Train a classifier to classify code as serial or parallel
Train a generative algorithm to generate parallel code from serial

For the first task a simple scraper can scrape random C and C++ code from git, however for the second step I would need a decently large source of examples of serial to parallel code. Any ideas or pointers for existing or creating this type of dataset would be greatly appreciated.

A generic way to start with under such circumstances is to try find an "oracle".
Serial to parallel converters exist for quite some times, and some are open source (e.g. PIPS). The idea is to get serial code from step (1), use the "oracle" to produce parallel code, and that's it: Each conversion makes en entry in the dataset.
Ensuring the quality of the dataset is critical here. A script generating the dataset shoud ensure (1) the serial code compiles and runs properlly, (2) the parallelized code compiles and runs properly too, (3) serial and parallel programs produce the same result, (4) some metrics state objectively how the parallel version does against the serial version, and (5) keep track of the actual hardware configuration.
Point (4) is critical to the quality of such a dataset. Parallel programs are not always faster than a serial version: A 1000-iteration loop dumped over 1000 workers on a 8-core CPU may not do so well compared to 8 workers---we need to check what the converter is doing. And point (5) ensures we know under which conditions the data is valid.
Using several "oracles" would be even better, to bring diversity, and to hopefully get the learning algorithm discover the best conversion tradeoffs---perhaps better than what the carefully hand-crafted converters are able to do on their own.

In addition to PIPS: DawnCC and bones.


text:
Too small gradient on large neural network
When training on large neural network, how to deal with the case that the gradients are too small to have any impact?
FYI, I have an RNN, which has multiple LSTM cells and each cell has hundreds of neurons. Each training data has thousands of steps, so the RNN would unroll thousands of times. When I print out all gradients, they are very small, like e-20 of the variable values. Therefore the training does not change the variable values at all.
BTW, I think this is not an issue of vanishing gradients. Note that the gradients are uniformly small from the beginning to the end.
Any suggestion to overcome this issue?
Thank!

Did you tried Backprogation Through Time  (BPTT) ? Need more information about your net and task to help you

Thanks for your comment and suggestion. I changed the layer from tf.contrib.rnn.LSTMBlockCell to tf.contrib.rnn.LayerNormBasicLSTMCell. Then the gradients become large enough to influence the network.

Vanishing gradient is a common problem in RNN.
A common way to deal with it is the method of gradient clipping (mainly you define a maximum and/ or a minimum threshold). see here for more information
Further information and piece of code to implement it can be found in SO here
Hope it helps !

I changed the layer from tf.contrib.rnn.LSTMBlockCell to tf.contrib.rnn.LayerNormBasicLSTMCell. Then the gradients become large enough to influence the network.

It means that I normalize the input for the network layers. I hope this explains.


text:
How to factor time into decision trees?
Are decision trees able to be used with time-related data?
I've read that decision trees are based on matrices and that ARRAYS of input matrices can be used to factor in time however I can't find an example of this.
Say for example, I'm monitoring the progress of students taking exams. Each day I ask them questions related to their mental state (fatigued, positivity, ability to concentrate, expectations for coming exam, confidence, etc). I have twenty days worth of questions. Day 1 for student A may see them studying for an exam the following day, while Day 1 for student B may see them actually doing the exam. There will be a relation between student's fatigue (for example) and the results they give the following day.
The examples when provided as input to a matrix will be used to show that IF on any given day, the student has an exam, and has breakfast, and does x,y,z THAT day then the outcome will be y.
However, short of encoding "had exam previous day" and "had exam two days ago" for each day, I can't see how I can include time dependency in decision trees.


text:
Two data classes for a convolutional neural network, can one have a LOT more images for training than the other?
I have two classes in the training set: one that has images with a feature and the other of images without that feature.
Can there be a LOT more images with "no feature" so I can fit in all possible false positives?

Your question is very general so therefore, in this case, my answer will be too:
The answer is "sometimes": it depends on the data.
There can be a lot more images in one class than the other, and you can still get reasonable results. It highly depends on how much data you have of the "feature class".
If this is the case, we say that the classes are heavily unbalanced, and you need to do "class balancing". You do not want to do overfitting on this one class, and preferably you want the feature-class to be the biggest.
Another approach for CNNs is to use "dropout". Well, for CNN's you can go a bit further: you can remove parts of the image to generate "new" images. This way you prevent overfitting of the "feature" class, whilst generating more data.
I suspect that training all possible false positives is impossible without overfitting the network somehow.
Hope it helps, and give you some google pointers :)

Just FYI: You basically, in the tech term, want to know whether it works to do binary CNN classification using a heavily imbalanced dataset.

I think you are actually working on one class classification as the other class is feature less. So you will end up classifying an input data as it belongs to that single class or not.
If you are ok with considering your problem as one class classification then i would say you actually DON'T need a feature less data set at all.
You can just directly run your featured data(say cat pictures) using an autoencoder and figure out threshold value at the bottle neck(this is a bit challenging). Later during the test time you can verify that input data belongs to the desired class by just looking at the threshold value produced by the encoding part of autoencoder.
If this answer doesn't satisfy you. you can just google keywords like "One class classification" or "out lier detection". I guess from there you can follow up easily.


text:
Time Series: LSTM or Augmented Vector Space?
In time Series prediction, we have a stream of vectors. There are different approaches for accounting for the temporal patterns between these vectors.
There's two that I'm considering. An LSTM or augmenting the feature space. What's the difference between the two? The most obvious to me is that an LSTM is more expressive and can get superior accuracy if modelled properly.

LSTM is a neural network which learns for an input x an output y. In additional to CNNs or MLPs it considers a hiddenstate h (which is influenced by prvious inputs) when your next input x is feed into the network.
Augmenting the feature Space is a technique which you do previous training your LSTM (to augment your data set in order to generatre more data and let the LSTM better generalize to new data). In the field of image recognition you can rotate your images by 40 degree to generate a new one. This process is known as data augmentation. Such methods also appliable to time series.
In summary: first, you start with augmenting your input feature space in order to improve prediction accuracy and then training your LSTM with the augmeneted training data set.

I don't think this answers the question.

This answer first distinguish and relates the two terms LSTM and feature space augmentation. For a more detailed answer please give more information (for instance a paper to each term).

Everything @user3352632 says is correct and makes sense though :p

I just read this in a recent Bengio paper and it's pretty obvious. He says that there are zero differences between a short-term memory and an augmented feature space. However, if you want to capture long-term dependencies without blowing up the feature space, you'd want to use an LSTM because traditional approaches can't dynamically learn what to "remember".

Correct! However, the Elman-RNN (vanilla) can in theory learn long term dependencies as well as an LSTM, as Bengio also has a paper on. The problem is that it is very sensitive to the hyper parameters and thus they are very hard to tune.

No, wait what? What do you mean by "augmented feature space"?

Vector concatenation: ..

Does that make sense?

No. Maybe. I don't understand how you can compare concatenating vectors and LSTM?

By LSTM you mean long short term memory recurrent neural network, right?

Yes, that's what I mean. I'm just concatenating them temporally. We have a stream of input vectors and I maintain a sliding window of them.

Are you wondering of the differences in effect of the LSTM when input vectors are concatenated along the feature axis?

No, the difference in how to model the temporal nature of the stream. Through an LSTM or through vector concatenation.

But these are two wildly different things? How are LSTM-RNN networks an alternative to concatenate vectors?! Vector concatenation is like a mathematical operation and an LSTM is a machine learning structure, that uses time series to learn and predict. It's is like asking "Should I use addition or a neural net to figure out if a number is big enough?" It just doesn't make sense.

They are an alternative for temporal modelling. Vector concatenation is a widely used technique for sequence modelling.

Either you don’t mean what I think you mean or you don’t know what you mean. I give up x)


text:
Multiple centroid draw
I'm writing neural network based on neural gas algorithm (university assignment) and I remember that lecturer said that, when you generate random neuron weights at the beginning, it's worth to generate them multiple times  and choose the best set of them.
The problem: I don't know what's the criteria of choosing the best set of weights for neurons?


text:
How can neural networks that extract many features be fooled by adversarial images?
I have been reading a bit about networks where deep layers able to deal with a bunch of features (be it edges, colours, whatever).
I am wondering: how can possibly a network based on this 'specialised' layers be fooled by adversarial images? Wouldn't the presence of specialised feature detectors be a barrier to this? (as in: this image of a gun does share one feature with 'turtles' but it lacks 9 others so: no, it ain't a turtle).
thanks!

you should look at this : https://www.youtube.com/watch?v=CIfsB_EYsVI

The link in DuttA's comment provides a good answer to the more general question of how adversarial images are generated. As to why it's possible at all, the key is that these specialized feature detectors really are just picking up features, and it's possible to construct an image that has those features, without resembling the target object much at all.
For example, we might imagine that the key features that predict an image of a gun are regions like the trigger guard and perhaps the muzzle. The features that are extracted really will just be "round-ish thing with a curved bit in it" and "perfectly circular opening". These might predict a gun really well, but it's also easy to imagine that you could place shapes satisfying those criteria the correct distance apart without including any of the other components that we'd expect. This is what you actually see in the adversarial images that are generated. Consider the bagel or crossword puzzle images below. While they are not actually pictures of the objects in question, it is fairly easy to see what the important features were for the network: a bagel is a round shape that's shadowed in the center and lighter between the center and rim. It's a bit orange. A crossword puzzle is a bunch of black and white squares distributed in a rough grid. Possibly the copyright symbol or the letter C was also important (it is found on many crosswords!).


text:
Possible to use codebase snapshots as input in deep learning?
I'm trying to predict grades within a course at my university. At the moment I manually extracting features, but I'm curious if it's possible to somehow use my entire dataset with a deep learning approach?
I have data from throughout the course of students solving mandatory exercises. All students uses a plug-in within the editor that takes a snapshot of code-base each time the student saves the project (exercise). I also have data from when the students run the debugger. All exercises include tests which determine what score the student will receive on a given exercise. The students are free to execute the tests as many times as they like wile solving the exercise (the final score is given when the students presents the final result to a teaching assistant). Execution and results of these tests are also included in the data. Timestamps exists for all data. I also have the final grade of each student (which is determined 100% by the final exam).
Does anyone know of an approach to use this kind of data with a deep learning approach?


text:
Best way to predict future frame of movie or game?
Using a neural network the method seems to be that you end up with a probability for each possible outcome.
To predict the next frame in a monochrome movie of size 400x400 with 8 shades of gray, it seems like there seems to be: 8^(160000) possibilities.
On the other had if you just predicted the probability for each pixel individually you would end up with some kind of image which gets progressively blurred.
Perhaps what you want is to generate a few possibilities that are none-the-less quite sharp. In a similar way to weather prediction(?)
So how would you go about designing a neural network that takes reads a movie and tries to predict the next frame?


text:
Whats advantages does a Loop Network have over a Feed Forward Network?
I am interested to see what advantages a Loop Network (Feed Forward Network that takes its output as input, I think it's called an RNN, not sure). The only result I found was that it was extremely sensitive to context, but only the context behind it. Other than that, I did not notice any changes.
I figured this would be better for a language processing unit, or one used to make inferences based upon it.
What are the shortcomings of each? Advantages?


text:
Will commercialisation and widespread use of A.I in security and surveillance and other household products threaten free will or endanger privacy?
Everything from facial recognition to the google home is coming equiped with A.I and it is being widely used , If autonomously connected to the internet , will A.I pose a threat to privacy or will it endanger free will if used for surveillance with facial recognition , like in the movie 'Minority Report'

How much is your free will affected by police looking at your face to see if you're a wanted criminal?

Definitely needs an edit, but a solid question.  A. Free will has not been verified, so you should avoid this term. I suspect what you might be indicating is stronger influence over human decisions by sophisticated algorithms.  B. Privacy, this is an issue already, regardless of AI.  AI can certainly be used to exacerbate the problem.  Again, legit question, just needs to be reformulated.

somebody edit/rephrase this : )

@DenizC this is not that , this is where A.I takes decisions based on facts and previous true assumptions


text:
How should I approach the game "Achtung, Die Kurve" ("Curve Fever") using AI?
One of my friends built a version of "Achtung, Die Kurve!", or "Curve Fever" in Python. I was starting to study ML and decided to tackle the game from a learning perspective - write a bot that would crush him in the game. Did some research and found Deep Q learning. Decided to go with that and after a whole lot of throwing around different hyperparameters and layers, I decided I need some help on this. I am new to Deep and Machine Learning in general, so I may have missed things. I was kinda discouraged when I saw that Deep Q is SO impractical currently in the field.
how would you guys tackle this problem? I need some guidance/help building it if someone is up to the task.

Start slowly.
Don't jump straight into Deep Learning, arguably the most complex class in Reinforcement Learning techniques. First work with simpler algorithms, like the original Q-Learning. Define what are good inputs and outputs for your game, and start tuning some hyper-parameters (like future rewards discount factor).
From there, go for Deep Learning. Check other implementations (like DQN, Atari n-step Q-Learning and A3C), and adapt their code to yours, rather than starting from scratch.

Thanks for your answer! I didn't use the original Q learning since the environment constantly changes, and I don't see how a Q-table can work with that, but I'll try your suggestions!

What do you mean, the environment constantly changes? Are you processing image input? Do you mean there is an excessively large state space? You can either pre process the images, or extract features first and use those as input. This is a very common ML step, improving your algorithms input.

I mean that in the game players spawn in random places and as they move, they leave a permanent trail behind them that kills other players if they touch it. My thinking was that Q-tables wouldn't work well with this. Also yes, my input is downized frames in real time. TimeDistributed Conv2D in Keras using 4 frames in 3 channels (different player colors), if that says anything to you.

Yeah, usig raw image pixels as you were probably using works with convolutional layers, but not so well with QTables (too large of a state space). However, you can preprocess the image and obtain simpler states. I.e, extract features from the image and feed a simpler local-perspective grid to QLearning


text:
Feature set out of grayscale Images for training a neural network?
Previously I had trained a Neural Networkupon 20,000 character images. This Neural Net generally works well, it uses RGB- Hue, Saturation, Intensity feature set for training. However, there can be certain character images which have RGB-HSI values that this neural net has not seen before. Therefore I am looking forward to converting training data to grayscale and use some feature set well suited for grayscale images.
So are there any good suggestion for extracting a feature set out of grayscale images.


text:
Abstracting parameters of dynamic model from output time series
I am unable to identify general temrs or specific source of information for the below proposed problem. I would appreciate if the community can guide me to journal articles/books and keywords to look for in literature.
Problem:
There is a non-linear dynamic system taking input and producing 1D time series as output. I would like to use NN to find parameters of the dynamic system, according to the time series output. That is, mapping the features of the time series (after transformation, likely Fourtier Transform or Wavelet) to the parameters governing the dynamics of the system.
Research so far:
I have found a few journal papers mostly processing sounds of rolling bearings or hearbeat but only for error/failure classification.

Rolling Bearing Fault Diagnosis Based on STFT-Deep Learning and SOund Signals
Deep Learning Enabled Fault Diagnosis Using Time-Frequency Image Analysis of Rolling Element Bearings
Deep Learning Based Approach for Bearing Fault Diagnosis
Detecting atrila fibrillation be deep convolutional neural networks

(the above are classification problems, my problem is about parameter identification)
Reason to address this on StackExchange:
I think I am missing overview about the topic (identification of dynamic systems using NN), because I am not able to reach more profound information. Also, I think that NN would be more beneficial to my current application than lets say optimization by evolutionary algorithms, threfore I am specifically asking for NN.

@DuttaA For example, if I have LTI, then I want to recover (at least partialy) the matrix A, as in y = A.x + b.u (x - state vector, u - input). By the way, why is fault detection a problem ? How about those journal papers I have provided (?), they detect/classify faults from the behavior/output of the system.

@DuttaA So any suggestion for my question ?

@DuttaA Thank you, but if you know how journal databases work, providing link is of no use. If you have access, then just search the titles I have provided and you will get exactly the paper I am refering to.


text:
Developing character tactics via repeated trials
Let's assume a common game scenario of several characters in a combat arena. Each character has different strengths and weaknesses. The arena has traps and tools. Suppose the characters had only very basic moves such as step in a direction, shoot, climb, duck, pick up item,  use item, drag heavy object. Each move has a chance of success  based on the context (e.g. range to target). What AI, machine learning, or evolutionary approach could be used to generate personalized tactics for each character based on repeated runs of the scenario?

It depends on how long you want to spend training or if you just want a setup AI that works like a charm the first day.

There are a few ways to tackle this. You could make an AI that is simply a series of IF statements, or you could actually make an AI that would actually take in the situation and come up with a sensible solution.

IF Approach - You make a series of IF statements that come up with a sensible action to execute. This is the method that Minecraft uses. The resulting action were recorded from some of the best players.
True AI - Have your Character execute random actions and learn the consequences of them. The, train it to execute various actions for certain scenarios.

The main difference between these two approaches is that IF statements have a constant and predictable behavior, while the AI approach has a very bad startup value but ends up improving over time.
There is no "best" method, it is up to you to choose one or the other or a mix of both.

Hey, If I missed any other approaches, please put a comment.

I think you missed search methods, which could be used instead of or to augment AI-based methods. Search algorithms are often used for path-finding in game environments, and can easily be extended to other actions than movement, provided there is some heuristic to measure success. There is a strong relation between search algorithms like MCTS and AI planning algorithms.

I suggest starting with a much simpler scenario of a 1v1 linear gladiator combat. Once the AI is developed for the simplest case scenario, it could be expanded to conditions beyond the 1v1, such as 1v2 or multiple opponents in a free-for-all.
The best approach is going to be whatever you are most comfortable programming. A simple neural network implementation would be effective.
The scenario you've listed in your question doesn't have an optimal solution regarding game theory. The game space and the programming methodology will limit any AI solution.


text:
Can you make the first layer of a net have discernible shapes?
Coming from the YT videos of 3blue1brown which showed that the individual layers do not have discernible shapes in the case of hand written letter recognition, I wondered if you could penalize dispersed shapes while training, thus creating connected shapes (at least on the first layer in the beginning). That way, you may be better able to understand the propagation of your algorithm through the layers.
Thanks, Jonny

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


text:
What can be deduced about the "algorithm" of backpropagation/gradient descent?
On this video
Link to video
a neurologist starts by saying that we do not know how neurons calculate gradients for backpropagation.
At minute 30:39 hes showing faster convergence for "our algorithm", which seems to converge faster than backpropagation.
After 34:36 it goes explaining how "neurons" in the brain are actually packs of neurons.
I do not really understand all that he says, so I infer that those packs of neurons (which seem depicted as a single layer) are the ones who calculate the gradient.
It would make sense if each neuron makes a sightly different calculation, and then each other communicate the difference in results. That would allow to deduce a gradient.
What can be deduced, from the presented information, about the purported "algorithm"?? (From the viewpoint of improving convergence of an artificial neural network).

There are 3 separate issues that are often confounded in Deep Learning and Neuroscience:

Deep Learning is inspired by the way the biological brain works.
Deep Learning is how the biological brain works.
Deep Learning can model how the biological brain works.

Number 1 is accurate. The brain has many layers and many connections. Those principles have informed Deep Learning models.
Number 2 has little evidence to support that claim. The biological brain learns at the cellular level in very different ways than how any Deep Learnings system learns.
Number 3 is a current topic of research. Deep Learning is very good at learning patterns. There are good reasons to believe that Deep Learning can learn patterns in the brain. However, those Deep Learning models will not automatically give insight into the biological processes of the brain.
The video is an example of #1. Inspired by our current understanding of neurobiology, let's build better Deep Learning algorithms. These new algorithms might perform better on machine learning benchmarks. However, these algorithms are not better models of the biological brain. In order to understand the algorithms, the language of biology might not be helpful. It might be better to describe them mathematically.

Number 2 is why the video has value for AI. We know that the brain works better than AI, so we want more of Number 1.


text:
Are standard deviation, variance, skew good features for ML?
Pretty simple question here:
Is it useful to use the standard deviation, skew, kurtosis, or any other extrapolatory stats as features, and if so in which problem sets?
In this case, I am talking about deep learning problems.

I would say it is useful if you have an extensive knowledge in the domain you want to apply your model in. You also need more data for it to yield reasonable results.
As for real world uses l can only think of trading at the moment.

Can you give me an example of where in trading it'd be used. I.e. as an observation in an RL agent used for crypto trading.


text:
Crossover in differential evolution for separable and non-separable functions
This article "Enhancing Differential Evolution Utilizing Eigenvector-Based Crossover Operator" said for a non-separable function traditional crossover algorithm are not suitable and they can not diversify the population sufficiently, so the differential evolution stops at the local optimum points. Why does this behavior not hold for separable functions but it exists for non-separable functions? Which key feature of the non-separable functions cause this behavior?


text:
Atrous (Dilated) Convolution: How one can compute responses of arbitrarily high dimensions in DCNN?
According to this paper (page 4, bottom-right), atrous convolutions can be used to compute responses of arbitrarily large dimensions in Deep Convolutional Neural Networks.
I do not understand how something like this is true, since by upsampling the filters, one effectively can apply the filter less times to an image, unless one also upsamples the image. Applying the filter less times as I see it obviously means that the output (response) will be of lower dimensionality.
Is there something that I am missing here?


text:
Is there an alternative to RNNs that doesn't require knowing input history?
In an RNN to train it, you need to roll it out, and enter in the history of inputs and the history of expected outcomes.
This doesn't seem like a realistic picture of the brain since this would require, for example, for the brain to store a perfect history of every sense that comes in to it for many time-steps.
So is there an alternative to RNNs that doesn't require this history? Perhaps storing differences or something? Or storing some accumulator?
Perhaps there is a way to calculate with RNNs that doesn't require keeping hold of this history?

This question should be migrated to: https://datascience.stackexchange.com/.

You don't necessarily need to roll out the inputs to an RNN; doing so makes it easier to optimize computation (if the sequence length is the same each batch), but it's not a necessity. Furthermore, RNNs (and, incidentally, the brain) doesn't necessarily remember the input history as is; rather, the history is encoded via the RNN's cell state (or states, in the case of LSTMs and other RNN cell architectures with multiple states). Neural Turing Machines (NMTs) and Differential neural computers expand on that concept by also using a larger "memory" storage (in the form of a matrix).

I don't think that's true. To train an RNN you definitely need to roll it out. To use a pre-trained RNN you don't.

No, you don't need to unroll the input sequence as long as you're building the computation graph as you go (which all modern ML packages will automatically do). Unrolling a fixed-length input sequence lets you (rather, the ML library) optimize the backpropagation, so it's definitely useful if you have the option, but it isn't a necessity

Are you not saying that the RNN is unrolled behind-the-scenes?

Not in the sense that memory space is reserved for it, no. Rather, the graph is built step-by-step and memory is allocated at each step.

recurrent-neural-networks act on a sequence of inputs , that does not need to be only a time-sequence  for example consider a sequence of characters like a passage or a book.once trained on a sequence of inputs , you could predict the previous and next values of an input-vector at a certain time step.


text:
How long has it taken for autonomous driving cars to be being sold and used on the roads today?
I remember the first time hearing about google trying to make driverless cars.  That was YEARS ago!
These days, I'm beginning to learn about Neural Nets and other types of ML and I was wondering:
Does anybody know how many hours (or days, months, etch) is needed in training time to get the results that are now used in today's self-driving vehicles?
(I am ASSUMING they use Neural networks for this...)

There are a couple of things to consider with this question:
First, training time can be a deceptive measure. Neural network training is considered "trivially" parallelizable. This means that the more computers you have access to, the faster you can train (most of the time, one computation doesn't depend on another, so you can do them both at the same time). Since the start of the current phase of self-driving cars, GPU performance has increased by more than a factor of 5. Further, large companies like Google have migrated to AI-specific ASIC chips. These are faster still. This means any estimate of "time" is likely to be confusing or misleading. The amount of time required to train a network has dropped rapidly over time, even if the number of processing cycles required has stayed the same.
Second, it is very unlikely that self-driving car companies have spent that time training a single model. Instead, they are probably starting from a given model (say, last month's), and trying different approaches to improving it, with new data, alternative training methods, or "expert" domain knowledge. This makes it difficult to reason about what it means to "get the results that are used in today's self-driving vehicles." If we count all the aborted attempts, probably it's on the order of high hundreds or low thousands of person-years of researchers (6-7 years, and there aren't thousands of people working in research in this area). If you also count related development and engineering efforts, it's probably an order of magnitude or more than that.
That said, it might be more interesting to think about the amount of simulated driving time that is needed to train a network in this way. As discussed in this excellent blog post, "Deep Reinforcement Learning Doesn't Work Yet", the amount of training experience required to train a neural net for this kind of problem is extremely large. To learn to play simple Atari games better than human players required about 244 hours of exposure. These games are typically just a single screen, and most humans can pick them up in a couple of minutes or less. This site estimates average time for a human to learn to drive competently at just shy of 70 hours. Applying the same ratio, we can infer that a deep neural net would want something like 2 years of experience driving to achieve human level performance. This seems like the right ballpark, but probably a lot of that driving is done "offline" in a simulated environment, rather than operating the vehicle directly.
Of course, these are just ballpark estimates. The exact figures are likely to be proprietary. Further, there are some reports that modern systems are abandoning neural nets, and moving back to a more "rule-based" paradigm because of the difficulties in training them. I'm not sure how much credit to give those reports, but it again makes it difficult to pin down a training time.


text:
"Vocal captcha" for robots on the phone?
With all the Google I/O stuff coming out, how can I verify that I have an actual human on the phone using only voice? Are there still vocal things humans can, but robots can't do?
Conditions: the person on the phone is a stranger (so personal questions won't work), and the verification must be voice only.
(Also, I understand Google Duplex may be just an overhyped demo that will turn out to flop like the Pixel Buds. But eventually such a bot would be created, right? If so, what's the best verification?)

your question is a very similar to "turing-test". you could narrate a simple story and ask questions based on that , considering the state-of-art algorithms in "question-answering" are still far beyond human skills.


text:
How to combine heterogeneous image features extracted with different algorithms for similar image retrieval?
Say I have access to several pre-trained CNNs (e.g. AlexNet, VGG, GoogleLeNet, ResNet, DenseNet, etc.) which I can use to extract features from an image by saving the activations of some hidden layer in each CNN. Likewise, I can also extract features using conventional hand-crafted techniques, such as: HOG, SIFT, LBP, LTP, Local Phase Quantization, Rotation Invariant Co-occurrence Local Binary Patterns, etc. Thus, I can obtain a very high-dimensional feature vector of an image that concatenates the individual features vectors outputted by these individual algorithms. Given these features, and given a data set of images over which I want to perform similar image retrieval (i.e. finding the top-k most similar images to a query image X), what would be the most appropriate ways to implement this task?
One possible idea I have in mind is to learn an image similarity embedding in euclidean space by training a neural network that would receive as input the aforementioned feature vectors, and perhaps down-sampled versions of the image as well, and output a lower dimensional embedding vector that ideally should place similar images close to each other and dissimilar images far apart. And I could train this network using for example Siamese Loss or Triplet Loss. The challenge of this approach though is generating the labels for the (supervised) training itself. For example, in the case of the Triplet Loss I would need to sample triplets (Q,X,Y) and somehow determine which one between X and Y is most similar to Q, in order to generate the label for the triplet (i.e., in order to "teach" the network I need to know the answers myself beforehand, but how? I guess this is domain dependent, but think of challenging cases where you have very heterogeneous images, such as photography galleries, artwork galleries, etc).
Anyways, this is just an idea and by no means I pretend to mean this is the right approach. I'm open to new suggestions and insights about how to solve this task.


text:
Can translational invariance of CNNs be unwanted if object is likely in certain positions?
Various texts on using CNNs for object detection in images talk about how their translation invariance is a good thing. Which makes sense for tasks where the object could be anywhere in the image. Let's say detecting a kitten in household images.
But let's say, you already have some information about the likely position of the object of interest in the image. For example, for detecting trees in a dataset of images of landscapes. Here in most cases, the trees are going to be in the bottom half of the image while in some cases they might be at the top (because it's on a hill or whatever). So you want your neural network to learn that information -- that trees are likely connected to the bottom part of the image (ground). Is this possible using the CNN paradigm?
Thank you

According to your example:
Trees will likely be in the bottom half of the image. Still, you will not know whether there will be one, two or five trees. Thanks to translation invariance property of CNN's, each tree will activate filters responsible for tree detection. You still need to handle those few exceptions where trees are on hill.
To achieve better results in this particular case, you might want to consider some kind of focus mechanism, that will try to get rid of unwanted part of picture, in case when there are (for example) no hills. Take a look at Spatial Transformer Networks. During training it learns to predict spatial transformation (for example zoom) that will help "main" classifier to predict class of image.

I think, your assumption about the location of trees in images is quite incorrect. Just google image search "landscape" (if not already) and you will see almost equal number of images where the trees constitute top part of the image to those images where they lie in only the middle and bottom part.
Talking about the CNN, it automatically learns (thats the beauty!) the properties of an object which are there in the training images. By properties I mean the object's likely position, location, its shape color etc. If you visualize the CNN layer (mostly later layers) output, using class activated maps, you can see what CNN has learnt and paying attention to. Also, you can visualize the filters (or kernels) that are learned by the CNN.

maybe it was a bad one but the tree was just an example man

Ya I got your point. It goes with pretty much everything except when you use CNN for self driving cars or any specific applications where the object detection area can be defined.


text:
WEKA - SimpleKMeans - Manually choose intitial centres
Is there a way in the WEKA explorer to manually select the initial centres when using SimpleKMeans clustering?

why would you want to choost your centres "manually" , they are assigned at random locations and they are re-assigned after each iteration of the clustering algorithm , so there is no point in "manually" initializing the centres.

I understand that is how they are usually selected. However, I was told I had to set the initial centres for an assignment and could not find a way to do so.

there is an -init option for that
Initialization method to use.
  0 = random, 1 = k-means++, 2 = canopy, 3 = farthest first.
  (default = 0)
kmeans++ will give you an option for you to initialize centres.


text:
Training RL agent on timeseries trading data with Continous Deep Q or NAF
I am writing an MDP based agent that is supposed to learn to place bids and asks in a trading environment. The system requests 2 values (mWh energy and $, both being positive or negative).
Every timestep the agent has a certain volume that it has to either buy or sell.
I tried setting these two values as action values, giving it 4 individual ones (1 for buy price and amount one sell price and amount)
I used the DDPG and NAF agents from keras-rl here but both aren't working for me. I tried a number of reward functions too:

direct cash reward: average price of market for required energy vs what the agent achieved
shifting balancing price: first emphasize that the broker balances it's portfolio (i.e. orders the amount it has to) and later optimize for price per mWh
simple core: as a test I ran a reward function that just rewards the agent to be close to the actions [0.5, 0.55]

All three failed again.

LR : tried between 0.01 and 0.00001
Layers: Tried anything between 1 layer 1 cell and 5 layer 128 cells
Types: I used both Dense and LSTM cells with according input shapes

Symptoms: Generally it looks like the system is not learning anything. I am unsure why. How does the reward function have to be structures to incentivize the system to at least move in the correct direction? Especially the reward that told the agent to be close to [0.5, 0.5] by basing the reward simply on the squared difference to this point should have worked in my eyes.

I recommend you do sanity checks by setting extrema rewards. For example in a buy-sell scenario I would set the buying price to 0 and the selling price to 1, in which case the agent should learn to buy everything. And similarly if the selling price is 0 and the buying price is 1 it should learn not to buy anything. Make your problem very very simple in the beginning and add the complex parts incrementally.


text:
Can this problem be solved by AI?
I am looking in to building a kind of troubleshooting web application. It would be a form that starts with a first question. Depending on the answer, you get a follow up question and so on until the app has qualified your problem in to a small group of problems. To me it sounds a bit like a decision tree but what I have read about them is that it is the internal structure of a model and not what I am looking for. My guess is that a model needs all the input variables at once and not like I am looking for that feeds it one parameter at a time.
At this time I do not know of any data available. With the client we could create the desired resulting problem groups and the questions as well.
Would it be possible to solve this with the help of AI instead of hand coding a lot of case switch statements? If so could you point me to what to read up on?

I could absolutely call it a troubleshooting app. The domain is in vetrenary medicine. Instead of calling the vet you would get the client to fill in this web form. It would determine if it is a serious state of your pet and then let the vet call the client. In other cases it would tell the client to book an appointment later that week. So the information in the app is static but constantly evolving to make better decisions. But that would be a manual task.


text:
Speciation in NEAT - Advantages of keeping stable number of species
I found several methods for setting the compatibility distance in NEAT: some normalize it, some don't, some automatically adjust it.
In a few tests I am running, using normalized static compatibility distance, the number of species increase very rapidly, thus suggesting to adjust (e.g. increase) the compatibility distance.
I haven't found however, how to determine a reasonable number of species for my population, which are the benefits of having lots/few species and which are the benefits of having stable vs mutable number of species?


text:
Genetic Algorithm to Play Arkanoid(Nes) Possible Crossover and Fitness?
I am using the Fceux emulator to create a Genetic Algorithm in Lua to play the 'Arkanoid' game. It is based on Atari Breakout.
A member of my population contains a string of 0's and 1's.(Population size:200).
Consider a member
Every 10 frames a bit is read from the string.(Length of string is about 1000)
If it is 0 the paddle moves left, If it is 1 the paddle moves right for the next 10 frames.
Now I wrote an genetic algorithm that tries to find the best sequence of inputs to play the game.
I have experimented with three types of fitness, One is to achieve maximum score, one is to try to reduce number of blocks to a minimum and the last one is to try to stay alive as long as possible.
None of the three fitness seem to work.
Then I thought that something with my crossover might be wrong.
Every generation, I print out the average fitness of all members. Some generations it increases, while in some generations it decreases.
I have tried changing the population size to 50,100,200,300.
Mutation in my algorithm has a 1% Chance(If Mut_rate=1) that each of the bit will be replaced with its opposite bit.
Now coming to the crossover, I have used yet again many methodologies.
One of them is to just select the top 20% or 30%(cr_rate)(according to their fitness) to pass on to the next generation and killing the remaining ones.
Another method is to add the top percentile to the population and use the remaining population to swap a few bits with top ones and add them into the next generation.
function crossover(population,rate)
    local topp=math.floor(rate*(#population));
    top={}
    for i=1,topp do
        table.insert(top,population[i])
    end
for i=1, #population do
        local p1 = math.random(1,topp);
        local p2 = math.random(1,topp);
        --print(top[p1]);
        --print(top[p2]);
        if top[p1][2] == top[p2][2] then
            local rval = math.random(1, 10) > 5;
                if rval then
                    population[i] = top[p1];
                else
                    population[i] = top[p2];
                end
            elseif top[p1][2] > top[p2][2] then
                population[i] = top[p1];
            else
                population[i] = top[p2];
        end
        population[i][2]=0;
end
--[[
for i=topp+1,#population do
    local p1 = math.random(1,topp);
    local p2 = math.random(1,#population);
    local s='';
    local flag=0;
    s=string.sub(top[p1][1],1,no_controls/2)..string.sub(population[p2][1],(no_controls/2)+1,no_controls);
    population[i][1]=s;
    population[i][2]=0;
 end
  --]]
end

Population is the table of population where each member has an input string and a fitness value.(Sorted , max fitness is first).
Rate is the percentage to select the top performers.
no_controls is the size of input string.
The commented section of the code is where I perform the swap.
Here is the mutation function.
function mutation(population,mut_rate)

    local a=0;
    local b=1;
    for i=1, #population do
        for j=1, #(population[i][1]) do
            if math.random(1, 100) <= mut_rate then
                if string.sub(population[i][1],j,j)=='1' then
                population[i][1] = string.sub(population[i][1],1,j-1)..a..string.sub(population[i][1],j+1);
            else
                population[i][1] = string.sub(population[i][1],1,j-1)..b..string.sub(population[i][1],j+1);
            end
            end
        end
    end
end

Mut_rate is 1. And crossover rate is 0.2 or 0.5.
I have tried changing the mutation rate from 0 to 20.
I have also tried to change the crossover rate  as 0.2,0.5,0.7.
And the fitness using no_blocks, score, time_alive.
When I run the algorithm, the average fitness of the population first increases slightly , then decreases after a few generations and then remains constant forever.
The paddle also seems to be performing  the same moves over and over again, which made be think that there might not be enough variation.
I need help, because I have been stuck on this for a few days now.
I need suggestions on what would be a suitable crossover and mutation function and a perfect fitness function.
Thanks.

What you call a crossover sounds like a selection (likely close to the truncation selection). I may be wrong, but check your implementation and/or understanding.
Apart from that, when the average fitness across the population stops changing it most likely means that the population has converged to a very small region of the search space and now consists of very similar individuals.

Hey, thanks for the reply, if you look closely at the crossover code, i have commented out a section there. That crosses over some members with members of population which adds some variation. and with mutation I think the similar individuals should dissapear slowly.

Selection pressure leads to convergence, unless you select for diversity (novelty search). Convergence on a local optimum is a common problem with generic algorithms. Your may try to mitigate this by enlarging the population size and/or increasing mutation rate (crossover is not considered to be an explorative operator).

Increasing the mutation rate, causes the population to become more random, thereby decreasing the average fitness. I have tried using a population of 400. But it still doesn't make a difference. Even though it has nothing to do with crossover, I think selecting the right crossover method will help to converge to an optimal solution faster.

A high average fitness should not be the goal, because it provides no guarantees about the best solution present, which is usually the most interesting, and a low average fitness does not mean you don't have great solutions. A higher mutation rate will bring you more diversity, thus raising chances to get into a good area of the search space, that's it. A larger population size does the same (don't put duplicates in the initial population).


text:
Detecting Keypoint of 3D model, and distance between them
I am very new to AI, I have a set of 3D human models that I would like to train the algorithm to identify wrist, upper arm, lower arms, etc, and distance between them.
From my understanding, this is a regression problem. But with my very limited knowledge, most tutorial online showing me cat and dog classification problem.
Do you have any clue for me to research next? There are some paper saying to convert the 3D model to image, and use convolutional neural network for training.
p/s: Please don't downvote me, I am too young and too lost in this field.

It depends on the format of your 3D model dataset , if your dataset is made of cad models you could voxelize your dataset and train a convolutional neural network on it , but it could be very time consuming to train 3D convnets . instead you could use a multi view 2D CNN https://arxiv.org/abs/1505.00880?context=cs


text:
Decision tree: more than 2 classes, how to represent elements that are in a class vs ones that aren't?
I'm building a decision tree and would like to separate (for example) the elements that are in class 0 from those in classes 1 and 2, case in point:
df = pd.DataFrame(np.random.randn(500,2),columns=list('AB'))
cdf = pd.DataFrame(columns=['C'])
cdf = pd.concat([cdf,pd.DataFrame(np.random.randint(0,3, size=500), columns=['C'])])
#df=pd.concat([df,cdf], axis=1)
(X_train, X_test, y_train, y_test) = train_test_split(df,cdf,test_size=0.30)
y_train=y_train.astype('int')
classifier = DecisionTreeClassifier(criterion='entropy',max_depth = 2)
classifier.fit(X_train, y_train)
y_pred = classifier.predict(X_test)

C represents the class of an element,A and B are two variables that define the element, how can I build a tree that instead of dividing results into C=0, C=1 or C=2 divides them into C=0 and C!=0?

I don't think that is possible with a decision tree, unless there is some measure of confidence that you can use as a threshold.
I ran into the same problem with the ID3 algorithm. It assigns classes, but you only have the resulting class without any confidence or probability attached.
One possible solution could be to add a number of counter examples as a second (dummy, catch-all) class; if the elements of C = 0 are reasonably tightly clustered and your counter examples for C != 0 cover the remaining problem space, then that might work.


text:
Object recognition by two or more traits that are orthogonal (informally speaking)
I would really appreciate if someone could comment the following method of training neural nets providing them with some meta data (Making them more color prone only if needed, whereas now they're mostly silhouette / outline aware). (Comment and especially giving a reference to some papers, preventing me from reinventing the wheel.)
But let's start at the very begining and say that we're performing simple image recognition and each image has 24 bit color depth, simply 1 Byte per each RGB channel. I'm more eager to use usually bigger pics, sacrifing color quality, however not in all cases (that statement is crucial in this question).
To limit the computational burden I'm NOT keen on using the full information about color (3 Bytes per pixel), but rather shrink it to 1 Byte per pixel and here is the catch:
I'm reluctant neither to use gray scale nor to cast original tints to single (common among all pics) color palette of 256 hues. So I came up with an idea of reversing the method called debayering or demosaicing image from Color Filter Array data).
To achive it, for every pixel only one color channel is preserved.
Because of the human perception of colors, green component is overrepresented covering 50% of pixels, so 25% left for blue and red.
In this particular example below, the upper left pixel correspond to Blue, followed by Green, then Blue, next Green and so on to the end of the row.
The second uppermost row starts with Green, afterwards Red, one more Green, Red and also repeating till the end of line. This horizontal patterns are altering with the parity of the row number, which is nicely depiced on https://en.wikipedia.org/wiki/Bayer_filter from where I've got following graphics:

To better illustrate this method I'm using the thumbnail of famous Mona Lisa painting with its grayscale version next to it. (By the way, it isn't in my training set, but is familiar to everyone).

A greenish leftmost image is the result of applying the reverse debayering / demosaicing CFA method. This picture consist of pixels that are either Blue or Red or Green with different brightness level. In the browser window that could be poorly visible, however if you download this image and magnify it substantially, the patter would be revealed.
Let's say that in the original picture one can find a small square of 2x2 pixels, all of them representing a light skintone 0xF4D374 (in hex). In this grouping, 2 green pixels would be chopped into green channel and will get a value of 0xD3, the blue-related will get a value of 0x74 and the remaining red would get 0xF4.
In the leftmost image below the corresponding pixels were presented by hex colors: 0x00D300, 0x000074 and 0xF40000 respectively, whereas in the right picture exactly the same values (0xD3, 0x74, 0xF4) were shown in grayscal (of 256 possible shades).

After this color-flattening, our input batch has shrinked by two-thirds and at the same time original colors can be more-or-less restored (of course not lossless, but well enough).
However, I don't suppose that anyone had a problem with recognising this picture after transformation. Likewise, all my models could be well trained to recognize outline/silhouette of the object, but they require a way lot more training data (at least one-two orders of magnitude) to be color-aware.
The ultimate question is, how to design models that would threat shape and colors in similar manner. Maybe that would be not in 100% mathematically proper, but shape and color must be orthogonal.
Nevertheless, I don't want to always decode the color, but only if its needed - in ealier epoch it learned sillhouettes/shapes and that there're many similar objects in this regard, so in the next epoch it should pay also / more attention to tints.
Have you encountered articles about such method of using color if object demarcation / labelling process cannot be based only on shape? I would be really gratefull for any paper or other reference.
I'm rather newbie to neural nets, so sorry if this is something widely known to everyone but me ;-)
Thanks in advance for any hint.


text:
How can I simulate responses from the distribution of human intelligence?
I'm eventually looking to build an algorithm that will process answers from humans that are given questions. But first I have to setup an experiment to determine the variety of responses.
Specifically, humans will be asked a multiple choice question that has a single correct answer. I want to understand what kinds/ranges of responses I would get from the bell curve distribution of human intelligence.
Is there any way I can have, say, 1000 "humans" be asked a prompt, repeated 100 times (the same question) and then compile the responses? My concern is that I'll have to build some algorithm or process for each dumb, average, smart "human" to follow but then I would introduce bias in how smart they are or limit how they may respond. I'm guessing I'll have to give them a data sort to work from.
To clarify, it's not the number of times a single user gets a question right that makes them smart, they have to be programmed dumb, smart etc. before the simulation starts. So dumb users could get some right and smart can get some wrong.
I'm not sure the Monte Carlo method is useful here but some type of simulation where I can specify the distribution (normal) and then bound the responses would be helpful.
I have access to Excel, Minitab, and Python. Any ideas how to set up an experiment like this? I really am open to any technique to measure this.

The data you want to collect cannot be reliably simulated at this time. There is no current realistic simulator for a human performing reading comprehension.
The actual error rates and specific wrong answers chosen on the questions will depend to a large degree on specific humans, and the nature of questions. As you are hoping to get realistic results, the only method that will work for your ground truth data is to present 1000+ real humans with your sample questions. In addition, if you want to categorise your humans into "smart", "dumb" etc, you will need to run additional tests on them, such as an IQ test, in order to create those categories.
Depending on context, such as the nature of the questions you want to assess, you may be able to obtain some anonymised data from real-world exams that could help, instead of trying to generate that data yourself. In that case you could make an approximate model for humans answering multiple-choice questions - perhaps by training an LSTM-based natural language model. For best accuracy on your questions you would want the training set to include similar kinds of question. There is still a caveat that NNs do not really do logic or reasoning, they make statistical fits, so can easily get answers logically wrong or select nonsense answers. The best general NLP models still fail badly at semantics.
If you have specific set of questions to evaluate - and are not willing to ignore the content of the questions - then no machine can currently match distribution of human behaviour on such a task without extensive training data and significant effort.
If you don't care about the content of the questions, or assessing their difficulty, or indeed any feedback about the specific questions, then you could maybe use a dataset from any multi-choice questionnaire to get statistics of correct answer accuracy. With this approach your simulation could just be a simple distribution over "correct", "most plausible incorrect" etc answers where you choose "most plausible incorrect" either manually or randomly (but consistently). This will get you a distribution of responses similar to known real-world data. It could be used to unit-test a scoring system perhaps, or demonstrate some stats or visualisation software. But the question and answer text may as well be gibberish at that point.


text:
How to load an image into tensorflow.js code which reads handwritten numbers and clasify them
I'm new to machine learning, so i figured I should look into google's tensor flow guides and I know how to code in JS so that's why I'm using tensorflow.js, there's and example in the guide that trains itslef to recognize handwritten numbers from the  MNIST handwriting dataset, I sort of understand what's going on in the code but since I'm very new to ML it's not a lot, I went through the code and saw that it didn't took image by image to train itself but it requests one sprite which contains all the images and then cuts it into what it needs, this makes sense from a performance point of view, but as this process is kind of abstract I don't understand what's really going on, I want to upload an image of my own and call the predictor of the model but I don't know how to do it, any help?
I was thinking that drawing in a canvas of 28x28 a number might be very interesting as well instead of uploading an image, but I need to know how to test the model once it's trained with my own data.
The tutorial: https://js.tensorflow.org/tutorials/mnist.html

To test the model, you have to achieve a Tensor with the same dimensions as the training data. This Tensor should be the same for the same image, no matter how many times you remake the Tensor with the same image. That being said, you can attempt to reverse-engineer how the Tensors are being made. Hint: The dimensions of the input tensor should be (28, 28, 1).


text:
How to adapt RNNs to variable frequency / framerate of inputs?
Say I have an application where the frequency of the input is known but can vary widely across sequences. For example, they may be audio recordings acquired at different frequency, or videos that come from surveillance cameras whose framerate can vary from 24fps down to as low as 1fps.
The straightworard thing to do would be to either

resample inputs to a constant frequency
ignore input frequency and hope the RNN will figure it all out

None sound very appealing. Is there a better way to handle variable input frequency in RNNs?

Could you be more specific about the nature of the application, because I don't think there is a general answer here? For instance, You cannot realistically expect to perform certain tasks on video at 1fps regardless of the analysis technology - e.g. try to estimate speed of object moving through the view when only one frame captures that it was there in the first place.

@NeilSlater For audio, it could be a speech-to-text task. For video, you could imagine to offer an action detection software solution that would not enforce an fps to the client. Obviously you would expect that a lower framerate degrades the precision of the predictions -- otherwise you might just as well resample all records to 1fps.

There is "variation" and then there is "completely different problem".I cannot give a full answer here (not enough experience with RNNs), but would actually expect a difference of over an order of magnitude in sampling rates is going to have such a deleterious effect that you will want more than one solution, and not attempt to build a single application. Smaller changes, or dealing with an over-abundance of data (e.g. 120fps in 4K resolution from a broadcast-quality camera, where you would downsample just to reduce processing costs) are probably OK.


text:
What is the purpose of "reshaping it into the shape the network expects and scaling it so that all values are in the [0, 1] interval."?
I am a deep learning beginner recently reading this book "Deep learning with Python", the example explains the process of implementing a greyscale image classification using MNIST in keras, in the compilation step, it said,

Before training, we’ll preprocess the data by reshaping it into the shape the network expects and scaling it so that all values are in the [0, 1] interval. Previously, our training images, for instance, were stored in an array of shape (60000, 28, 28) of type uint8 with values in the [0, 255] interval. We transform it into a float32 array of shape (60000, 28 * 28) with values between 0 and 1.

Images stored in an array of shape (60000, 28, 28) of type uint8 with values in the [0, 255] interval. For my understanding, the values are between 0-255 of each px and storied as 3D matrix. Can someone explain why needs to "transform" it into the network expects by scaling it and make "all values are in the [0, 1]interval."?
Please also make suggestions if I didn't explain some parts correctly.

It is not mandatory to rescale from [0,255] to [0,1]. Instead, first layer of the NN can adjust its weights. It is the same a value in range [0,255] with w=0.01 than a value in range [0,1] with w=2.55. Rescale is only mandatory if the NN implementation has some restrictions in the input values.

The purpose of rescaling  gradient descent problems is to reframe the problem for quicker convergence / calculation of linear coefficient parameters.  in the Stanford video series, Andrew Ng provides a intuitive explanation and enables one to hone an intuitive understanding.
Multivariate input regression gradient descent converges faster when the inputs are in the same order of magnitude.  For example, if predicting house prices based on X1= the number of rooms and X2= area of the home in square feet.  X1 is on scale of 0-6 bedrooms and and X2 is typically 1000-3000 square feet.  Given the diffence in magnitude, this problem is a good candidate for feature scaling.

T'is easy, but misunderstood. What they mean is to map it from the range of 0-255 to the range of 0-1. This means that 0 would be 0, and 255 would be 1.
The code for this is as such in javascript:
function map (num, in_min, in_max, out_min, out_max) {
  return (num - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

Use the function, like this:
var num = 5;
console.log(map(num, 0, 255, 0, 1)); // 0.0196078431372549
var num = 150
console.log(map(num, 0, 255, 0, 1)); // 0.5882352941176471

Iterate over the entire image, and use the function (or you programming languages equivalent) on every egg or each pixel.
By doing so, all values are in the 0,1 interval. Next, all you have to do is to feed it to the network.

thanks for your explanation it's quite clear now, but why need to do this step for

Or simply divide by 255.0


text:
How to build my own dataset and model for an LSTM neural network
I have a sort of mathematical problem and I'm not sure which model I should choose to make an LSTM neural network.
Currently in my country, there is a system in which certain groups of researchers upload information on products of scientific interest, such as research articles, books, patents, software, among others. Depending on the number of products, the system assigns a classification to each group, which can be A1, A, B and C, where A1 is the highest classification and C is the minimum.
The classification is done through a mathematical model whose entries are, the total number of each product, the total sum of all products, number of authors, among other indices that are calculated with the previous values.
Once the entries are obtained, these values are processed by a set of formulas and the final result is a single number.
This number is located in a range provided by the mathematical model and this is how the group is classified.
What I want to do is given the current classification of a group, give suggestions of different values to improve their classification.
For example, if there is a group with classification C, suggest how many products it should have, how many authors, what value should its indexes have, so that its category would be finally B.
I think the structure of my network should be:
-1 input, which would be the classification you want to get.
-Multiple output, one for each product and indexes.
But I do not understand how to make the network take into account the current classification of the group, in addition to the number of products and the value of the current indexes.
If you have further questions about the problem, please feel free to ask.
I appreciate your suggestions.

why do you want to use LSTM network?
lstm is a variant of a recurrent neural network , recurrent neural networks are used for "sequential" tasks , i.e the dataset should have some sequential structure , like poems , songs etc.
Your model should be a simple classifier , once you fit a simple classifier , like a decision forest on the categories dataset  products ,authors etc , you will have a  model that will predict the class based on these attributes then you can say from the decision boundaries of the model what values you must have . if the relationship between the attributes is even more simpler you could try plotting distribution plots.

I thought I could use it because I felt that my NN should have memory to make accurate recommendations. For example, if there is a group of lawyers the system should not recommend them to make medicine articles, but it could be a valid recommendation if they have products related to medicine in the group´s profile.
Is it still a simple classifier if I have a model with one entry, which would be the classification and 100 outputs each representing a product and its respective quantity to achieve this classification?

If you want to vary definitions of outcome, the problem is more about optimal segmentation/clustering and not a classification.
For clustering you could try latent class approaches.


text:
How do to mitigate or design out hidden feedback loops when designing ML systems?
Two months ago, I've found myself working on a churn detection problem which can be briefly described as follows:

Assume the current date is N
Use customer behavior for N-1,..N-x dates to develop training dataset
Train model and make prediction at time N, predicting if a customer will churn at N+2 (thus allowing data N+1 for churn prevention / reduction campaign)

When thinking through the design of the model and considerations for how to ensure that it would be successfully implemented, I identified a feedback loop wherein the prediction would trigger an event resulting in interaction with customer, potential changes to customer behavior and thus an impact on the next set of prediction data.  The following sequence of events could occur if successful (as an example):
Prediction -> Action to retain customer -> Change to customer behavior ->
Data for next prediction cycle not representative of training ->
Incorrect prediction and cost associated for handling incorrect prediction

The feedback loop, fundamentally is that the action taken based on the prediction may impact the distribution or nature of features used to make the prediction.
When thinking through the how to solve the feedback problem I had listed the following three points as potential solutions:

Retrain, test and validate model at every N+1 period and account for changes in behavior through new features (e.g. feature_i would involved details of the retention campaign a customer was treated to)

This would result in huge production overhead and I believe to be infeasible

Run the model intermittently to allow behavior to normalize

Possible, however business would not be happy to have a prediction model which only works k times a year where k would have to be determined

Predict the impact of the retention intervention and remove it from or the training set or include it as a new feature

Possible, extensive thought and some experimentation needed to determine whether modeling the retention out or in would have the better effect.  Additionally, if modeled in, there may a short term penalty incurred as the model learns the new feature

I did not actually end up having to confront the feedback problem (as during the exploration phase, sufficient evidence was obtained indicating that a predictive model for churn detection would not be required), however after reading this paper on the technical debt which could be incurred during the development of the machine learning systems I found myself pondering:

Were my considered strategies for dealing with the feedback reasonable?
What other solutions should I have considered?
Is there a way I could have re-framed the problem to completely design out the feedback loop (may be difficult to answer with the information provided, but if possible, but a "you could have considered looking at..." would be extremely beneficial)

Have you had a chance to think of a solution for this?


text:
What is a "generalized" machine learning algorithm?
What does it mean when it is said that Machine Learning algorithm results can be "generalized"?
I don't understand what "generalized" algorithms, routines or functions are.
I have searched dictionaries and glossaries, and cannot find an explanation. Also, if anyone can tell me where a good source for this type of thing is? I am writing about AI and ML.

Where did you find this term/expression? Examples?

The brief answer is: generalized machine algorithm is an algorithm that can do well and give good results in new data that never seen before

Using the adjective generalized with algorithms, routines, or functions is obscure.  The more appropriate term is generic.
Generics began with early loaders, before full fledged operating systems were developed.  The idea was that a module could be loaded into computer memory and the loader was able to perform its function whether the information being loaded was a program, a routine called from a program, an update of the loader, or data to be used by a program.  This abstraction was mostly the brainchild of mathematicians such as Kurt Gödel and John von Neumann, both of whom contributed to the same kind of generic representations in the field of abstract algebra.
The ideas of generics spread to the development of file systems.  When LISP was developed, the deliberate blurring of the distinction between programs and data was built into the low level functions for working with both.  Functional programming developed into higher levels of abstraction in the LISP community.
The idea of generics was introduced into C++ by James Coplien using the term idiom to solve maintainability and readability issues with early clumsy attempt at generic programming using the C pre-prossessing directives.  The first highly usable form of generics appeared in Alexander Alexandrovich Stepanov's standard templates library (STL), developed at SGI. Frameworks like COBRA and DCOM were designed to permit generic messaging.
Generic programming constructs spread to Java and then to other languages.  Many algorithms are written generically, such that the actual object types with which the algorithm works are not known until the template is employed at compile time.
The multilayer perceptron is a generic learning component, parameterized by a specific numerical representation for forward signal propagation, numerical representation for backward corrective signalling, layer depth, widths and activation functions for each layer, learning rate, and other hyper-parameters.  (What are called network parameters are not parameters of the generic network but parameters of that control the mix of inputs into each layer and become the primary data output of the learning process.)
The other artificial network types are similar in this respect.
Even the cell types can be a type parameter in a network.  See Neural Network Cell (Node) Types.
The question, "What does it mean when it is said that Machine Learning algorithm results can be generalized?" cannot be intelligently answered.  Generalizing results is too general a description of what can be done to results to mean anything.  It may just be rhetorical.
There are no universally, "good source[s] for this type of thing." There are many excellent sources for very specific things buried within a hundred times the volume of marginally correct and educationally barren sources.  If you don't have the time to scrutinize what you are reading to carefully extract the gems, then it might be wise to attend some courses at a well respected university to get a more solid foundation from a more reliable source than the Internet.

A machine learning model is said to "generalise" when it performs equally well on both train and test datasets.
For any supervised machine learning algorithm to work well, you train it on a large dataset (train) and evaluate its performance on a dataset whose probability distribution is similar to that of train set but not a part of the train set. This set is called "test" set , then the performance is evaluated on this set, if both train and test accuracies are almost same then the model is said to generalise well, if the training accuracy is much higher than that of test accuracy then the model in some way "memorises" the train set and called "overfitting".


text:
Restoration of localized damaged areas (time signals, but guess also applicable to images)
I am starting to study the capabilities of neural networks for the reconstruction/restoration/... of communication signals.
I am feeding my neural network with a signal which has some parts which have been damaged because of the transmission through a communication system, and my targets are given by the signal with these areas undamaged.
The problem is that the areas damaged represent a very small portion of the whole signal, and my neural network spends lot of time learning only from the portions which actually do not present any problem.
Is there any solution to make the neural network to jump on those areas which show significant differences to respect to the targets? Is there anything I could do for example initializing my neural networks (as conventionally done, they are initialized randomly)? Or shall I accept that I need to train for longer time?

Can you give more details about the network , in particular , the architechture , learning rate used , etc

So , you want to remove the "noise" (damaged signal) from the signal, by giving the perfect signal as output. This model is called as a "denoising autoencoder". If you have enough training data, the noise is not at all a problem for the neural network , if you really feel that the network is capturing the noise , then you have to increase the training epochs , or sometimes it can be a bad initialized network.

Hi, thanks for your answer. The differences between the damaged signal and the training signal do not come from noise, but are due to a nonlinear operation which acts only on certain areas. Though it is not this case, an amplitude limiter would be a good example of what I am trying to deal with.


text:
Neural network architecture for line orientation prediction
Imagine that a line divides an image in two regions which (slightly) differ in terms of texture and color. It is not a perfect, artificial line but rather a thin transition zone. I want to build a neural network which is able to infer geometrical information on this line (orientation and offset). The image may also contain other elements which are not relevant for the task. Now, would a classical CNN be suitable for this task? How complex should it be in terms of number of convolutions (and number of layers, in general)?

Do you have any requirements about the format of the network's output? Perhaps the orientation can be expressed in terms of the sine of the angle relative to the horizontal axis. Also, maybe it would be worth preprocessing the images with an edge detector before feeding them to the net.

No, I don't have any requirements. I am not sure about the edge detection because the texture can be useful in distinguishing the two areas

How large are the images? Are they all the same size? Also, your filter size would probably depend on the width of the transition zone.

When you say offset, do you mean offset from one of the edges of the image? How should that be measured if the line is slanted?

The images are 320x215. By offset I mean the point where the line meets the bottom side of the image, but it can be defined in other ways

A long shot: these guys have worked on a problem that might be relevant. They define "semantic" lines as lines delimiting significant regions or objects in an image. To detect such lines, they use the conv layers from a pre-trained VGG16 net and then add their own layers on top. The cool thing about their approach is that they run both classification and regression in parallel on the same network.
You might be able to adopt a similar technique to determine where the line is, and then run some simple analysis on the extracted line to determine the offset and the orientation.


text:
Why do we have to solve MDP in each iteration of Maximum Entropy Inverse Reinforcement Learning?
Gradient in Maximum Entropy IRL requires to find the probability of expert trajectories given the reward function weights. This is done in the paper by calculating state visitation probabilities but I do not understand why we can’t just calculate the probability of a trajectory by summing up all the rewards that are collected following that trajectory? The paper defines the probability of a trajectory as exp(R(traj.)/Z. I do not understand why we have to solve MDP for calculating that.


text:
How to quantify the reflectance in an image?
I am working on a problem where I have to train a CNN to recognize different kinds of surfaces. One important characteristic of the surfaces I am interested is is how reflective they are. I have been trying to find a method that quantifies how "shiny" a surface is, but I have not found much. I am hoping that someone can point me toward a method or some research into this kind of problem.

It would be difficult to determine how shiny a surface is in absolute terms without a reference value of some sort, but you could probably estimate the relative reflectance by comparing the apparent luminance of surfaces with the background luminance (I would expect shinier surfaces to appear brighter). However, this depends on a lot of factors, mainly orientation (if a surface is facing away from a light source, it would appear darker) and internal illumination (what is the reflectance of a light bulb when it is turned on?).

You should first know about the layer-wise working of a convolutional neural network. Read this https://distill.pub/2018/building-blocks/
Each layer of a cnn forms representations that are increasingly complex , which are  combinations of simpler representations formed by its previous layers.
"shine" is not a pattern (from image processing perspective). shine occurs due to change in intensity values.
And for quantifying "shine" you dont have to go for convolutional networks only , there are many more simpler methods for such tasks you could try fitting simple linear model and progress towards more complex ones.
and for classifying textures , there is interesting work going with "invariant scattering convolutional networks" you should check that.


text:
An AI that asks questions?
Typical AI these days are question-answering machines. For example, Siri, Alexa and Google Home. But it is always the human asking the questions and the AI answering.
Are there any good examples of an AI that is curious and asks questions of its own accord?

That's a good question. I'm not aware of anything at the moment and It's not immediately obvious how that can be achieved. There was that thing with facebook a while back where AI was able "communicate" using a generated "language". An AI asking questions assumes it has something it's trying to solve. And how could it communicate the question that properly represents the "missing information". A peek into Baye's Theorem gives us some direction on how to solve this - https://en.wikipedia.org/wiki/Bayes%27_theorem

Here is a related question.

You are referring to 'proactive AI' as opposed to 'reactive AI' like Alexa, Cortana, Siri, Bixby, Google Assistant, and others.  There hasn't been much progress in this area of AI.  Google's recent demonstration of Duplex addresses this to some extent.  Some chatbots are proactive. Genesys provides such capability.  Check out their video
Azure's bot service has a page on how to implement proactivity and there is another video that walks through the whole process: Learn to build Proactive Bot in 30 Minutes.

It's certainly possible to create AI systems that ask questions.  Various forms of expert systems and diagnostic support system applications already do that.  As to the question of whether or not they are curious, that's one I'll leave to the philosophers.  But it is absolutely possible to create an AI that attempts to reason out a solution to a problem, find that it is unable to generate an acceptable answer, and then prompts the user for more information.
One context where this can be done is Abductive Inference systems for medical decision making. I'd refer you to Abductive Inference Models for Diagnostic Problem Solving by Reggia and Peng, or Computer Assisted Medical Decision Making 1 by Reggia and Tuhrim for more on that specific point.

One of the simplest examples that I can think of is "Akinator". At the heart it uses decision trees to narrow down the search. It is not a "questioning" model like QA models used in Alexa, but it does asks questions.


text:
How to visualize/interpret text prediction model results?
I am using LSTM model to predict the next xml markup from an input seed.
I have trained my model on 1500 xml files. Each xml file is generated randomly. I am wondering if there is a way to visualize the predicted results in a form of a graph or maybe is it meaningful to do so ?
Since we can do the visualization of classification results, for example in this
link
I have done some research on Internet, I have found that there is the confidence measure that can be useful for text prediction task.
I am a bit confused what to do with the text results that I got.


text:
deep learning, memorizing the input data not learning
I have 1000 data sentences in Turkish like "a esittir b arti c".
The example sentence means "a = b + c". I basically want to translate mathematical Turkish sentences into math equations.
For example, i have 6 sentence data.

sentence ("a esittir b arti c") means "a = b + c"
sentence ("b esittir a arti d") means "b = a + d"
sentence ("a esittir c arti d") means "a = c + d"
sentence ("c esittir b arti b") means "c = b + b"
sentence ("d esittir b eksi c") means "d = b - c"
sentence ("d esittir a arti c") means "d = a + c"

After I train my neural network according to data above, when I want the result of "d esittir a arti b", It doesn't give me "d = a + b" where it is supposed to give.
so its more like memorizing.
My network is not big. I forced it to be small in order to make it unable to memorize. However, it didn't solve my problem.
My network (seq2seq RNN-LSTM Encoder Decoder type) is working good enough on equations which have 2 3 or 4 variable (like a = a , a = a + b , a = a + b + c). what I told you above is just an example smaller version of my problem.
I use Adam learner and CNTK library if it is important.
what do you suggest for me to do to be able to get the correct results?

Can you add your code and data samples to your question so it would be easier to evaluate what went wrong?


text:
How to solve problem: pairwise grouping to maximise score
Sorry, the title is bad because I don't even know what to call this problem.
I have a set of n objects {obj_0, obj_1, ......, obj_(n-1)}, where n is an even number.
Any two objects can be paired together to produce an output score. So for instance, you might take obj_j and obj_k, and pair them together giving a score of S_j,k. All scores are independent, so the previous example doesn't tell you anything about what the score for combining obj_j and obj_i, S_j,i might be.
There is no ordering in the combination, so S_j,i and S_i,j are the same.
All scores for all pairing possibilities are known.
The whole set of objects is to be taken and organised into pairs (leaving no objects unpaired). The total score, S_tot is the sum of all scores of individual pairs.
What's the most efficient way to find the score-maximising pairing configuration for a large set of such objects? (does this problem have a name?)
Is there a method which works with the version of this problem where objects are grouped into triplets?

It seems similar to N-grams

Thanks @kiner_shah
For anyone interested, I've found this: https://en.wikipedia.org/wiki/Vehicle_routing_problem
If you search for "Set partitioning problem" you'll find what I was looking for


text:
How do GAN's generator actually work?
I have implemented DCGAN's myself and have been studying GAN's for over a month now. Now I am implementing the pggans but I encountered a sentence

When we measure the distance between
  the training distribution and the generated distribution, the gradients can point to more or less random
  directions if the distributions do not have substantial overlap  (https://arxiv.org/pdf/1710.10196.pdf)

but we do never compare the distribution between training and generated distributions in gans a far I know when we train the gan
fixed_noise = to.randn(num_test_samples, 100).view(-1,100, 1, 1)
for epoch in range(opt.number_epochs):
D_losses = []
G_losses = []
for i,(images, labels) in enumerate(dataloader):
    minibatch = images.size()[0]
    real_images = Variable(images.cuda())
    real_labels = Variable(to.ones(minibatch).cuda())
    fake_labels = Variable(to.zeros(minibatch).cuda())
    ##Train discriminator
    #First with real data
    D_real_Decision = discriminator(real_images).squeeze()
    D_real_loss = criterion(D_real_Decision,real_labels)
    #with fake data
    z_ = to.randn(minibatch,100 ).view(-1, 100, 1, 1)
    z_ = Variable(z_.cuda())
    gen_images = generator(z_)
    D_fake_decision = discriminator(gen_images).squeeze()
    D_fake_loss = criterion(D_fake_decision,fake_labels)

    ## back propagation

    D_loss = D_real_loss + D_fake_loss
    discriminator.zero_grad()
    D_loss.backward()
    opt_Disc.step()

    # train generator
    z_ = to.randn(minibatch,100 ).view(-1, 100, 1, 1)
    z_ = Variable(z_.cuda())
    gen_images = generator(z_)

    D_fake_decisions = discriminator(gen_images).squeeze()
    G_loss = criterion(D_fake_decisions,real_labels)

    discriminator.zero_grad()
    generator.zero_grad()
    G_loss.backward()
    opt_Gen.step()

we just train the discriminator on real and fake images, and then train generator on the outputs of discriminator on generated images,
So Please let me know where do we compare the distribution between training and generated distribution, and how do generator learns to mimic the training samples