text:
Most suitable model for video classification with a fixed camera
Consider a fixed camera that records a given area. Three things can happen in this area:

No action
People performing action A
People performing action B

I want to train a model to detect when action B happens. A human observer could typically recognize action B even with a single frame, but it would be much easier with a short video (a few seconds at low FPS).
What are the most suitable models for this task? I read this paper where different types of fusion are performed in order to feed different frames to a CNN. Are there better alternatives?

It seems you need a spatio-temporal model to learn human-body detection and action.
With regards to interesting papers on the subject I would recommand to look at Vicky Kalogeiton web site.
Her PhD thesis
2017, V. Kalogeiton, Localizing spatially and temporally objects and actions in videos,
basically cover her 3 papers on the subject:

2016, Kalogeiton, V., Schmid, C., and Ferrari, V. Analysing domain shift factors between videos and images for object detection,
[2017a, Kalogeiton, V., Weinzaepfel, P., Ferrari, V., and Schmid, C. Action tubelet detector for spatio-temporal action localization]Kalogeiton 2017a,
2017b, Kalogeiton, V., Weinzaepfel, P., Ferrari, V., and Schmid, C. Joint learning of object and action detectors

summary of Kalogeiton's PhD introduction .
Introduce an end-to-end multitask objective that jointly learns object-action relationships.
The action-object detector leverages the temporal continuity of videos.
Though intra class variations are key and appears as spatial location accuracy, appearance diversity, image quality, aspect distribution, and object size and camera framing.
Actions class refers to an atomic class such as jump, walk, run, climb, etc.
The detector builds anchor cuboids named tubelets and defined as sequences of bounding boxes with associated scores. The action detection spans over a period of time (first and last video frame detected) and takes place at a specific location in each frame. Intra frame action detection can be ambigous. On the other way a sequence bears more information (across class similarities) than a single frame to infer action.
Most previous work uses per-frame object detections, and then leverage the motion of objects to refine their spatial localization or improve their classification.
Contributions

differences between still and video frames for training and testing an object detector among which (see Chapter 3 for more details ):

spatial location accuracy,
appearance diversity,
image quality,
aspect distribution,
camera framing

jointly detect object-action instances in uncontrolled videos using an end-to-end two stream network architecture (see chapter 4 for more details )
propose the ACtion Tubelet detector (ACT-detector), which takes as input a sequence of frames and outputs tubelets, i.e. sequences of bounding boxes with associated scores (see chapter 5 for more details).

this answer could complement mine https://ai.stackexchange.com/questions/1481/how-can-action-recognition-be-achieved?noredirect=1&lq=1


text:
What is the correct input shape for my LSTM network?
My professor gave us a workshop where we have to do classification of a dataset of ECG signals between healthy and unhealthy types using LSTM. Each signal consists of 1,285 time steps.
What my prof did was to cut up each signal into segments 24 time steps long, advancing 6 steps for the next segment. In other words, for the following signal
0, 1, 2, ... 1283, 1284, 1285

It will be cut up into the following segments
0, 1, 2, ... 21, 22, 23
6, 7, 8, ... 27, 28, 29
12, 13, 14, ... 33, 34, 35
...

These segments are the input to the LSTM model for each signal to be classified.
Using the code that my prof used to cut the signal into segments, and feeding that into Tensorflow-Keras InputLayer, it tells me that the output shape is (None, 211, 24).
However, I am told by a classmate that the correct implementation for Tensorflow-Keras LSTM should be (None, 24, 211). He tried clarifying with the prof but it seems the prof doesn't really understand what my classmate's trying to say. I tried to Google but examples I can find online are either of the two cases below:

