artificial-intelligence

m-estimate for continuous values

徘徊边缘 提交于 2019-12-08 05:19:08
问题 I'm building a custom regression tree and want to use m-estimate for pruning. Does anyone know how to calculate that. http://www.ailab.si/blaz/predavanja/UISP/slides/uisp07-RegTrees.ppt might help (slide 12, how should Em look like?) 回答1: There are a lot of m-estimates. They all boil down to recasting your estimation problem as a minimization problem. If you use squared error as the function you're minimizing, you just get sample mean. If you use absolute value of the error, you get the

Back propagation algorithm: error computation

混江龙づ霸主 提交于 2019-12-08 04:48:25
问题 I am currently writing a back propagation script. I am unsure how to go about updating my weight values. Here is an image just to make things simple. My question: How is the error calculated and applied? I do know that k1 and k2 produce error values. I know that k1 and k2 produce individual error values (target - output). I do not however know if these are to be used. Am I supposed to use the mean value of both error values and then apply that single error value to all of the weights? Or am I

Implementing and using MinMax with four in row (connect4) game

只谈情不闲聊 提交于 2019-12-08 03:33:00
问题 I'm trying to implement the MinMax algorithm for four in a row (or connect4 or connect four) game. I think I got the idea of it, it should build a tree of possible boards up to a certain depth, evaluate them and return their score, then we just take the max of those scores. So, aiChooseCol() checks the score of every possible column by calling MinMax() and returns the column with the max score. Now I wasn't sure, is this the right way to call MinMax() ? Is it right to check temp = Math.Max

nominal-value inputs for Neural Network

元气小坏坏 提交于 2019-12-08 00:44:12
问题 I have a set of training data, each item in this set consists of 4 numerical values and 1 nominal-value which is the name of the method that these values have been calculated with. (There are 8 methods) I'm training a Neural Network with these. To get rid of the nominal-value I simply assigned a value from 1 to 8 to each method and used one input to pass it to Neural Network and 4 other inputs for numerical-values. It is sort of working, but the result is not as amazing as I want. So my

How to capture and process live activity from another application in Python?

一世执手 提交于 2019-12-07 17:51:59
问题 I'm a computer science student, and as a personal project, I'm interested in building software that can watch and produce useful information about Super Nintendo games being run on a local emulator. This might be things like current health, current score, etc., (anything legible on the screen). The emulator runs in windowed form (I'm using SNES9x) and so I wouldn't need to capture every pixel on the screen, and I'd only have to capture about 30fps. I've looked into some libraries like FFMPEG

How to get response from .clp(CLIPS) file?

◇◆丶佛笑我妖孽 提交于 2019-12-07 17:11:08
问题 I am trying to load .clp file in my iPhone application. For that I am using below code NSString *filePath = [[NSBundle mainBundle] pathForResource:@"autodemo" ofType:@"clp"]; environment = CreateEnvironment(); char *clipsFileChar = (char *)[filePath cStringUsingEncoding:NSASCIIStringEncoding]; Load(clipsFileChar); Reset(); Run(-1); NSString *evalS = [NSString stringWithFormat:@"(find-all-facts ((?f state-list)) TRUE)"]; char * evalStr = (char *)evalS; DATA_OBJECT obj;// = {0,-1}; // obj.type

Techniques to display related content or articles

这一生的挚爱 提交于 2019-12-07 13:02:32
问题 I've been trying to learn Text mining and other related things in Collective Intelligence field. I am interested to make an app which will scan thru the document and show related posts/articles on page. What algorithm(s) would be helpful to retrieve required info? Thanks /A 回答1: A simple method is to count the non-common words and their instances on the page. The more a word shows up, the better it is at describing the content of the post. You can then use it to look up other articles/posts.

How to identify revisiting users without login info

三世轮回 提交于 2019-12-07 12:53:40
问题 I want to create a recommendation engine for my website. Suppose a user comes to my website. I want to recommend him what other products he can view. I can create a recommendation engine. But, how to find patterns? What I have thought is, if by any means I can know which products were browsed by an user, I can find a pattern in that and suggest to another user. But, is this information tracking possible without making the user login? Tracking IP address may be one way, but IP may be dynamic.

Stochastic hill climbing vs first-choice hill climbing algorithms

情到浓时终转凉″ 提交于 2019-12-07 11:59:23
What is the difference between stochastic hill climbing and first-choice hill climbing algorithms? Gusti Ahmad Fanshuri Alfarisy Hill Climbing Search Algorithm is one of the family of local searches that move based on the better states of its neighbors. Stochastic Hill Climbing chooses a random better state from all better states in the neighbors while first-choice Hill Climbing chooses the first better state from randomly generated neighbors. First-Choice Hill Climbing will become a good strategy if the current state has a lot of neighbors. I am quoting from Artificial Intelligence: A Modern

Getting more details from optim function from R

喜夏-厌秋 提交于 2019-12-07 11:45:19
问题 I'm not very familiar with the optim function, and I wanted to get these informations from its results: a) how many iterations were needed for achieving the result? and b) to plot the sequence of partial solutions, that is, the solution obtained in the end of each iteration. My code until now looks like this: f1 <- function(x) { x1 <- x[1] x2 <- x[2] x1^2 + 3*x2^2 } res <- optim(c(1,1), f1, method="CG") How can I improve it to get further information? Thanks in advance 回答1: You could modify