The format of an input signal should be (None, # timesteps, # features). However, in my problem the signal only has one feature that is chopped up into segments. In this example I found online, there's no mention of segments.
The only example of signals being cut into segments I can find is when each segment is a single input. That is not the case for me. My input is a single signal, cut up into 211 segments which collectively make up a single input.

Which is the correct output shape for my LSTM model? My prof used his method and achieved 96% classification accuracy, and our assignment is to surpass that rate, but when I tested using what my classmate said is the correct shape, my LSTM model with the exact same architecture, hyperparameters etc. gave me a flat 74.04% accuracy from the 1st epoch all the way to the end without ever changing. So which is wrong?

source: Stack Exchange

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

sort: votes


text:
Anyone familiar with Bilateral Recommendation System? And suggest any related papers?
I'm working on Bilateral Recommendation System. But not able to find much related papers. Could anyone suggest any papers relative?
Thanks

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


text:
Why cannot an AI agent adjust the reward function directly?
In standard Reinforcement Learning the reward function is specified by an AI designer and is external to the AI agent. The agent attempts to find a behaviour that collects higher cumulative discounted reward. In Evolutionary Reinforcement Learning the reward function is specified by
the agent’s genetic code and evolved in simulated Darwinian evolution over multiple generations.
Here too the AI agent cannot directly adjust the reward function and instead adjusts its behaviour
towards collecting higher rewards. Why do both approaches prevent the AI agent from changing its reward function at will? What happens if we do allow the AI agent to do so?

Why do both approaches prevent the AI agent from changing its reward function at will?

In RL for optimal control, the reward function is part of the problem formulation. That is, it describes the goals of the agent. Sometimes this is obviously something that should not be under the agent's control, if the reward is a real-world quantity that it should maximise - e.g. the amount of money it makes in profit - then it makes no sense that the agent could arbitrarily declare that the quantity is different to the thing that it observed.
Other times, there is some flexibility, an agent that needs to escape a maze in a short time could have -1 reward per time step inside the maze or -0.1 reward per time step, or +1 reward for escaping with a discount factor applied. However, the flexibility can only go so far before it describes a different problem. Changing the -1 per time step to +1 per time step means that the agent's goal switches from escaping to staying in the maze.
In general, multiplying all the rewards in a MDP by some positive constant does not change a reinforcement learning problem. Sometimes it may be worth doing this scaling to make it easier for a specific approach, such as neural networks, to work efficiently. However, this is not something to put directly under the agent's control, but a hyperparameter like the number of hidden layers in the neural network. As a hyperparameter, usually the reward scaling is very flexible and not something worth spending much effort tuning - unlike the architecture of a neural network.

What happens if we do allow the AI agent to do so?

Unless significant constraints are placed on what is allowed to change, then the agent will get any amount of reward it "wants" by doing anything it "wants", within whatever constraints are placed on changes allowed to the reward function. Typically in RL this would result in an agent that acts more or less randomly whilst getting progressively higher and higher reward on each iteration. Or in other words, an agent that does not attempt to solve any kind of problem.
There are a few special cases where a reward function can be adjusted or learned. One common case is inverse reinforcement learning, where an agent's activities are observed, it is assumed to be solving an MDP-like problem, and you are interested in understanding how it solves it, including what reward function it is using. The reward function must be learned by fitting it to observations of the agent.

both standard RL and ERL maintain a fixed reward structure to ensure stable learning, focus on achieving defined objectives, and prevent the issues associated with reward manipulation. Allowing agents to change their reward functions could lead to unpredictable, misaligned, and potentially harmful behaviors.


text:
Giving an AI a purpose to talk
I am trying to teach my AI to talk. The problem is I'm struggling to find a good scenario in which it needs to.
Some ideas I had were:
"Describe a geometric scene" - Then together with a parser we could see how close the generated instructions came to the official geometric language.
"Give another AI instructions of where to find some food" e.g. "Go straight on passed the box then turn left until you get to the tree. Look under the rock."
Another one might be "Find out more information about a scene by asking questions of another AI in order to navigate a scene blindfolded". This is quite an extreme example!
I need it to talk in formal English sentences (not some kind of made up secret langauge.)
Basically instead of just interpreting a language and following instructions, I want my AI to generate instructions.
So the things I want to teach it are the following:

Ability to ask questions + ability to use the information gathered
Ability to give instructions

Do you know of any projects like this?

I just came across this piece of news yesterday: "This week, Microsoft Research threw down the gauntlet with the launch of a competition challenging researchers around the world to develop AI agents that can solve text-based games."
This seems to be an AI competition announced by Microsoft with the aim to create AI that can solve text-based games. This might give you some inspiration.


text:
Imposing contraints on sequence of image classifications
Are there example implementations of networks that apply constraints across sequences of image classifications where class labels are ordinal numbers?  For example, to cause the output of a CNN to monotonically increase across frames, where the number may increase either more or less steeply but only in one direction across the entire sequence, or as another example, to smoothly vary rather than jumping precipitously from frame to frame. In my first example, the output can jump quickly from one frame  to the next, as long as only in one direction, whereas in my second example, they can either increase or decrease as long as not too "fast" from one frame to the next as if being passed through a low pass boxcar filter. The first is a monotonicity constraint and the second is a smoothness constraint, but in both examples, the key is for adjacent frames to have an effect on the conclusions for a given frame.
Thank you,
Andy


text:
Optimizer effects on neural network with two outputs
I'm confused about the following issue. Let assume that we have a neural network that takes one input and two outputs. I try to visualize my model like as follows:
        / --- First stream    --- > output_1
Input --
        \ ---- Second stream  ---> output_2

I used sgd with momentum. Is there any difference between using one optimizer for both streams and using two optimizers for each stream? In other words, if i use one optimizer, can one stream optimization process affect another stream? If it can, How can it be possible?

Yes you can. You can interpret the two streams as two entirely different NN, that only join at the final. So if you're using softmax, you can then apply a softmax across all nodes, in both streams at the final layer, then do normal cross entropy loss to get the gradient. I'm not sure how well this would work, it is a bit of a strange way of doing this. You might have better luck just keeping the NN whole, and having 2 normal outputs that you apply a single optimiser to


text:
Reinforcement Learning on quantum circuit
I am trying to teach an agent to make any random 1-qubit state reach uniform superposition. So basically, the full circuit will be State -> measurement -> new_state (|0> if 0, |1> if 1) -> Hadamard gate. It just needs to perform 2 actions. That's all. So it's more of an RL problem rather than QC.
I am using reinforcement learning to train the model but it doesn't seem to learn anything. The reward keeps on decreasing and even after 3 million episodes, the agent doesn't seem to converge anywhere. This is how I am training:
def get_exploration_rate(self, time_step):
        return self.epsilon_min + (self.epsilon - self.epsilon_min)*\
               math.exp(1.*time_step*self.epsilon_decay)

def act(self, data,t): #state
        rate = self.get_exploration_rate(t)
        if random.random() < rate:
            options = self.model.predict(data) #state
            options = np.squeeze(options)
            action =  random.randrange(self.action_size)
        else:
            options = self.model.predict(data) #state
            options = np.squeeze(options)
            action = options.argmax()
        return action, options, rate

def train(self):

        batch_size = 200
        t = 0                   #increment
        states, prob_actions, dlogps, drs, proj_data, reward_data =[], [], [], [], [], []
        tr_x, tr_y = [],[]
        avg_reward = []
        reward_sum = 0
        ep_number = 0
        prev_state = None
        first_step = True
        new_state = self.value
        data_inp = self.data

        while ep_number<3000000:
            prev_data = data_inp
            prev_state = new_state
            states.append(new_state)
            action, probs, rate = self.act(data_inp,t)
            prob_actions.append(probs)
            y = np.zeros([self.action_size])
            y[action] = 1
            new_state = eval(command[action])
            proj = projection(new_state, self.final_state)
            data_inp = [proj,action]
            data_inp = np.reshape(data_inp,(1,1,len(data_inp)))
            tr_x.append(data_inp)
            if(t==0):
                rw = reward(proj,0)
                drs.append(rw)
                reward_sum+=rw

            elif(t<4):
                rw = reward(new_state, self.final_state)
                drs.append(rw)
                print("present reward: ", rw)
                reward_sum+=rw
            elif(t==4):
                if not np.allclose(new_state, self.final_state):
                    rw = -1
                    drs.append(rw)
                    reward_sum+=rw
                else:
                    rw = 1
                    drs.append(rw)
                    reward_sum+=rw

            print("reward till now: ",reward_sum)
            dlogps.append(np.array(y).astype('float32') * probs)
            print("dlogps before time step: ", len(dlogps))
            print("time step: ",t)
            del(probs, action)
            t+=1
            if(t==5 or np.allclose(new_state,self.final_state)):                         #### Done State
                ep_number+=1
                ep_x = np.vstack(tr_x) #states
                ep_dlogp = np.vstack(dlogps)
                ep_reward = np.vstack(drs)
                disc_rw = discounted_reward(ep_reward,self.gamma)
                disc_rw = disc_rw.astype('float32')
                disc_rw -= np.mean(disc_rw)
                disc_rw /= np.std(disc_rw)

                tr_y_len = len(ep_dlogp)
                ep_dlogp*=disc_rw
                if ep_number % batch_size == 0:
                  input_tr_y = prob_actions - self.learning_rate * ep_dlogp
                    input_tr_y = np.reshape(input_tr_y, (tr_y_len,1,6))

                    self.model.train_on_batch(ep_x, input_tr_y)
                    tr_x, dlogps, drs, states, prob_actions, reward_data = [],[],[],[],[],[]
                env = Environment()
                new_state = env.reset()
                proj = projection(state, self.final_state)
                data_inp = [proj,5]
                data_inp = np.reshape(data_inp,(1,1,len(data_inp)))
                print("State after resetting: ", new_state)
                t=0

I have tried various things like changing the inputs, reward function, even added exploration rate. I have assigned max time step as 5 even though it should complete in just 2.
What am I doing wrong? Any suggestions?


text:
How to perform Interpretability analysis toward a simple reinforcement learning network
We are currently using a RL network with the following simple structure to train a model which helps to solve a transformation task:
Environment (a binary file) + reward ---> LSTM (embedding)  --> FC layer --> FC layer --> FC layer --> decision (to select and apply a kind of transformation toward the environment from a pool of transformations)
The model will receive a simple reward and also take the input to make the decision. And we have a condition to stop each episode.
So the current workflow, although it is simple, it seems to have learned something and with multiple episode of training, we can observe the accumulated reward for each episode increases. So right now, what we are thinking is to interpret the model, well, a fancy term.
So basically we are thinking to let the model tell us from which component of the Environment (input file), the model somewhat makes the decision to select a transformation to apply. And I have learned a bunch of interpretability articles, which basically use an activation map (e.g., link) to highlight certain components from the input.
However, the problem is that, we don't have any sort of CNN layer in our simple RL model. In that sense, the aforementioned method cannot apply, right? I also learned a number of techniques from this book, but still, I don't see any specific techniques applicable for RL models.
So here is my question, in terms of our simple RL model, how can we do certain "interpretability" analysis and therefore have a better idea on which part of the "Environment" leads to each step of decision? Thank you very much.


text:
Finding the optimal combination of inputs which return maximal output
I am currently working on a problem and now got stuck to implement one of it's steps. This is a simple attempt to explain what I am currently facing, which is something that I am aiming to implement in my regression simulation in python.
Let's say that I fit a non-linear model to my data. Now, I want to find the combination of inputs within a specified range that returns the the highest outcome. When I am using a quadratic function or only a few inputs, this task is quite simple. However, the problem comes when trying to apply the same logic for more complex models. Supposing that I have 9 variables as inputs, I will have to test all possible combinations and that would be computationally unfeasible by doing it with meshgrid if you want to cover a range with a several intervals in between.
So, here it comes my question, is there such a way to avoid having to go through this computationally costly process in order to achieve the combinations of inputs defined in a given range that return the optimal output?

If your model is gradient-based, such as a neural network, then may also be able to use gradient methods to drive virtual inputs:

Freeze all network weights to the trained version
Define a loss function that decribes how you want the output - or any internal measure - to behave. E.g. to maximise the output, the loss function can simply be the negative of the output, assuming you will perform gradient descent later. Some libraries will also support gradient ascent to maximise a function.
Define your input as a variable that can be optimised and instantiate an optimiser (details will vary depending on your library)
Start with a random or best-guess input, and iterate normal training routine (feed forward then backpropagate) to get better and better inputs

This is basically how Deep Dream and Style Transfer algorithms work - the detail that is different is definition of the loss functions. It is also a way to make adversarial attacks against known models, for example taking a picture of a car, modifying it such that a classifier returns that it is an ostrich (whilst it still looks like a car to a human).
It is not guaranteed to find the absolute best inputs for a given range, but should find good approximations of local minima or maxima far faster than a meshgrid when there are many dimensions. You could combine the idea with a coarse meshgrid or random search for start points for a better chance of finding the best results within input range constraints.
You should bear in mind that the ideal inputs you discover will only be as accurate as your trained model will let them be. If you discover maximising inputs in the model, that use inputs that are far away from any training examples, then in reality those inputs might not get anything like the result that the model predicts. Statistical models with many degrees of freedom are typically ok at interpolating between data points, but very bad at extrapolating beyond data that has been observed.


text:
Maximum Single Ply Branching Factor for Legal Checkers Boards
I am writing a checkers move generation function in C that will be extended to Python. It is much easier to handle the possible boards in a fixed size array to pass back to Python.
Basically, I build out possible boards and add them to this array:
uint32_t boards[x][3];

Therefore, the optimal value for x should be the maximum single ply branching factor out of all possible legal board states.
I am not sure if I am being very clear, so here is an example:
For tic-tac-toe this value would be 9, as the first move has the greatest number of possible directly resulting board states, out of all of the legal boards.
Has this value been calculated for checkers? Has a program like Chinook derived a reasonably close number?
Thank you for your help!


text:
Neural network to detect "spam"?
I've inherited a neural network project at the company I work for. The person who developed gave me some very basic training to get up and running. I've maintained it for a while. The current neural network is able to classify messages for telcos: it can send them to support people in different areas, like "activation", "no signal", "internet", etc. The network has been working flawlessly. The structure of this neural network is as follows:
 model = Sequential()
 model.add(Dense(500, input_shape=(len(train_x[0]),)))
 model.add(Activation('relu'))
 model.add(Dropout(0.6))
 model.add(Dense(250, input_shape=(500,)))
 model.add(Activation('relu'))
 model.add(Dropout(0.5))
 model.add(Dense(len(train_y[0])))
 model.add(Activation('softmax'))
 model.compile(loss='categorical_crossentropy',
                  optimizer='Adamax',
                  metrics=['accuracy'])

This uses a Word2Vec embedding, and has been trained with a "clean" file: all special characters and numbers are removed from both the training file and the input data.
Now I've been assigned to make a neural network to detect if a message will be catalog as "moderated" (meaning it's an insult, spam, or just people commenting on a facebook post), or "operative", meaning the message is actually a question for the company.
What I did was start from the current model and reduce the number of categories to two. It didn't go very well: the word embedding was in spanish from Argentina, and the training data was spanish from Peru. I made a new embedding and accuracy increased by a fair margin (we are looking for insults and other curse words. In spanish a curse word from a country can be a normal word for another: in Spain "coger" means "to take", and in Argentina it means "to f__k". "concha" means shell in most countries, but in Argentina it means "c__t". You get the idea).
I trained the network with 300.000 messages. Roughly 40% of these were classified as "moderated". I tried all sorts of combinations of cycles and epochs. The accuracy slowly increased to nearly 0.9, and loss stays around 0.5000.
But when testing the neural network, "operative" messages generally seem to be correctly classified, with accuracy around 0.9, but "moderated" messages aren't. They are classified around 0.6 or less. At some point I tried multiple insults in a message (even pasting sample data as input data), but it didn't seem to improve.
Word2Vec works fantastically. The words are correctly "lumped" together (learned a few insults in Peruvian spanish thanks to it).
I put the neural network in production for a week, to gather statistics. Basically 90% of the messages went unclassified, and 5% were correctly classified and 5% wrong. Since the network has two categories, this seems to mean the neural network is just giving random guesses.
So, the questions are:

Is it possible to accomplish this task with a neural network?
Is the structure of this neural network correct for this task?
Are 300k messages enough to train the neural network?
Do I need to clean up the data from uppercase, special characters, numbers etc?

The Project Summarized
The project goal appears to be a common one: Routing correspondence in an efficient manner to maintain good but low cost customer and public relations. A few features of the project were mentioned.

Neural network project
Received some design and project history from predecessor
Classifies messages for telcos
Sends results to support groups at appropriate locales
Uses 2 relu layers, ending with a softmax
Word2Vec embedding
Trained with a clean language file
All special characters and numbers removed

The requirements for current development were indicated. The current work is to develop an artificial network that places incoming messages into one of two categories accurately and reliably.

Moderated — insulting, fraudulent in purpose (spam), trivial routine
Operative — relevant question requiring internal human attention

Research and development is beginning along reasonable lines.

Trained with 300,000 messages
Word2Vec used
40% of classified as moderated
Permuted cycles and epochs
Achieved 90% accuracy
Loss stays near 0.5
In test, operative accuracy 0.9, moderated accuracy max of 0.6

First Obstacle and Feasibility
The first obstacle encountered is that in QA using production environment data, 90% of the messages where left unclassified, 5% of the classifications were accurate, and the remaining 5% were inaccurately classified.
It is correct that the even split of 5% accuracy and 5% inaccuracy indicates that information learned is not yet transferable to the quality assurance test phase using real production environment messages. In information theory phraseology, no bits of usable information were transferred and entropy remained unchanged on this first experiment.
These kinds of disappointments are not uncommon when first approaching the use of AI in an existing business environment, so this initial outcome should not be taken as a sign that the idea won't work. The approach will likely work, especially with foul language, which is not dependent on cultural references, analogies, or other semantic complexity.
Recognizing notices that are for audit purposes only, from a social network accounts or purchase confirmations, can be handled through rules. The rule creation and maintenance can theoretically be automated too, and some proprietary systems exist that do exactly that. Such automation can be learned using the appropriate training data, but real time feedback is usually employed, and those systems are usually model based. That is an option for further down the R&D road.
The scope of the project is probably too small, but that's not a big surprise either. Most projects suffer from early overoptimism. A pertinent quote from Redford's The Melagro Beanfield War illuminates the practical purpose of optimism.

        APPARITION
I don't know if your friend knows what he's in for.
        AMARANTE
Nobody would do anything if they knew what they were in for.

Initial Comments
It is not necessary to reduce the number of message categories to two, but there is nothing wrong with starting R&D by refining approach and high level design with the simplest case.
The last layer may be more training efficient if a binary threshold is used for the activation function instead of softmax, since there is only one bit of output needed when there are only two categories. This also forces the network training objective to be the definitive selection of a category, which may benefit the overall rate of R&D progress.
There may be ways of improving outcomes by adding more metrics in the code to beyond just 'accuracy'. Others who work with such details every day may have more domain specific knowledge in this regard.
Culture and Pattern Detection
Insults and curse words are entirely different kinds of things. Foul language is a linguistic symbol or phrase that fits into a broadcasting or publishing category of prohibition. The rules of prohibition are well established in most languages and could be held in a configuration file along with the permutations of each symbol or phrase. In the case of sh*t, related forms include sh*tty, sh*thead, and so on.
It is also useful to distinguish the sub-sets of foul language.

Cursing (expressing the wish for calamity to befall the recipient)
Swearing (considered blasphemy by some)
Exclamations that are considered foul by publishers and broadcasters
Additional items parents don't want their children to hear
Edge cases like crap

The term foul language is a super-set of these.
Distribution Alignment
Learning algorithms and theory are based on probabilistic alignment of feature distributions between training and use. The distribution of training data must closely resembles the distribution found when the trained AI component is later used. If not, the convergence of learning processes on some optimal behavior defined by gain or loss functions may succeed but the execution of that behavior in the business or industry may fail.
Internationalization
Multilingual AI should usually be fully internationalized. Training and use of training with two distinct dialects will almost always perform poorly. That creates a data acquisition challenge.
As stated above, classification and learning depend on the alignment of statistical distributions between data used in training and data processing relying on the use of what was learned. This is also true of human learning, so this requirement will not likely be overcome any time soon.
All these forms of foul language must be programmed flexibly across these cultural dimensions.

Character set
Collation order
Language
Dialect
Other locale related determinants
Education level
Economic strata

Once one of these is included in the model (which will be imperative) then there is no reason why the others cannot be included at little cost, so it is wise to begin with standard dimensions of flexibility. The alternative will likely lead to costly branching complexity to represent specific rules, which could have been made more maintainable by generalizing for international use up front.
Insult Recognition
Insults require comprehension beyond the current state of technology. Cognitive science may change that in the future, but projections are mere conjecture.
Use of a regular expression engine with a fuzzy logic comparator is achievable and may appease the stakeholders of the project, but identifying insults may be infeasible at this time, and the expectations should be set with stakeholders to avoid later surprises. Consider these examples.

The nose on your face looks like a camel.
Kiss the darkest part of my little white. (From Avatar screenplay)

The word combinations in these are not likely to be in some data set you can use for training, so Word2Vec will not help in these types of cases. Additional layers may assist with proper handling of the at least some of the semantic and referential complexity of insults, but only some.
Explicit Answers to Explicit Questions

Is it possible to accomplish this task with a neural network?

Yes, in combination with excellence in higher level system design and best practices for internationalization.

Is the structure of this neural network correct for this task?

The initial experiments look like a reasonable beginning toward what would later be correct enough. Do not be discouraged, but don't expect the first pass at something like this to look much like what passes user acceptance testing a year from now. Experts can't pull that rate of R&D progress off, unless they hack and cobble something together from previous work.

Are 300k messages enough to train the neural network?

Probably not. In fact, 300m messages will not catch all combinations of cultural references, analogies, colloquialisms, variations in dialect, plays on words, and games that spammers play to avoid detection.
What would really help is a feedback mechanism so that production outcomes are driving the training rather than a necessarily limited data set. Canned data sets are usually restricted in the accuracy of their probabilistic representation of social phenomena. None will likely infer dialect and other locale features to better detect insults. A Parisian insult may have nothing in common with a Creole insult.
The feedback mechanism must be based on impressions in some way to become and remain accurate. The impressions must be labelled with all the locale data that is reasonably easy to collect and possibly correlated to the impression.
This implies the use of rules acquisition, fuzzy logic control, reinforcement learning, or the application of naive Bayesian approaches somewhere appropriate within the system architecture.

Do I need to clean up the data from uppercase, special characters, numbers etc?

Numbers can be relevant. Because of historical events and religious texts, 13 and 666 might be indications of something offensive, respectively. One can also use numbers and punctuation to convey word content. Here are some examples of spam detection resistant click bait.

I've got a 6ex opportunity 4u.
Wanna 69?
Values are rising 50%! We have 9 investment choices 4 you to check out.

The meaning of the term special character is vague and ambiguous. Any character in UTF-8 is legitimate for almost all Internet communications today. HTML5 provides additional entities beginning with an ampersand and ending with a semicolon. (See https://dev.w3.org/html5/html-author/charref.)
Filtering these out is a mistake. Spammers leverage these standards to penetrate spam detection. In this example, the stroke similarities of a capital ell (L) and those of the British pound symbol can be exploited to produce spam detection resistant click bait.

Do you like hot £egs?

Removing special characters that fit within the Internet standards of UTF-8 and HTML entities will likely lead to disaster. It is recommended not to follow that part of the predecessor's design.
Regarding emoticons and other ideograms, these are linguistic elements that may represent in text encoding the volume, pitch, or tone modulation of phonetics, or they may represent face or body language. In many languages ideograms are used in place of words. For a global system running in parallel with the blogsphere, emoticons are part of linguistic expression.
For that reason, they are not significantly different than word roots, prefixes, suffixes, conjugations, or word pairs as linguistic elements which can also express emotion as well as logical reasoning. For the learning algorithm to learn categorization behavior in the presence of ideograms, the ideograms must remain in training features and later in real time processing of those features using the results of training.
Additional Information
Some additional information is covered in this existing post: Spam Detection using Recurrent Neural Networks.
Since spam detection is closely related to fraud detection, the spammer fraudulently acting like a relationship already exists with their recipients, this existing post may be of assistance too: Can we implement GAN (Generative adversarial neural networks) for classication problem like Fraud detecion?
Another resource that may help is this: https://www.tensorflow.org/tutorials/representation/word2vec

First your questions:
Yes, it is possible to accomplish this with a neural network, this is actually very similar to your current working model (the idea is the same, just different classes). So, there are no real reasons to start changing the architecture, especially if from what I understand, you are not a deep-learning expert. I mean, I'm sure that you can poke and play with the model to improve it, but that is not your current concern. Right now it seems that your model isn't training properly.
I do think that 300k messages should be enough at least for a decent model (way better than random choice).
There are some standard preprocessing steps that you should perform on your input text (if you haven't already), in general you should normalize (convert to lower case) and remove noise from your text (like special characters). You can read more about different methods in the following link:
Text Preprocessing in Python: Steps, Tools, and Examples
Suggestions and questions:
From your initial explanation, your new model has 2 outputs (moderated and operative), however later you mention that 90% of the input was not classified. So do you have a third class (no-classification) or are you just using some threshold of probability, that only above it the massage is classified? Because if you only have 2 classes, I would suggest to use a binary cross-entropy loss and not categorical.
I have a strong suspicion that there is something wrong with either your training dataset or process. Please provide more info about the dataset (number of samples from each class, how was it labeled) and your training process (are you using part of the data for validation? how many epochs? etc.).

You are correct, I'm far from being an expert. The data was hand labeled. The company has hundreds of agents answering questions and they classified and roughly 40% of them were classified as "moderated", and the rest were different irrelevant classifications that I called "operative" (I also tried classifying with all 10 existing categories, didn't help much either). 90% of the input was indeed not classified because I set a threshold of 0.7, so 90% of the time the threshold was lower than that. The model was trained up to 100 cycles of 100 epochs. A couple of hours training on a GTX1080.

I'm using a 20% validation split as well, and batch size is 500.


text:
neuralnetworksanddeeplearning.com chapter 5 problems
For http://neuralnetworksanddeeplearning.com/chap5.html , could anyone suggest:
1) how to approach the derivation of expression (123) ?
2) what constitutes value ~ 0.45 ?
3) why the need of taylor series when we can observe the identity property without any maths proof (input == output) ?


text:
How do I get a meaningful output value for a simple neural network that can map to a set of data?
I am trying to use a artifical neural network to produce a single output, which in my mind should be an index into a list of data (or close to it). All of the results I get are 0.9999+ and very close to each other. I don't know if my whole way of thinking here is off, or if I am just missing an approach, or if perhaps my network code is just broken.
I am trying to make use of the simple neural network from Microsoft here:
https://social.technet.microsoft.com/wiki/contents/articles/36428.basis-of-neural-networks-in-c.aspx
I have tried this with a significantly more complex data set, but I've also tried using a very simple data set.
Here is the simple training data I'm trying to use:
eat poo bad
eat dirt bad
eat cookies okay
eat fruit good
study poo okay
study dirt okay
study cookies okay
study fruit okay
dispose poo good
dispose dirt okay
dispose cookies bad
dispose fruit bad

The basic idea is that the network has two input neurons and a single output neuron. I assigned a unique number to each distinct word such that I can train the network with two inputs (verb and object), and expect a single output (good, bad, or okay).
Example training:
input: 1 (for eat) 10 (for dirt) output: 15 (for bad)
input: 1 (for eat) 11 (for cookies) output: 16 (for good)

I would expect that after training, I would see the output numbers close to 15, 16, etc, but all I get are numbers like 0.999997333313168, etc.
Example run:
input: 1 (for eat) 10 (for dirt), output is 0.999997333313168 (instead of ~15 expected)

What do these outputs mean, or what am I missing in how I should be thinking about making a basic classification system (given inputs, get a meaningful output)?
The C# code I am using, if it is helpful:
using NeuralNet.NeuralNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuralNet
{
    internal class TestSmallSampleNetwork
    {
        internal static void Run()
        {
            var data = @"eat poo bad
                        eat dirt bad
                        eat cookies okay
                        eat fruit good
                        sell poo bad
                        sell dirt okay
                        sell cookies okay
                        sell fruit okay
                        study poo okay
                        study dirt okay
                        study cookies okay
                        study fruit okay
                        dispose poo good
                        dispose dirt okay
                        dispose cookies bad
                        dispose fruit bad";
            var simples = data.Split(new[] { "\r\n" }, StringSplitOptions.None ).Select(_ => new Simple(_)).ToList();

            var verbs = simples.Select(_ => _.Verb).Distinct().Select(_ => new NetworkValue(_)).ToList();
            var objects = simples.Select(_ => _.Object).Distinct().Select(_ => new NetworkValue(_)).ToList();
            var judgments = simples.Select(_ => _.Good).Distinct().Select(_ => new NetworkValue(_)).ToList();
            var values = verbs.Concat(objects).Concat(judgments).ToDictionary(_ => _.Term, _ => _);

            // Create a network with 2 inputs, 2 neurons on a single hidden layer, and 1 neuron output.
            var net = new NeuralNetwork(0.9, new int[] { 2, 2, 1 });

            for (int iTrain = 0; iTrain < 1000; iTrain++)
            {
                for (int iSimple = 0; iSimple < simples.Count; iSimple++)
                {
                    net.Train(MakeInputs(simples[iSimple], values), MakeOutputs(simples[iSimple], values));
                }
            }

            foreach (var value in values.Values)
            {
                Console.WriteLine(value);
            }

            Console.WriteLine();

            // Run samples and get results back from the network
            Run("study", "poo", values, net);
            Run("eat", "poo", values, net);
            Run("dispose", "fruit", values, net);
            Run("sell", "dirt", values, net);
        }

        private static void Run(string verb, string obj, Dictionary<string, NetworkValue> values, NeuralNetwork net)
        {
            var result = net.Run(new List<double> {
                values[verb].Value,
                values[obj].Value,
            }).Single();

            var good = "xxx";

            Console.WriteLine($"{verb} {obj} {good} ({result})");
        }

        private static List<double> MakeInputs(Simple simple, Dictionary<string, NetworkValue> values)
        {
            return new List<double>() {
                values[simple.Verb].Value,
                values[simple.Object].Value
            };
        }

        private static List<double> MakeOutputs(Simple simple, Dictionary<string, NetworkValue> values)
        {
            return new List<double> { values[simple.Good].Value };
        }

        public class Simple
        {
            public string Verb { get; set; }
            public string Object { get; set; }
            public string Good { get; set; }

            public Simple(string line)
            {
                var words = line.Trim().Split(" ".ToCharArray(), 3, StringSplitOptions.None);
                Verb = words[0];
                Object = words[1];
                Good = words[2];
            }

            public override string ToString()
            {
                return $"{Verb} {Object} {Good}";
            }
        }

        public class NetworkValue
        {
            private static int Next = 1;

            public string Term { get; set; }
            public double Value { get; set; }

            public NetworkValue(string term)
            {
                Term = term;
                Value = Next++;
            }

            public override string ToString()
            {
                return $"{Value}. {Term}";
            }
        }
    }
}

I've discovered Doc2Vec which does something similar to what I am trying to accomplish. This doesn't exactly answer my question of why the network I was trying to build doesn't work, but at least it shows how indexed outputs can be pulled from a network, with open source to show how it is built.
https://datascience.stackexchange.com/questions/23969/sentence-similarity-prediction


text:
Stereo matching using genetic algorithm
I have been reading a few papers (paper1, paper2) on stereo matching using genetic algorithms. I understand how genetic algorithms work in general and how stereo matching works, but I do not understand how genetic algorithms are used in stereo matching.
The first paper by Han et al says that "1) individual is a disparity set, 2) a chromosome has a 2D structure for handling image signals efficiently, and 3) a fitness function is composed of certain constraints which are commonly used in stereo matching".
Does it mean that an individual is a disparity map with random numbers?
Then a chromosome is a block within the individual's disparity map.
The constraint used for fitness function could be the famous epipolar line.
I dont seem to understand how this works and even WHY you should use genetic algorithm on an algorithm that at its simplest form uses 5 for loops, for example, like in here.

Do not understand how genetic algorithms are used in stereo matching.

The first paper referenced in the question is Stereo matching using genetic algorithm with adaptive chromosomes, Kyu-Phil Han, Kun-Woen Song, Eui-Yoon Chung, Seok-Je Cho, Yeong-HoHac, 2000. It summarizes an approach this way.

An individual is a disparity set,
A chromosome has a 2D structure for handling image signals efficiently, and
A fitness function is composed of certain constraints which are commonly used in stereo matching.

The paper also states, "Genetic algorithms are efficient search methods based on principles of population genetics, i.e. mating, chromosome crossover, gene mutation, and natural selection." The extension to genetic algorithm purity is contained in this statement in the paper.

To improve the convergence, an informed generation, that a higher selected possibility is assigned to the chromosome including a smaller intensity difference, is adopted. The informed generation uses several random generations plus a selection. In a random generation, only a value is randomly generated. Yet, the informed generation of the proposed algorithm selects the gene which has the minimum intensity difference among the randomly generated genes.

The question inquires along a few lines.

Does it mean that an individual is a disparity map with random numbers?

The goal is to produce order from chaos through successive mutations, combinations, and tests, arriving at genetic code that represents distances of objects that correspond to a left region of pixels and a right region of pixels. Those two regions are identified through alignment of brightness categories, with some permissible sprinkling of outliers.
An individual in this context is a simulation of a sample from a population with a particular aggregation of genetic codes. The codes indicate disparity between matching image features in the left and right images, measured in horizontal pixels.

[Don't] understand how this works and even WHY you should use genetic algorithm on an algorithm that at its simplest form uses 5 for loops.

The five loops referenced in the question, in the source at github.com/davechristian/Simple-SSD-Stereo, are as follows.
for y in range(kernel_half, h - kernel_half):
    for x in range(kernel_half, w - kernel_half):
        for offset in range(max_offset):
            for v in range(-kernel_half, kernel_half):
                for u in range(-kernel_half, kernel_half):

This exhaustive search has gross shortcomings in relation to the genetic algorithm with informed generation.

The simulation of meiosis in genetic algorithms is essentially a search for hybrids where the best genetic sequences of two parents are preserved in the offspring.
Genetic algorithms are easy to scale across computer clusters without developing specialized hardware acceleration.
Components of failed compositions are not eliminated in an exhaustive search, so there is considerable redundancy in trials.

The second paper referenced in the question is Genetic Stereo Matching Algorithm with Fuzzy Fitness, Haythem Ghazouani, 2014. It proposes, "To get around [convergence speed] limitations, we propose a new encoding for individuals, more compact than binary encoding and requiring much less space. This approach and the use of three lightness classes is shared with the methodology of the first paper.
This second paper introduces fuzzy matching and the use of the Sobel gradient norms to penalize (dismiss) pixels which project onto uniform regions, [and are therefore] less significant pixels. This paper also provides some comparison results with Han's, Dong's, and Nguyen's algorithms as define in the second paper's bibliography.

This is what  I understood so far from the paper in arxiv named "Genetic Stereo Matching Algorithm with Fuzzy Fitness":
Let's say we have 2 images (left and right taken by a stereo camera) of size 28x28.
The images are in grey scale.
The individual becomes a disparity map. Let's say, we look at the pixel at row 2, column 3 and it has a number 5. That means that the pixel at (2,3) on the left image (reference image) corresponds to the pixel at (2, 8) on the right image (target image).
The author of the paper created three classes black, average, and white pixels classes where they take the 0, 127.5, and 255 values respectively in the grey image scale.
Then the author calculates the likelikehood of each pixel on both left and right images belonging to the same class by calculating the mean and standard deviation of the class in consideration.
The matching possibility metric is calculated by choosing the max likelikehood of both images belonging to the same class.
Author also added Sobel gradient normalization to the fitness value.
Genetic operators seem to work in an easy way where you just swap some parts of the individual (disparity map) with another disparity map to create new individuals and the mutation is just randomly changing the number in the disparity map.


text:
Handling emotion in informal text (Hi vs HIIIIII!!!!)?
This is a question related to Neural network to detect "spam"?.
I'm wondering how it would be possible to handle the emotion conveyed in text. In informal writing, especially among a juvenile audience, it's usual to find emotion expressed as repetition of characters. For example, "Hi" doesn't mean the same as "Hiiiiiiiiiiiiiii" but "hiiiiii", "hiiiiiiiii", and "hiiiiiiiiii" do.
A naive solution would be to preprocess the input and remove the repeating characters after a certain threshold, say, 4. This would probably reduce most long "hiiiii" to 4 "hiiii", giving a separate meaning (weight in a context?) to "hi" vs "long hi".
The naivete of this solution appears when there are combinations. For example,
haha vs hahahahaha or lol vs lololololol. Again, we could write a regex to reduce lolol[ol]+ to lolol. But then we run into the issue of hahahaahhaaha where a typo broke the sequence.
There is also the whole issue of Emoji. Emoji may seem daunting at first since they are special characters. But once understood, emoji may actually become helpful in this situation. For example,  may mean a very different thing than , but  may mean the same as  and .
The trick with emojis, to me, is that they might actually be easier to parse. Simply add spaces between  to convert  to     in the text analysis. I would guess that repetition would play a role in training, but unlike "hi", and "hiiii", Word2Vec won't try to categorize  and  as different words (as I've now forced to be separate words, relying in frequency to detect the emotion of the phrase).
Even more, this would help the detection of "playful" language such as , where the  emoji might imply there is anger, but alongside  and especially when repeating  multiple times, it would be easier for a neural network to understand that the person isn't really angry.
Does any of this make sense or I'm going in the wrong direction?

These kinds of repetitions in text can place recurrence demands on learning algorithms that may or may not be handled without special encoding.

Hi.
Hiiii!
HIIIIIIIII
Hi!!!!!!!!!!!!!!

These have the same meaning on one level, but different emotional content and therefore different correlations to categories when detecting the value of an email, which in the simplest case is the placement of a message in one of two categories.

Pass to a recipient
Archive only

This is colloquially called spam detection, although not all useless emails are spam and some messages sent by organizations that broadcast spam may be useful, so technically the term spam is not particularly useful. The determinant should usually be the return on investment to the recipient or the organization receiving and categorizing the message.

Is reading the message and potentially responding likely of greater value than the cost of reading it?

That is a high level paraphrase of what the value or cost function must represent when AI components are employed to learn about or track close to (in continuous learning) some business or personal optimality.
The question proposes a normalization scheme that truncates long repetitions of short patterns in characters, but truncation is necessarily destructive. Compression of some type that will both preserve nuance and work with the author's use of Word2Vec is a more flexible and comprehensive approach.
In the case of playful sequences of characters it is anthropomorphic to imagine that an artificial network will understand playfulness or anger, however existing learning devices can certainly learn to use character sequences that humans would call playful or angry in the function that emerges to categorize the message containing them. Just remember that model free learning is not at all like cognition, so the term understanding is placing an expectation on the mental capacities of the AI component that the AI component may not possess.
Since no indication that a recurrent or recursive network will be used but rather the entire message is represented in a fixed width vector, so the question becomes which of these two approaches will produce the best outcomes after learning.

Leaving the text uncompressed so that an 'H' character followed by ten 'i' characters is distinct as a word from an 'H' character followed by five 'i' characters
Compressing the text to "Hi [9xi]" and "Hi [4xi]" respectively or some such word bifurcation.

This second approach produces reasonable behavior with other cases mentioned, such as "" pre-processed into " [2x]". What the algorithm in Word2Vec will do with each of these two choices and how its handling of them will affect outcomes is difficult to predict. Experiments must be run. Three things are advisable courses of action.

Build a test fixture to allow quick evaluation of outcomes for various trials.
Experiment with dilligence. Don't leave any potentially interesting case untried.
Label as much production data as reasonably possible and use that as well as the canned data so that the above options can be evaluated in permuted combinations with the differences in pattern distribution between the canned and live data.

My sense is that this would require a statistical approach with a large dataset.
The algorithm would need to "translate" the slang into formal terms (discrete words or phrases expressing a single concept.)
The trick would be vetting the algorithms decisions, which would require a sufficient sample of humans to evaluate the given translation for each novel instance of slang. (This would likely require some form of crowdsourcing, similar to Captcha.)
This would determine whether 4⇔ 5⇔ 6 where 4x, 5x, 6x of the symbol are equivalent, and whether spacing between the emoji's is meaningful.
Most likely these would be fuzzy associations in that the same slang can be interpreted differently by different people, and the meaning can vary when used in different contexts:
 could mean "I'm laughing super-hard because what you say is so absurdly incorrect." [Adversarial]
 could mean "I'm laughing super-hard because the joke is extremely funny." [Cooperative]
Informally, my experience of 5 has always been in adversarial, but that could be a function of the contexts in which I've encountered it, which reinforces the need for a large samples.
It occurs to me that you could reduce the sample size by using a friendly chatbot that parses social media posts for any symbolic information that is non-standard, then queries the posters asking for clarification.  (This way, you'd get the intent of the slang from the person using it, as opposed interpretations of those viewing it.)
For informal text (as opposed to emojis) the algorithm would want to be able to distinguish between intentional or unintentional mis-spellings.


text:
Is "emotion" ever used in AI?
Is "emotion" ever used in AI?
Psychologists have a lot to say about emotion and it's functional utility for survival - but I've never seen any AI research that uses something resembling "emotion" inside an algorithm. (Yes, there's some work done on trying to classify human emotions, called "emotional intelligence", but that's extrememly different from /using/ emotions within an algorithm) For example, you could imagine that a robot might need fuel and be "very thirsty" - causing it to prioritize different tasks (seeking fuel). Emotions also sometimes don't just focus on objectives/priorities - but categorize how much certain classifications are "projected" into a particular emotions.
For example, maybe a robot that needs fuel might be very "afraid" of going towards cars because it's been hit in the past - while it might be "frustrated" at a container that doesn't open properly.
It seems very natural that these things are helpful for survival - and they are likely "hardcoded" in our genes (since some emotions - like sexual attraction - seem to be mostly unchangeable by "nurture") - so I would think they would have a lot of general utility in AI.

To be honest our emotions are fueled by instincts and chemistry mostly, so it's more of a label only. In your example being "afraid" running out of power is just a label of power level being low. Same for us being hungry, etc.

@aleck, yes emotions are just "labels" for states, but the states that these labels describe are VERY different, and the state evolution is not necessarily symmetric.  If I put you in a state associated with "happiness" I doubt you will be so quick to switch with a state associated with "pain," and I doubt that the response to happyness is similar in any way to the response to pain. We have developed a language for these properties in part because of how these experiences very differently effect our behavior - and this is likely not a trivial matter but is to true intelligence.

Current Simulation of Emotional Behavior
Emotion is used in AI in very limited ways in leading edge natural language systems. For instance, advanced natural language systems can calculate the probability that a particular segment of speech originates from an angry human. This recognition can be trained using labels from bio-monitors. However, the mental features of a human with soft skills tuned from years of experience with people is not nearly simulated in computers as of this writing.
We will not see computers becoming counselors (as once believed) or directors of movies or courtroom judges or customs officials any time soon. Nonetheless, the processes behind emotion are not entirely undiscovered, and there is definite interest in simulating them in computers. Much of that work is company confidential.
The emergence of emotional sophistication in computers likely to begin in the context of sexuality, primarily because flirtation is powerful and primordial emotional expression will probably be easier to simulate in natural language than higher emotional expressions such as love or chaotic ones like rage. Sexy AI will likely be exploited by what businesses might consider legitimate marketing activity.
It is also going to be exploited by the sex industry. The ethical and moral analysis of sexy AI beyond the scope of the question but will probably gain the attention of public media as it unfolds, and that has already begun on FaceBook, originating from third party attacks using fictitious identities.
The Science of Emotion
Emotion isn't a scientific quantity. From an AI perspective, emotion is a quality an individual might recognize through visual and audio queues, specifically through the natural language and affect of another individual. (Affect is a visual clue about a person's emotional and general mental state.)
An individual can also learn to recognize those clues in her or his self. They can be detected by replaying one's own speech as heard through the ear, by linguistic analysis of thoughts not spoken, or through the detection of muscle tension or vital signs. Those skilled in meditation can detect emotional predecessors closer to their causal centers in the brain and control them more directly before emotions even arise.
In the brain, emotion is not in a single geometric location. We cannot say, "That emotion of compassion comes from this group of neurons in Jerome's brain." We cannot say, "Sheri is angry at this 3D coordinate in her cerebral cortex." Emotions are also not strictly system wide either. An individual can be annoyed without going into rage, leaving most of the brain chemistry and electrical signaling unaffected.
Emotions are not entirely electrical and not entirely chemical. On the electric side, emotional states can occur simultaneously through separate circuit pathway connecting distinct and only distantly related regions of the brain. On the chemical side, there is the synaptic chemistry that is part of the electrical signal pathways. There are also many regional signaling systems using specialized pathways that are neither circulatory (blood) nor primary electrical (neuron) pathways. Serotonin is one of dozens of chemical signaling compounds that operate regionally in this way.
Emotions, being a largely social set of phenomena, should not be characterized as purely Darwinian. Although related to survival, emotional processing and communications impact mate selection and, more generally, social patterns within a community, including altruistic and collaborative activity.
Emotions don't always lead to survival. In some cases, emotional states may lead to death prior to reproduction. One could say that emotional balance and the ability to interact on emotional levels may improve odds of having offspring. Imbalance to the degree of any of hundreds of emotional extremes can lead to childlessness.
Emotional intelligence is different than using emotions within an algorithm, but not extremely so.
Discussion of emotional intelligence is one of many advancements in the concept of intelligence since the formation of one-dimensional conceptions of intelligence. Those nineteenth century conceptions, such as IQ and G-factor are poorly supported by genetic evidence and anthropological theory. Mathematically unproven and naive concepts like general intelligence rest on those one-dimensional concepts.
Emotional intelligence is a form of mental capability related to emotional balance. If a person's cognitive skills are honed with respect to their emotions and the assessment of the emotional states of others, then they have greater emotional intelligence than someone who cannot read the affect and linguistic clues of another and cannot integrate cognitive and emotional skill to balance of their own emotions.
Cybernetic Analysis
The interface between natural emotion and artificial emotion fits within the realm of cybernetics, the conceptual study of the interface between humans and machines. Such interaction is clearly related to both algorithms and topology, two important concepts in AI research and development.
Emotion has an algorithmic context because there is clearly some combination of neurons and chemistry that produce this algorithmic difference between a reactive person and one who has developed emotional intelligence.
    emotion[person] = recognize_emotion[person]
    if emotion[person] = anger
        be_in_responses(angry)

    emotion[person] = recognize_emotion[person]
    if emotion[person] = anger
        be_in_responses(extra_calm)

The former is reactive and the later exhibits emotional intelligence. The acquisition of the later skill may be cognitive and conscious or it may be intuitive and unconscious. In either case, the actual algorithms at a lower level may be entirely different than those shown above, yet the external behavior of the person as marshaled by the brain is essentially one of those shown.
The plural, algorithms, is used rather than the singular, algorithm, because it is unlikely that a single synchronous algorithm is involved. The brain is a massively parallel processor. Emotional processing is likely best expressed in artificial form as hundreds of thousands of algorithms operating in parallel and forming millions of balances within the system — multidimensional and highly parallel stasis.
This is why emotional recognition and emotional responses are not very sophisticated in computer systems as of this writing. The balances have much social nuance. It may be easier to simulate rational thought than emotional thought.
Desire as a Systemic Behavior
Hunger and thirst may sometimes be called feelings, but they are not strictly emotional. The detection of the need for air, energy, nutrients, and water may stimulate emotional states if the needs are unmet and other emotional states if met. A person may become frustrated and irritable when lacking something essential and confronted with another person's less important agenda. A robot may someday do the same. A person may become elated and generous when all such essentials have recently been made available in surplus. A robot may someday do the same. These relationships are expressed in the question this way.

Emotions also sometimes don't just focus on objectives/priorities — but categorize how much certain classifications are "projected" into a particular emotions.

That statement in the question and its explanation is true in some respects. If a robot that needs fuel but is afraid of passing in front of a moving vehicle because it has been hit in the past can be seen in more than one way.

Probabilistic risk management based on past experiences
Fuzzy logic that produces control behavior
Feeling fear because of past experience

In AI design, these three would be handled in different ways.

Development of a function that ties visual and auditory information to a model of collision and produces a projected likelihood of injury based each of a number of paths to obtaining fuel
Rules that relates to travel risk with learned probabilities for each along with rules that relate to energy depletion risk with learned probabilities for each and a fuzzy logic rules engine
Artificial networks that have no audit trail but simulate reptilian emotional circuitry and simulate base instinct

Maintaining Scientific Perspective
Emotion is not hard coded into the brain circuitry or DNA. The reality is significantly more complex.
The DNA provides parameters to a genetic expression system that leads to protein synthesis that leads to brain structure and function that leads to the ability to learn emotional responses that lead to improved social behavior that may lead to higher probabilities of gene pool survival.
Applying digital system traditions to biological process can be counter productive, like anthropomorphic views of programs. Artificial networks don't actually learn; they converge. Nothing is hard coded into biology because the term code applied to DNA isn't anything like a page of Java or Python code.
It is true that some behavioral predispositions are strong forms of stasis within the course of a species. An organism will normally exhibit a strong desire to acquire resources from the biosphere, such as oxygen, proteins, nutrients, carbs, fats, and water. A robot might replace those with a voltage to use for a charge and lubricants for moving parts. An organism will normally exhibit a string desire to reproduce. A robot might be given a simulation of that recursive process and wish to build another like itself.
These are not hard coded in biology. They form a kind of stasis within a population. Some humans don't want children. Some are hospitalized for anorexia nervosa. Some commit suicide by asphyxiation. The statistical mean produces the behavior of the species, not a fixed behavior identical across individuals within the species.
Nature and Nurture
Nature and nurture are useful umbrella terms for general categories of causality in biology and may have equivalents in future robotic products, but they are broad generalities. There are no nature algorithms or nurture algorithms or algorithms that balance nature and nurture. That is where topology is of paramount conceptual importance.
Topology of Algorithmic Components
There is massive interaction between many systems operating independently in multiple dimensions. The visualization of such interactive structure would look more like the topology of all the web sites in a country than a machine learning block diagram. If somehow coded into one algorithm it is possible that all the silicon from all the sand on earth converted to random access memory (RAM) might be insufficient to hold the code expressing the algorithm. Perhaps not. Perhaps a simplicity underlies the interactive system design of life. Perhaps we'll someday know. Perhaps not.
The elegance in the design of life on earth is that multiple independent processes are tuned by billions of years of trial and error to inter-operate and support complex organic processes with billions of moving parts at a molecular level.
Veins of Interdisciplinary Research
Study of these are important for biology, for bioinformatics, for cognitive science, and for artificial intelligence. Emotional recognition and integration of emotional reaction and control into natural communications is part of this research and development.

Not a bad question but we can solve this with a little thought experiment. Consider what it means to be "afraid", or to even "feel". It's a DESIRE for something. That something is what pushes us towards general survival. It forces us to focus on what is important right now. And it's relative to our immediate environment & generalized to our abstract conceptualization.
The difference with modern ai paradigms is that they are very structured/rigid in their objectives. There's no general sense of "okayness" or generalized sense of guidance on what it should do. This would require a radically different approach to AI design & infrastructure.
Being that most companies are trying to make money, there's not a lot to be gained by experimenting with "feeling" machines.


text:
Can neural networks learn to ignore an input datum?
Disclaimer: I'm not a student in computer science and most of my knowledge about ML/NN comes from YouTube, so please bear with me!

Let's say we have a classification neural network, that takes some input data $w, x, y, z$, and has some number of output neurons. I like to think about a classifier that decides how expensive a house would be, so its output neurons are bins of the approximate price of the house.
Determining house prices is something humans have done for a while, so let's say we know a priori that data $x, y, z$ are important to the price of the house (square footage, number of bedrooms, number of bathrooms, for example), and datum $w$ has no strong effect on the price of the house (color of the front door, for example). As an experimentalist, I might determine this by finding sets of houses with the same $x, y, z$ and varying $w$, and show that the house prices do not differ significantly.
Now, let's say our neural network has been trained for a little while on some random houses. Later on in the data set. it will encounter sets of houses whose $x, y, z$ and price are all the same, but whose $w$ are different. I would naively expect that at the end of the training session, the weights from $w$ to the first layer of neurons would go to zero, effectively decoupling the input datum $w$ from the output neuron. I have two questions:

Is it certain, or even likely, that $w$ will become decoupled from the layer of output neurons?
Where, mathematically, would this happen? What in the backpropagation step would govern this effect happening, and how quickly would it happen?

For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that $w$ is a worthless input parameter.
Any information is much appreciated, and if there are any papers that might give me insight into this topic, I'd be happy to read them.

I am going to refer to the expected output as "the price of the house" or simply as "price" to make the answer easier to understand but this applies to any other scenario as well.
To answer part 1 of your question, if the correlation between $w$ and the price of the house is 0 or negligible, then it is very likely that varying $w$ while keeping $x$, $y$, and $z$ constant will result in almost the same price being predicted in a trained network. This certainly seems like a learnable statistical characteristic.
There are some caveats though. Firstly, it depends on how complex your network is. How learnable are the correlations between $x$, $y$, $z$ and the price? Assuming most other factors like these fall into place, I would say that it is quite likely that $w$ will be decoupled from the output.
Part 2 of your question is a little trickier to explain. Let us consider a simpler scenario where we use logistic regression. Logistic regression is, in essence, a network with sigmoid output and no hidden layer.  The output is the sigmoid over a linear combination of all inputs.
Let us consider the example as follows -
Two data points have the same or similar values of $x$, $y$ and $z$ and expected output, but $w$ varies considerably. The coefficient of $w$ in the linear combination has a finite, non-zero value. Because of this, the input to the sigmoid will differ even though the resultant price in both cases should be the same or similar.
The loss function's value will increase because of the discrepancy between expected and predicted values in the above example.
In general, the change in the value of the coefficient of $w$ is a product of learning rate and the differential of the loss function with respect to it.
The change in its value will now be such that the magnitude of the coefficient of $w$ decreases to enforce the condition noted in the above examples.
It is difficult to predict at what point a more complex network will learn to ignore $w$. It could happen that the weights at the input layer itself might converge to zero. Or the weights in successive layers could converge such that their linear combination gives no importance to the input w.
I wanted to address another point. You mentioned that -

For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that w is a worthless input parameter.

This first part about having no memory is true. However, the network does not need to remember all the past values. The trainable parameters of a network are basically learning the statistical distribution of the input data and map it to the expected output.  They are trying to model a mathematical function that satisfies as many such training samples as possible.
The network, through these parameters, has stored an abstraction of the behaviour of the training data. So even though it does not remember every training sample, it does remember the general correlation between input and expected output.
An oversimplified analogy would be, you as a human don't remember the multiplication of every number by 2. Yet, if I ask you what is the product of 123 and 2, you can find the product because you just know how the "multiply by 2" function works in general.   Similarly, the network builds an intuition of what the expected output should look like in general, by mapping it to a function whose parameters can be modified.

This is a learnable behavior, given enough data.
We would expect the an error to backpropagate to $w$ whenever its use harmed classification accuracy. In this case, that would be whenever $|w|>0$. In general, I'm not sure how long this would take.
However, the speed of $w$'s convergence to zero would benefit from regularization, which is often basically a penalty on the magnitude of your network weights added to the loss function you're optimizing. If $w$ truly doesn't matter to classification, then regularization will definitely drive it to zero.


text:
Using Artificial Intelligence for Robot movement instead of regular Inverse Kinematics
I am currently working with classical roboticists who insist on inverse kinematics, and what I (perhaps mistakenly) call the old way of thinking about robots accomplishing tasks.
Much of the relatively recent research focuses on Robots using Brain models such as   Multiple timescales (Artificial Intelligence models) that segment sequences and reproduce them, having learned them. The problem I face is this bunch of roboticists insist that a robot already knows the sequence, and training it to be reproduced is redundant, since a Robot can already reproduce the sequence anyway.
How accurate would you rate this assessment of using AI in robotics?
Are there any advantages of using AI to learn sequences for robot control?

Speaking as a "roboticist" that specializes in reinforcement learning, I am not quite sure what you are asking here. What is the task you are trying to accomplish? Are you training a robot to reproduce a specific movement? Cause in that case using classic control is both convenient and easy, and introducing AI to solve this would be a lot of extra work for little reward.
If you however want the robot to generalize over a task, and be adaptable to new situations, then it becomes a problem fit for AI, specifically reinforcement learning.


text:
Extracting algebraic constraints from the input data
I would appreciate your help with this (naive) question of mine.
Given the set of points located on a circle, $x_{i}, y_{i}$ as the input data, Can a deep/machine learning algorithm infer that radius of the circle is constant ? In other words, given the data $x_{i}, y_{i}$ is there way that algorithm discovers the constraint: $x_{i}^2 + y_{i}^2 = \text{constant}$ ?
I would also appreciate any related reference on the subject.

No, I am not aiming to discover attractors in phase space, but in general I would like to discover algebraic constraints hidden in the data. The circle example is the simplest one I could think of.

You can try it with ACE (alternating conditional expectations) - an algorithm that searches for transformations
$$\theta(y) = f_1(x_1)+f_2(x_2)+...+f_n(x_n)$$
The functions $\theta$, and $f_i$ are estimated from data. I'll give an example in R here. There is also a package in Python that does ACE.
Let's generate some data
np <- 100 # number of points
R <- runif(np, min = 0.9, max = 1.1)
alpha <- runif(np, min = 0.0, max = 2*pi)
x <- R*cos(alpha)
y <- R*sin(alpha)
par(mfrow=c(1,1))
plot(x,y)

ACE to estimate $\theta(y) = f(x)$:
library(acepack)
a <- ace(x,y, delrsq = 0.0001)

See the transforms, $\theta$, and $f$
par(mfrow=c(1,2))
plot(a$x,a$tx)
plot(a$y,a$ty)

They look like parabolas, so let's fit them.
xx<-drop(a$x)
yy<-drop(a$tx)

plot(xx,yy)
m.x <- lm(yy ~ xx+I(xx^2))
xnew=sort(xx)
lines(xnew, predict(m.x, list(xx=xnew)),col="red",lwd=2)

xx<-drop(a$y)
yy<-drop(a$ty)

plot(xx,yy)
m.y <- lm(yy ~ xx+I(xx^2))
m.y$coefficients
xnew=sort(xx)
lines(xnew, predict(m.y, list(xx=xnew)),col="red",lwd=2)

The red parabolas don't go through the transforms exactly but we don't need it. We use them only as hints to find the exact relations. We can tweak the parameters later. The parameters of our approximate fits are
m.x$coefficients

(Intercept)          xx     I(xx^2)
 1.31459869  0.07527254 -2.55098259

which means $f(x) \approx  1.3-2.56 x^2$
m.y$coefficients
 (Intercept)           xx      I(xx^2)
-1.342572495  0.001216412  2.791683219

which means $\theta(y) \approx -1.3 + 2.8 y^2$
So, we have
$$-1.3 + 2.8 y^2 \approx 1.3-2.56 x^2$$
or
$$2.56 x^2 + 2.8 y^2 \approx 2.6 $$
From here you can recover $x^2+y^2 = 1$


text:
How can I model regularity?
I have data that are a result of rules that are exceptionless. I want to my program to 'look' at my data and figure out those rules. However, the data might contain what might look like an exception (rule within a rule) but that is too, true for all occasions e.g.
All men of the dataset with x common characteristics go out for a beer on Thursday after work. That is true for all men with those characteristics. However, they will cancel their plans if their wife is sick. That last condition might initially look as an exception to the rule (go out for beer on Thursdays), but it is not as long as it is true for all men with those x characteristics.
So the question is: Which approach/method would be suitable for this?


text:
Is discrete reading in neural turing machines differentiable?
For a neural turing machine, there is an attention distribution over the memory cells. A read operation consists of multiplying the memory cell's value by its respective probability, and adding these results for all memory cells.
Suppose we only did the above operation for memory cells with a probability greater than 0.5, or suppose we concatenated the results instead of adding them. Can this be implemented/ trained with stochastic gradient descent? Or would it not be differentiable?
Thanks!


text:
NN: Predicting choices when number of alternatives changes
Let's say I want to model purchase data (i.e. purchase records of many households across time). For simplicity, let's assume each household only picks one alternative at the time. A simple starting point is a multinomial logit model. Then, more flexible network architectures could be used. People have applied NN to this, but kept the number of alternatives (K) constant. In reality, the number of available options changes over time. Also, it would be interesting to predict how choices change when the number of alternatives is changed.
in bullet points

there are N households
t_n purchases for each household
There are K_t alternatives at time t
Dependent variable Y=k indicates that alternative k was bought
Each alternative is characterized by features, so x_kt is a vector of those features (including brand name, price, ...). The number of features is constant across time.

Any guidance or ideas?


text:
Can't grasp MiniMax diagram (no alpha beta pruning)

The image is one of many similar exam questions can anyone pelase help me understand it fully?
'Internal node': This is simply every node except A?
Move choices: His only options are B, C and D for this move?
Focusing on B: E=8 F=4 and G are all opponent responses, therefore they will pick the minimum value.
Now my confusion, are M N and P your known responses in the case the opponent picks G, so you should pick M=0 (the highest value), so then G gets passed 0 which the opponent should choose so B has a h-value of 0?
Are the correct value then B=0, C=1 and D=2 so pick D as next move?

"Internal nodes" are all nodes other than leaf nodes (where leaf nodes are those at the "end", those which no longer have branches growing under them). So A is also an internal node, and you should therefore also list the value assigned to node A. Other than that, everything you already wrote seems to be correct yes.


text:
Could it be possible to detect text, symbols, and components directly in a scanned PDF file with a program like Tensorflow or another program?
I have this problem where I need to get information out of PDF document sent from a scanner. The program needs to be learnable in some way to recognize what different figures mean. Most of this should happen without human interference so it could just give a result after scanning the file.
Do anyone know if it's possible to do with a machine learning program or any alternative way?

Yes, that's possible.
I am working on a project in which I have to detect text in images. I did a quick search and found these two algorithms:
1. EAST: (Efficient and Accurate Scene Text Detector)
I am not sure if it is based on Machine Learning. Here are some links link1 link2 explaining how to use it with an example and using tesseract to extract the detected text.
2. CTPN: (Connectionist Text Proposal Network)
This algorithm is based on Machine Learning. Here is its link in github. In the description, you will find a link to a pre-trained model that you can use. Or simply, you can prepare your own data and train your own model.
For me, I tried both of them, and the CTPN model gave better results especially when the image contains large text.

Thank you very much for the answer but looked a bit on the website and can see that the programs have a hard time to find the symbols that I also have to find. The text has to find can be small and also sideways sometimes.
Example of text: https://ibb.co/jfjhW8J

I applied the ctpn algorithm on your image, and this is the result. I think it is not so precise since it didn't detect all the text in the image. Well, may be if you train it with your own data (which would take a lot of time), the results would be more precise.
If you find any better method please post it here so all the community would benefit from it. Thank you!

I probably need to train my own program than to do it for me. Do you still think the best platform for a project like this would be CTPN? And do you know a machine learning program where you can evaluate the results afterward to tell it what it did right and wrong?

In my situation, CTPN was more precise, but in general I am not sure.. It strongly depends on the characteristics of the text you want to detect. To my knowledge, there is no like 'machine learning program to evaluate the results' you can evaluate your model by checking the accuracy, validation accuracy and the loss while doing the training. and after you finish the training, you can test your model by giving it some images and see if it detects all the text zones or not.


text:
How to analyze data before going for machine learning training?
For example, I have the following csv: training.csv
I want to know how I can determine which column will be the best feature for getting the output prediction before I go for machine training.
Please do share your responses

Though there is no universal method which can be blindly used for all datasets, but here is what i usually do;

Fill missing values using interpolation or mean, if missing values
are less than 10-15 percent of number of rows else drop the column.
Encode categorical data using some kind of encoding, e.g. one hot, etc.
Then normalize/rescale columns.
Now look at the variance in each feature. Usually, features with more variance are more important.
Next, see the correlation among columns. If two columns are highly
correlated, you only need to keep only one.

You should know your data 100%. That means knowing what each of your columns and rows represents (e.g. temperature column, humidity, rows representing days), the value units (e.g. Celsius or Fahrenheit?), accuracy, value format (strings or numbers). You may need to clean and reorganize the data if necessary to bring them to your desired form (e.g. change the structure, units, aggregating, etc).
Then use your logic and experience to decide what columns are necessary. This is in general. I hope someone will give you a more specific answer.

Thank you for your reply. But I was expecting a bit of professional answer. What you have said is really general. But if I need to know the exact thing then what the other professionals try I would love to know about that.


text:
How to weight important features
Let's say there's a ball with features position, velocity, acceleration.
These three are all concatenated as inputs to my neural network.
However, I have prior knowledge that position is way more predictive than the other features.
How do I weight the position feature much more strongly than the others? Would just applying a large scalar coefficient to it as preprocessing work? Seems unprincipled...

If you are training a neural network, it should learn correct weights to use the most predictive feature without any interference. For a strongly predictive feature matched with weaker ones, most NNs will learn the stronger association very quickly. I'm not sure whether there is an easy way to add this as a prior. You could do things such as inject the most influential feature in one or more hidden layers, but that does seem ugly, and only really helps if the predictive feature has certain types of relationship to output (it would probably help most if there is a strong linear relationship).
Training problems are usually in the opposite direction - how to extract the small amount of information from more noisy and less influential features that may still add up and sometimes contradict the main predictor.
The only thing that springs to mind for NNs that may help in this situation (mostly about fixing the problem of using the less reliable features) is the architecture of residual neural networks. The use of skip connections builds the neural network in such a way that a default "do nothing" identity function is encouraged as layers are added, and this allows for combining weak but complex relationships with stronger simple ones. A residual NN can do this with less compromise than changing network hyper parameters to find best fit on other NNs.
However, residual neural networks are good for managing different degrees of complexity that manifest within a problem, which is not necessarily the same as different degrees of predictive power between features.

Would just applying a large scalar coefficient to it as preprocessing work?

No, this would usually be counter-productive for training a neural network. You should instead be normalising all inputs - a common and effective technique for neural networks is to ensure that each feature is scaled and offset so it has mean 0, standard deviation 1.


text:
Method to check goodness of combinatorial optimization algorithm implementation
How do I check which algorithm solves my problem best?
Given a optimaization problem, I apply different well known optimization algorithms (genetic algorithm, simulated annealing, ant colony etc.) to solve my problem. However, how do I know if my implementation ( e.g. cost function) is working for every case? How can I compare the algorithms or their goodness in the context of my problem?

This is a very large question that could be answered in a variety of ways depending on the context.
For some optimization problems operating under specific conditions you can make theoretical guarantees that your optimization will solve your problem.  A specific example of this is running the gradient descent algorithm on a convex function.  If the function being optimized is convex then gradient descent is guaranteed to converge to the correct solution.  Given the nice properties of convex functions, there are many types of optimization where you can make these theoretical guarantees.
When evolutionary algorithms (and many non-derivative based optimizations) are run, it's much harder to make these types of guarantees.  Often in the literature I've seen people try their functions on several baseline optimization functions and report back the minimum or maximum found.  Many of these are included in Facebook's nevergrad optimization library to be used for evaluation.  An example of one of these functions is included below,

Even if you can prove that your algorithm minimizes several objective functions you could be testing on, there could be other properties that should be considered.  Some of these include the following: the speed at which the algorithm converges; the number of evaluations of the objective function (if not closed form), and even the amount of space in memory which is required for your optimization.  All of these (and many more) factors could come into play when evaluating your algorithm.
Scientists may use functions like this one to evaluate their optimization and compare it to other algorithms that are similar.  To answer your final question though, "How can I see if my optimization works for every problem", I would say that's a bit of a loaded question.  Most of the time these optimizations need some sort of constraint to make a generalized guarantee.  I would look at the constraints of your problem and go from there.
If you're interested, here's a good paper that goes much more in depth than I did here.


text:
What kind of decision rule algorithm is usable in this situation?
I am trying to write an AI to a game, where there is no real adversary. This means, that only the AI player has choices in which move to perform, his opponent may or may not react to the move the AI player made, but when he reacts, he will always do the one and only single move that he is able to do. The goal of this AI would be, to find a solution to the situation, which results in the least amount of monster activations.
To explain this a bit further, I will describe the game in a few words: there is a 3x3 board, on which there are some monsters. These monsters has a prewritten AI, and activate based on prewritten rules, ie, they do not have to make any decision at all. This is done, by an enrage mechanic, meaning, that when a monster hits it's enrage limit, it activates, and performs his single move action.
The AI should control the other side of this board, the hero players. Each hero player has a different number of possible moves, each move dealing an amount of damage to the monsters, and increasing it's enrage value, thus getting him closer to his enrage limit.
What I want to achieve, is to write an AI, that will perform this fight in the least amount of monster activations as possible.
For now, I've written a minimax algorithm for this, without the min player. I've done this, by calculating the negative effect of the monsters move, in the maximizing and only players move.
The AI works in the following way: he draws the game tree for a set amount of depth of moves, calculates the bottom move with a heuristic function, selects the highest value from the given depth, and returns the value of this function up one level, then repeat. When he reaches the top of the tree, he performs the move, with the highest quantification value.
This works, somewhat, but I have a big problem: As there is no randomness in the game, I was expecting that the greater the depth that he can search forward, the better moves he will find, but this is not always the case, sometimes a greater depth, returns a worse solution then a smaller depth
My questions are as follows:

what could cause the above error? My quantification function? The weights that I use in the function? Or something else?
is minimax the correct algorithm to use, for a game where there is no real adversarry, or is there any algorithm that will perform better for a game like this?


text:
Using a "is_padding" attribute in your padding instead of simply zero vectors
Typical Feed Forward Neural Networks require a fixed sized input and output. So when you have variable sized input, it seems to be common practice to pad the input with zero vectors.
Why does it not seem to be common practice to have a "is_padding" attribute?  That way the network can easily distinguish between padding and actual data?  Especially considering input is commonly centered around 0 by subtracting the mean and using unit variance.

I would guess that maybe it's simply not necessary in common cases? If groups of inputs are often related to each other, such that some features being non-zero automatically implies a bunch of other features being "real" (even if they equal $0$), then a NN should be able to automatically learn that the $0$s are only padded if they are in a bunch together, all $0$? Really just a guess though. Intuitively, I do think your idea could be beneficial in some cases.


text:
Deep Learning on how to find out the body measurement (e.g. shoulder length, waist, hips, legs length etc) from mobile camera captured images?
I do understand that there are plenty of mobile apps available for body measurement (e.g. MTailor) or creating 3D model (3dlook).
What I would like to find out is how we can use deep learning to achieve the accurate body measurement/3D model with just smart phone camera?
For example, MTailor can predict one's body measurement quite accurately given the cameara angle/camera distance from the human and human height. Can we do the same using deep learning with some labeled images to achieve the same accurate body measurement prediction?
Thanks
Regards,
Han

Why do you feel that deep learning is a good way to solve this problem?

I suggest you replace the word 'predict' with 'estimate'.  This is a geometry estimation problem.  It is not a prediction problem.  Prediction implies time is involved.

Hi Brian, apologize for the late reply. We used the mobile app front end to mark some of the body measurement data points and control the camera angle/distance from person. Finally all the data coming in with pretty accurate measurement of the body.