text
stringlengths 0
27.6k
| python
int64 0
1
| DeepLearning or NLP
int64 0
1
| Other
int64 0
1
| Machine Learning
int64 0
1
| Mathematics
int64 0
1
| Trash
int64 0
1
|
|---|---|---|---|---|---|---|
I'm working on a syntactic parser for some language. But this language requires suffix agreement highly. For example in English a verb must agree with pronoun as I,we,you-do or he,she,it,this-does etc. In this language a verb has different forms for each pronoun. I know in literature this is handled by unification method. But I couldn't find any implementation of it in Java. I also researched Stanford parser and ANTLR but I couldn’t find any evidence that they support suffix agreement.
So which tool or lib. would you offer me in this situation?
Thanks in advance.
| 0
| 1
| 0
| 0
| 0
| 0
|
So if I have a range of numbers '0 - 1024' and I want to bring them into '0 - 255', the maths would dictate to divide the input by the maximum the input will be (1024 in this case) which will give me a number between 0.0 - 1.0. then multiply that by the destination range, (255).
Which is what I want to do!
But for some reason in Java (using Processing) It will always return a value of 0.
The code would be as simple as this
float scale;
scale = (n/1024) * 255;
But I just get 0.0. I've tried double and int. all to no avail. WHY!?
| 0
| 0
| 0
| 0
| 1
| 0
|
Possible Duplicate:
How do you implement a “Did you mean”?
I am writing an application where I require functionality similar to Google's "did you mean?" feature used by their search engine:
Is there source code available for such a thing or where can I find articles that would help me to build my own?
| 0
| 1
| 0
| 0
| 0
| 0
|
I want to teach myself enough machine learning so that I can, to begin with, understand enough to put to use available open source ML frameworks that will allow me to do things like:
Go through the HTML source of pages
from a certain site and "understand"
which sections form the content,
which the advertisements and which
form the metadata ( neither the
content, nor the ads - for eg. -
TOC, author bio etc )
Go through the HTML source of pages
from disparate sites and "classify"
whether the site belongs to a
predefined category or not ( list of
categories will be supplied
beforhand )1.
... similar classification tasks on
text and pages.
As you can see, my immediate requirements are to do with classification on disparate data sources and large amounts of data.
As far as my limited understanding goes, taking the neural net approach will take a lot of training and maintainance than putting SVMs to use?
I understand that SVMs are well suited to ( binary ) classification tasks like mine, and open source framworks like libSVM are fairly mature?
In that case, what subjects and topics
does a computer science graduate need
to learn right now, so that the above
requirements can be solved, putting
these frameworks to use?
I would like to stay away from Java, is possible, and I have no language preferences otherwise. I am willing to learn and put in as much effort as I possibly can.
My intent is not to write code from scratch, but, to begin with putting the various frameworks available to use ( I do not know enough to decide which though ), and I should be able to fix things should they go wrong.
Recommendations from you on learning specific portions of statistics and probability theory is nothing unexpected from my side, so say that if required!
I will modify this question if needed, depending on all your suggestions and feedback.
| 0
| 0
| 0
| 1
| 0
| 0
|
I'm tackling an interesting machine learning problem and would love to hear if anyone knows a good algorithm to deal with the following:
The algorithm must learn to approximate a function of N inputs and M outputs
N is quite large, e.g. 1,000-10,000
M is quite small, e.g. 5-10
All inputs and outputs are floating point values, could be positive or negative, likely to be relatively small in absolute value but no absolute guarantees on bounds
Each time period I get N inputs and need to predict the M outputs, at the end of the time period the actual values for the M outputs are provided (i.e. this is a supervised learning situation where learning needs to take place online)
The underlying function is non-linear, but not too nasty (e.g. I expect it will be smooth and continuous over most of the input space)
There will be a small amount of noise in the function, but signal/noise is likely to be good - I expect the N inputs will expain 95%+ of the output values
The underlying function is slowly changing over time - unlikely to change drastically in a single time period but is likely to shift slightly over the 1000s of time periods range
There is no hidden state to worry about (other than the changing function), i.e. all the information required is in the N inputs
I'm currently thinking some kind of back-propagation neural network with lots of hidden nodes might work - but is that really the best approach for this situation and will it handle the changing function?
| 0
| 0
| 0
| 1
| 0
| 0
|
I'm trying to count the number of chars in a char array including the space until the end of the string.
The following compiles but doesn't return the correct value, I'm trying to use pointer arithmetic to interate through my array.
int numberOfCharsInArray(char* array) {
int numberOfChars = 0;
while (array++ != '\0') {
numberOfChars++;
}
return numberOfChars;
}
Many thanks.
Obviously I'm trying to get the equivalent of length() from cstring but using a simple char array.
Of course if my original array wasn't null terminated this could cause a very big value to return (I guess).
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm making an isometric game. When the player tries to walk diagonally into a wall I want them to slide smoothly across it, so whatever portion of the movement would be legal is used, and anything in the direction of the normal is thrown away. Walls can be any angle, not just vertical or horizontal, and the player has 360 motion.
I feel like I'm almost there but I can't put the last piece into place.
| 0
| 0
| 0
| 0
| 1
| 0
|
Jquery/programming newb here. I'm trying to dynamically assign a height to a ul to force some scrolling. My method is to detect how many items are in the list and then apply some math to calculate a height of my ul (I have tried height(); but it was not giving the right number; the ul is a grid of thumbnail images, displayed inline, showing three items to a row, so I think I have to calculate this height). The images are 75 pixels square and there's a margin of 10px between images.
I came up with this, but it's not working:
var numitems = $("#my_grid li").size();
var numrows = ( numitems / 3 );
var myheight = ((numrows * 75) + [(numrows -1 ) * 10]);
$("ul#my_grid").height(myheight);
Thank you!
| 0
| 0
| 0
| 0
| 1
| 0
|
I had once known of a way to use logarithms to move from one leaf of a tree to the next "in-order" leaf of a tree. I think it involved taking a position value (rank?) of the "current" leaf and using it as a seed for a fresh traversal from the root down to the new target leaf - all the way using a log function test to determine whether to follow the right or left node down to the leaf.
I no longer recall how to exercise that technique. Can anyone re-introduce me?
I also don't recall if the technique required the tree to be balanced, or if it worked on n-trees or only binary trees. Any info would be appreciated.
| 0
| 0
| 0
| 0
| 1
| 0
|
I know it's not programming question but I thought we could all use the challenge :)
Link to diagram
Point A is the source of a laser. It is shinned at a single mirror and then reflected to another mirror finally arriving at point B ... see picture.
The goal is to find the total distance of all the lines.
I am not a student and this is not homework.
| 0
| 0
| 0
| 0
| 1
| 0
|
I have a school problem but I do not understand what it actually asks. Any of you have an idea what it's really asking for? I don't need code, I just need to understand it.
This is the problem:
Construct a computer program that uses the Secant method to solve the problem:
f(x) = (1+x) cos( sin(x)3 ) - 1.4 = 0
Starting with the initial guesses of x=2.0 and x=2.1, obtain an approximation to x such that |f(x)| < 0.0000001.
This is my code from what I understand, but I think I'm not understanding the question correctly.
#include <iostream>
#include <cmath>
double secant(double x);
using namespace std;
int main()
{
double x = 2.0;
double r = 0.0;
int counter = 0;
while( r < 0 && counter <= 40)
{
r =secant(x);
cout << "x: " << x << ", f(x): " << r << endl;
counter++;
x += 0.1;
}
return 0;
}
double secant(double x)
{
double r;
r = (1+x) * cos(pow(sin(x), 3.0)) - 1.4;
return r;
}
| 0
| 0
| 0
| 0
| 1
| 0
|
Given a vector V of size N, Find if there exists another vector A (of size N) such that A.V = 0 where . represents the Dot product or Inner Product ie a1*v1 + a2*v2 + a3 * v3 + ... an*vn = 0, and A >0 ie all ai are non-negative integers and all ais cannot be 0 at the same time(trivial case).
Suggest an algorithm to generate a YES of NO.
| 0
| 0
| 0
| 0
| 1
| 0
|
Basically I have created two MATLAB functions which involve some basic signal processing and I need to describe how these functions work in a written report. It specifically requires me to describe the algorithms using mathematical notation.
Maths really isn't my strong point at all, in fact I'm quite surprised I've even been able to develop the functions in the first place. I'm quite worried about the situation at the moment, it's the last section of writing I need to complete but it is crucially important.
What I want to know is whether I'm going to have to grab a book and teach myself mathematical notation in a very short space of time or is there possibly an easier/quicker way to learn? (Yes I know reading a book should be simple enough, but maths + short time frame = major headache + stress)
I've searched through some threads on here already but I really don't know where to start!
| 0
| 0
| 0
| 0
| 1
| 0
|
We have had a production web based product that allows users to make predictions about the future value (or demand) of goods, the historical data contains about 100k examples, each example has about 5 parameters;
Consider a class of data called a prediciton:
prediction {
id: int
predictor: int
predictionDate: date
predictedProductId: int
predictedDirection: byte (0 for decrease, 1 for increase)
valueAtPrediciton: float
}
and a paired result class that measures the result of the prediction:
predictionResult {
id: int
valueTenDaysAfterPrediction: float
valueTwentyDaysAfterPrediction: float
valueThirtyDaysAfterPrediction: float
}
we can define a test case such for success, where if any two of the future value check points are favorable when conisdering direction and value at the time of prediction.
success(p: prediction, r: predictionResult): bool =
count: int
count = 0
// value is predicted to fall
if p.predictedDirection = 0 then
if p.valueAtPrediciton > r.valueTenDaysAfterPrediction then count = count + 1
if p.valueAtPrediciton > r.valueTwentyDaysAfterPrediction then count = count + 1
if p.valueAtPrediciton > r.valueThirtyDaysAfterPrediction then count = count + 1
// value is predicted to increase
else
if p.valueAtPrediciton < r.valueTenDaysAfterPrediction then count = count + 1
if p.valueAtPrediciton < r.valueTwentyDaysAfterPrediction then count = count + 1
if p.valueAtPrediciton < r.valueThirtyDaysAfterPrediction then count = count + 1
// success if count = 2 or count = 3
return (count > 1)
Everything in the prediction class is known the moment the user submits the form, and the information in the predictionResult is not known until later; Ideally the model or algorythm can be derived from our three year history that algorythm is applied to a new prediciton we can get a probability as to whether it will be a success or not (I would be happy with a boolean Y/N flag as to wether this is interesting or not).
I don't know much about machine learning, and I am trying to make my way through material. But it would be great if I could have some guidance so I can research and practice exactly what I need to solve a problem like this.
Thank you
| 0
| 0
| 0
| 1
| 0
| 0
|
I am currently trying to implement basic speech recognition in AS3. I need this to be completely client side, as such I can't access powerful server-side speech recognition tools. The idea I had was to detect syllables in a word, and use that to determine the word spoken. I am aware that this will grealty limit the capacities for recognition, but I only need to recognize a few key words and I can make sure they all have a different number of syllables.
I am currently able to generate a 1D array of voice level for a spoken word, and I can clearly see, if I somehow draw it, that there are distinct peaks for the syllables in most of the cases. However, I am completely stuck as to how I would find out those peaks. I only really need the count, but I suppose that comes with finding them. At first I thought of grabbing a few maximum values and comparing them with the average of values but I had forgot about that peak that is bigger than the others and as such, all my "peaks" were located on one actual peak.
I stumbled onto some Matlab code that looks almost too short to be true, but I can't very that as I am unable to convert it to any language I know. I tried AS3 and C#. So I am wondering if you guys could start me on the right path or had any pseudo-code for peak detection?
| 0
| 0
| 0
| 0
| 1
| 0
|
I remember when I was in college we went over some problem where there was a smart agent that was on a grid of squares and it had to clean the squares. It was awarded points for cleaning. It also was deducted points for moving. It had to refuel every now and then and at the end it got a final score based on how many squares on the grid were dirty or clean.
I'm trying to study that problem since it was very interesting when I saw it in college, however I cannot find anything on wikipedia or anywhere online. Is there a specific name for that problem that you know about? Or maybe it was just something my teacher came up with for the class.
I'm searching for AI cleaning agent and similar things, but I don't find anything. I don't know, I'm thinking maybe it has some other name.
If you know where I can find more information about this problem I would appreciate it. Thanks.
| 0
| 1
| 0
| 0
| 0
| 0
|
How do I calculate the pitch, yaw, and roll angles for a point in 3D space?
I'm working on a game where the player character must face towards an object that's flying around.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm trying to re-create this conquerclub (Risk-like) game:
http://conquerclub.barrycarter.info/ONEOFF/7460216.html
In other words, I want to know who owned each territory at each point
in time, and how many troops they had on that territory. My primary
source of information is the Game Log. Notes:
% It's not in the Game Log, but all territories start w/ 3 troops.
% Since we know the territory owners at the end of the game, and the
Game Log mentions all owner changes, determining territory owners at
any point in time is easy.
% The challenge is to find the number of troops on a territory at a
given time.
% The Game Log gives information on troop deployment, reinforcement,
and conquest.
% However, the Game Log is incomplete. Suppose territory X attacks
territory Y unsuccessfully, but both territories lose troops in the
process. The Game Log will not mention this.
% It's probably not possible (in general) to find the exact number
of troops on a territory at a given time, so I'm looking for a range.
% I tried feeding the data to Mathematica as a series of
inequalities, but as the manual warns, the computation time increases
exponentially with the number of inequalities. Even with a fairly
small number of inequalities, it hangs. Plus, I'm not convinced
Mathematica is the right tool here.
% Any thoughts? Another example is:
http://conquerclub.barrycarter.info/ONEOFF/7562013.html
% I know about http://userscripts.org/scripts/show/83035 but that only tracks \
owners, not number of troops.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm a hobbyist game programmer. I only do 2d games, no 3d stuff. I don't have a math background and lots of things are tripping me up like bullet projections and angles.
I took two college level Algebra courses at the local community college, but really disappointed. I got As in both, but really don't feel like I'm using any of it in my everyday 2d game programming and still stuck on angles/bullet paths, etc
I dropped out this semester to self study. The advisory at the community college said I want to be in Statistics for this and was really pushing me hard to enroll in that class. He said Statistics then Calculus I & II would get me what I needed.
I've been reading up a lot and not so sure on this. I think I should start with a a Geometry book and then move into Trigonometry? Is that the right approach?
Anyone suggest any good self-study starter books?
| 0
| 0
| 0
| 0
| 1
| 0
|
I need to find combination of combination in JAVA.
I have for instance 6 students in class. Out of them, I need to create combination of 4 people in group, and for each group I can choose an intimate group of 2.
I have to make sure that there are no doubles (order does not matter).! and need to print the 4 people group.
However, this is the hard part:
So defining students with numbers:
If I print out 1234 as one of the combinations, I can't print out1256 as well, since 12 appears both in 1234 and in 1256.
How can I write it in Java?
EDITED
output of ([1,2,3,4,5],3,2) will be:
Combinations without repetition (n=5, r=3)
{1,2,3} {1,2,4} {1,2,5} {1,3,4} {1,3,5} {1,4,5} {2,3,4} {2,3,5} {2,4,5} {3,4,5}
deleting repeating groups of 2 elements, will leave me only:
{1,2,3} {1,4,5} (i deleted groups that have combinations of 12,13,23,45,14,15 since they already appear in the first two that I have found.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm interested in any conventional wisdom how to approach the following problem. Note that I'm a hardware guy, so be careful using industry knowledge/terminology/acronyms.
I'm providing an online application that includes very complex math computations, such as fast-Fourier transforms, that involve nested for-loops and very large data arrays (1.6GB each). Users on the internet will access this application, enter some custom parameters, and submit a job that calls these math computations. To keep the user's wait to a minimum, and allow multiple independent sessions for multiple simultaneous users (each user having a separate thread), I'm wondering how I can speed up the math computations, which I anticipate will the a bottleneck.
I'm not so much looking for advice in how to structure the program (e.g. use integer data types whenever possible instead of floating, use smaller arrays, etc.), but rather I'm interested, once the program is complete, what can be done further to speed things up.
For example, how to ensure multiple cores in the CPU are automatically accessed based on demand? (is this done by default or do I need to manage the process somehow?
Or, how to do parallel processing (breaking for-loop up among multiple cores and/or machines)?
Any practical advice is greatly appreciated. I'm sure I'm not the first to need this, so I'm hoping there are industry best practice approaches available that scale with demand.
Thanks in advance!
| 0
| 0
| 0
| 0
| 1
| 0
|
We've been working with the NLTK library in a recent project where we're
mainly interested in the named entities part.
In general we're getting good results using the NEChunkParser class.
However, we're trying to find a way to provide our own terms to the
parser, without success.
For example, we have a test document where my name (Shay) appears in
several places. The library finds me as GPE while I'd like it to find
me as PERSON...
Is there a way to provide some kind of a custom file/
code so the parser will be able to interpret the named entity as I
want it to?
Thanks!
| 0
| 1
| 0
| 0
| 0
| 0
|
Perl:: What is:
1. (52-80)*42
2. 42*(52-80)
Ans:
1. -28
2. -1176
Why?
Have fun explaining/justifying this please!
#!/usr/bin/perl
use strict;
print 42*(52-80) , "
";
print ((52-80)*42) , "
";
print (52-80)*42 , "
";
print "
";
my $i=(52-80)*42;
print $i, "
";
Output:
> -1176
> -1176-28
> -1176
| 0
| 0
| 0
| 0
| 1
| 0
|
first post here on stack overflow, hoping to get some advice on how to construct a simulation program akin to the 1993 maxis simulator known as El-Fish wiki here , Also, game info here .
Are there known "Simulation system" algorithm groups that can function and create real life interaction etc... e.g. the visualization known as 'flocking' ? Or, is there an open-source code base to study off of already in construction?
Programming wise, would this also be able to be easily done in a purely functional language? if done in an OOP way, i was thinking of prototyping it in python.
Anyways thanks for any direction in pointing me towards a good starting place. I hope to build a graphical view of an idea/data world. It will be hopefully controlled by underlying simulation AI(heuristics maybe?)
| 0
| 1
| 0
| 0
| 0
| 0
|
I have a tile based game and I need to find the closest tile within a 32px radius. So say a user is at 400, 200 and the user clicks at 500, 400. I need to create a path or line from the player to the mouse position on click and the closest tile that is underneath the path within 32px (or 2 tiles) must be chosen. The map is tiled at 16px.
A function call to see if a tile is at a given tile position is available Map.at(x,y).
I just don't know the maths to use to work this out.
The block blocks are within 16px, the red are within 32px. The grey block is the tile to be destroyed and the blue line is the invisible path between the player and mouse.
| 0
| 0
| 0
| 0
| 1
| 0
|
I have the following code:
NSUInteger one = 1;
CGPoint p = CGPointMake(-one, -one);
NSLog(@"%@", NSStringFromCGPoint(p));
Its output:
{4.29497e+09, 4.29497e+09}
On the other hand:
NSUInteger one = 1;
NSLog(@"%i", -one); // prints -1
I know there’s probably some kind of overflow going on, but why do the two cases differ and why doesn’t it work the way I want? Should I always remind myself of the particular numeric type of my variables and expressions even when doing trivial arithmetics?
P.S. Of course I could use unsigned int instead of NSUInteger, makes no difference.
| 0
| 0
| 0
| 0
| 1
| 0
|
Is it possible to assign an int variable a value that is a result of expression written in a string? E.g. I have a string "5 - 3" and the expected result is 2.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm working on a game, and I have the necessity to check a closed path in a given numerical heightmap:
The server and the client use this heightmap to set the right coords to move etc...
Now, when an user walks on a "special" tile, it lights...
My problem is:
When an user, walking on these tiles creates a closed path with empty tiles in it, the server should automatically fill the tiles in this path...
It should do something like this:
http://www.youtube.com/watch?v=kAVUNE2NTUQ - 1:32
I'm sure I've to use some maths here or there, but I dunno how...
I could do a "for" cycle, but it would be too long, and the problem is that the server needs to do the cycle every time an user walks...
Thanks in advance for your answers, hope someone could help me.
PS: I'm using C#
EDIT: When an user walks on a tile, the server automatically replaces the heightmap[X, Y] with an integer that represents the color of the user
| 0
| 0
| 0
| 0
| 1
| 0
|
Basically I need some text like:
I have an ice cream cone.
You are in trouble.
You need a bath.
And change it from 1st or 2nd person to 3rd person.
He has an ice cream cone.
He is in trouble.
He needs a bath.
I've started a js app, but it's super simple at the moment.
Before I waste time reinventing the wheel, I figured I'd ask: Is anyone aware of any 3rd party libraries that do this sort of thing? If not, does anyone have any advice or guidance to offer to help me get something going?
| 0
| 1
| 0
| 0
| 0
| 0
|
I have a float value that must be constrained to an multiple of 0.25.
Examples of valid values:
1.0, 1.25, 2.0, 2.5, 20.25, 20.5, 21.0, 21.25, ...
Examples of invalid values:
0.93, 3.31, 4.249, 5.02, ...
Is there an mathematic function or something convenient to achieve this? When the value is invalid, I would round it up to the nearest valid value.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm looking for something that I guess is rather sophisticated and might not exist publicly, but hopefully it does.
I basically have a database with lots of items which all have values (y) that correspond to other values (x). Eg. one of these items might look like:
x | 1 | 2 | 3 | 4 | 5
y | 12 | 14 | 16 | 8 | 6
This is just a a random example. Now, there are thousands of these items all with their own set of x and y values. The range between one x and the x after that one is not fixed and may differ for every item.
What I'm looking for is a library where I can plugin all these sets of Xs and Ys and tell it to return things like the most common item (sets of x and y that follow a compareable curve / progression), and the ability to check whether a certain set is atleast x% compareable with another set.
With compareable I mean the slope of the curve if you would draw a graph of the data. So, not actaully the static values but rather the detection of events, such as a high increase followed by a slow decrease, etc.
Due to my low amount of experience in mathematics I'm not quite sure what I'm looking for is called, and thus have trouble explaining what I need. Hopefully I gave enough pointers for someone to point me into the right direction.
I'm mostly interested in a library for javascript, but if there is no such thing any library would help, maybe I can try to port what I need.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm trying to perform a dictionary-based NER on some documents. My dictionary, regardless of the datatype, consists of key-value pairs of strings. I want to search for all the keys in the document, and return the corresponding value for that key whenever a match occurs.
The problem is, my dictionary is fairly large: ~7 million key-values - average length of keys: 8 and average length of values: 20 characters.
I've tried LingPipe with MapDictionary but on my desired environment setup, it runs out of memory after 200,000 rows are inserted. I don't know clearly why LingPipe uses a map and not a hashmap in their algorithm.
So the thing is, I don't have any previous experience with Lucene and I want to know if it makes such thing with such number possible in an easier way.
ps. I've already tried chunking the data into several dictionaries and writing them on disk but it's relatively slow.
Thanks for any help.
Cheers
Parsa
| 0
| 1
| 0
| 0
| 0
| 0
|
I have gyroscope + accelerometer data at each time period T.
Using C++, I want to calculate the rotation of the object at each time - it can rotate on its axes. I've read that it is convenient to represent the rotation of the system in terms of quaternions (not in Euler angles).
How can I transform from angular velocity (from gyroscope) to the quaternions representation? I think in order to do it I need to solve the differential equation using numerical methods.
| 0
| 0
| 0
| 0
| 1
| 0
|
I can't find the type of problem I have and I was wondering if someone knew the type of statistics it involves. I'm not sure it's even a type that can be optimized.
I'd like to optimize three variables, or more precisely the combination of 2. The first is a likert scale average the other is the frequency of that item being rated on that likert scale, and the third is the item ID. The likert is [1,2,3,4]
So:
3.25, 200, item1. Would mean that item1 was rated 200 times and got an average of 3.25 in rating.
I have a bunch of items and I'd like to find the high value items. For instance, an item that is 4,1 would suck because while it is rated highest, it is rated only once. And a 1,1000 would also suck for the inverse reason.
Is there a way to optimize with a simple heuristic? Someone told me to look into confidence bands but I am not sure how that would work. Thanks!
| 0
| 0
| 0
| 0
| 1
| 0
|
I've been reading a lot about Fast Fourier Transform and am trying to understand the low-level aspect of it. Unfortunately, Google and Wikipedia are not helping much at all.. and I have like 5 different algorithm books open that aren't helping much either.
I'm trying to find the FFT of something simple like a vector [1,0,0,0]. Sure I could just plug it into Matlab but that won't help me understand what's going on underneath. Also, when I say I want to find the FFT of a vector, is that the same as saying I want to find the DFT of a vector just with a more efficient algorithm?
| 0
| 0
| 0
| 0
| 1
| 0
|
Background
Here is the problem:
A black box outputs a new number each day.
Those numbers have been recorded for a period of time.
Detect when a new number from the black box falls outside the pattern of numbers established over the time period.
The numbers are integers, and the time period is a year.
Question
What algorithm will identify a pattern in the numbers?
The pattern might be simple, like always ascending or always descending, or the numbers might fall within a narrow range, and so forth.
Ideas
I have some ideas, but am uncertain as to the best approach, or what solutions already exist:
Machine learning algorithms?
Neural network?
Classify normal and abnormal numbers?
Statistical analysis?
| 0
| 0
| 0
| 1
| 0
| 0
|
I am trying to see if a given pair of (lat,long) will fall within a circular region. The centre of the circle is known (lat,long values) as well as the radius. The approcah I have used is:
Calculate the distance between the centre and the given lat/long using Haversines formula.
Formula:
a = ( sin(delta_lat/2) )^2 + cos (vp_Current.v_Latitude) *
cos(vp_CentreOfCircle.v_Latitude) * ( sin(delta_long/2) )^2;
c = 2 * atan2( sqrt(a), sqrt(1-a) );
d = R * c;
where: R = 6371 Km., delta_lat = lat2 - lat1, delta_long = long2 - long1
Then check if this distance is less than the radius to see if it is within the circle.
I have written the code in C but when I enter the following data the output says that the point is outside rather than within the circle (the point is within as I checked on google maps).
Centre(lat/long) = (19.228177, 72.685547)
Given point = (18.959999, 72.819999)
Radius = 30 miles (about 49 Km but entered as 50 in the program).
The weird thing is if I enter the radius as 5000, the output says inside but not even for 500. I don't know where the problem is..would be really grateful if anyone could share some pointers...thanks.
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm adding lines to my 3D world like we see in 3D studio max. To draw lines I'm using a cylinder mesh and simply stretching/rotating it appropriately. That's all working fine but my problem is scale. Since it's 3D geometry rendering in perspective its size changes, from a distance it's small to invisible, up close it's huge.
I want to make it so the size of the line geometry stays the same. I tried toying around with orthographic projection but came up with nothing. Any ideas?
| 0
| 0
| 0
| 0
| 1
| 0
|
I am beginning to explore using probability in my robotics applications. My goal is to progress to full SLAM, but I am starting with a more simple Kalman Filter to work my way up.
I am using Extended Kalman Filter, with state as [X,Y,Theta]. I use control input [Distance, Vector], and I have an array of 76 laser ranges [Distance,Theta] as my measurement input.
I am having trouble knowing how to decide on the covariance to use in my Gaussian function. Because my measurements are uncertain (The laser is about 1cm accurate at < 1meter, but can be up to 5cm accurate at ranges higher) I do not know how to create the 'function' to estimate the probability of this. I know this function is supposed to 'linearize' to be used, but I'm not sure how to go about this.
I am reasonably confident on how to decide on the function for my state Gaussian, I am happy to use a plain old mean=0,variance=1 on this.. This should work no? I would appreciate some help from people understanding Kalman Filters, because I think I may be missing something.
| 0
| 0
| 0
| 0
| 1
| 0
|
MATLAB has a magnificent robustfit function that solves the problem of excluding outliers with linear regression fitting. Is there anything similar written in Java or C (or in language X that could be adopted)?
| 0
| 0
| 0
| 0
| 1
| 0
|
do you know any good set of training images for my test neural network
preferably a tagged set of images of numbers or letters
or simple symbols
faces or real images might be too complex at this stage.
(i am tiring to implement a Boltzmann machine)
| 0
| 1
| 0
| 0
| 0
| 0
|
Now I have the following code:
SentenceModel sd_model = null;
try {
sd_model = new SentenceModel(new FileInputStream(
"opennlp/models/english/sentdetect/en-sent.bin"));
} catch (InvalidFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
SentenceDetectorME mSD = new SentenceDetectorME(sd_model);
String param = "This is a good senttence.I'm very happy. Who can tell me the truth.And go to school.";
String[] sents = mSD.sentDetect(param);
for(String sent : sents){
System.out.println(sent);
}
But I got the follwing results:
This is a good senttence.I'm very happy.
Who can tell me the truth.And go to school.
Absolutely, this isn't what we want. How can I fix the problem? thanx.
| 0
| 1
| 0
| 0
| 0
| 0
|
I am looking for a fast implementation of the "arrangement" algorithm (permutation with duplicates).
Given N objects (A in quantity a, B in quantity b, ...), generate all the possible combinations.
Exemple:
Arrangement("AAA", "B", "CC") would return :
"AAABCC" "AABACC" "AABCAC" "AABCCA" "ABAACC" "ABACAC" "ABACCA" "ABCAAC"
"ABCACA" "ABCCAA" "BAAACC" "BAACAC" "BAACCA" "BACAAC" "BACACA" "BACCAA"
"BCAAAC" "BCAACA" "BCACAA" "BCCAAA" "AAACBC" "AACABC" "AACBAC" "AACBCA"
"ACAABC" "ACABAC" "ACABCA" "ACBAAC" "ACBACA" "ACBCAA" "CAAABC" "CAABAC"
"CAABCA" "CABAAC" "CABACA" "CABCAA" "CBAAAC" "CBAACA" "CBACAA" "CBCAAA"
"AAACCB" "AACACB" "AACCAB" "AACCBA" "ACAACB" "ACACAB" "ACACBA" "ACCAAB"
"ACCABA" "ACCBAA" "CAAACB" "CAACAB" "CAACBA" "CACAAB" "CACABA" "CACBAA"
"CCAAAB" "CCAABA" "CCABAA" "CCBAAA"
(Code in C, C# or Pascal if possible)
Thanks in advance
Philippe
| 0
| 0
| 0
| 0
| 1
| 0
|
I tried to read the History monoid but couldn't wrap my head around it. Could somebody please explain it in simpler terms?
Thank you
Reference: http://en.wikipedia.org/wiki/History_monoid
| 0
| 0
| 0
| 0
| 1
| 0
|
I can have any number row which consists from 2 to 10 numbers. And from this row, I have to get geometrical progression.
For example:
Given number row: 125 5 625 I have to get answer 5. Row: 128 8 512 I have to get answer 4.
Can you give me a hand? I don't ask for a program, just a hint, I want to understand it by myself and write a code by myself, but damn, I have been thinking the whole day and couldn't figure this out.
Thank you.
DON'T WRITE THE WHOLE PROGRAM!
Guys, you don't get it, I can't just simple make a division. I actually have to get geometrical progression + show all numbers. In 128 8 512 row all numbers would be: 8 32 128 512
| 0
| 0
| 0
| 0
| 1
| 0
|
Ive got a bit stuck figuring it out for the negative direction? it must be really simple, but just cant seem to get it!
x = current x position
dir = direction of motion on x axis
if (tween == 'linear'){
if (dir == 1) {
x += (x / 5);
}
else if (dir == -1){
//what here??
}
}
| 0
| 0
| 0
| 0
| 1
| 0
|
I've always wondered the easiest way to figure out whether or not a point lies within a triangle, or in this instance, a rectangle cut into half diagonally.
Let's say I have a rectangle that is 64x64 pixels. With this rectangle, I want to return a TRUE value if a passed point is within the upper-left corner of the rectangle, and FALSE if it isn't.
-----
| /|
| / |
|<__|
Horray for bad ASCII art.
Anyway, the hypothetical points for this triangle that would return TRUE would be (0,0) and (63,0) and (0, 63). If a point lands on a line (e.g., 50,0) it would return TRUE as well.
Assuming 0,0 is in the upper-left corner and increases downwards...
I've had a possible solution in my head, but it seems more complicated than it should be - taking the passed Y value, determining where it would be in the rectangle, and figuring out manually where the line would cut at that Y value. E.g, a passed Y value of 16 would be quarter height of the rectangle. And thus, depending on what side you were checking (left or right), the line would either be at 16px or 48px, depending on the direction of the line. In the example above, since we're testing the upper-left corner, at 16px height, the line would be at 48px width
There has to be a better way.
EDIT:
The rectangle could also look like this as well
-----
|\ |
| \ |
|__>|
But I'm figuring in most cases the current answers already provided should still hold up...
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm looking for an efficient way to convert axes coordinates to pixel coordinates for multiple screen resolutions.
For example if had a data set of values for temperature over time, something like:
int temps[] = {-8, -5, -4, 0, 1, 0, 3};
int times[] = {0, 12, 16, 30, 42, 50, 57};
What's the most efficient way to transform the dataset to pixel coordinates so I could draw a graph on a 800x600 screen.
| 0
| 0
| 0
| 0
| 1
| 0
|
In our Learning Management System someone in their infinite wisdom decided to keep non-standardized grades. As a result we have a table similar to this:
Assignment 1 - 100
Assignment 2 - 80
Assignment 3 - 10/20
Assignment 4 - 68
Assignment 5 - 8/10
As you can see we have a mixture of percentages and fractions. What i'd like to do is check if the grade is a fraction i.e. 10/20 and if so convert it out to a percentage. Are there any built in php functions for either action? I was thinking of doing a strpos('/'/, $grade); to check if it was a fraction but is there a cleaner way? Additionally to break up the fraction and convert it to a decimal my initial thought was to explode the fraction grade on a / and do (array[1] * 100) / array[2].
Is there any better solution than the one i am thinking?
| 0
| 0
| 0
| 0
| 1
| 0
|
I am looking for a parser (or generated parser) in java that is capable of followings:
I will provide sentences that are already part-of-speech tagged. I will use my own tag set.
I don't have any statistical data. So if the parser is statistical, I want to be able to use it without this feature.
Adaptable to other languages easily. Low learning curve
| 0
| 1
| 0
| 0
| 0
| 0
|
Why is it that the parameters to the atan2 function are “backwards”? Ie, why does it accepts coordinates in the form y, x instead of the standard x, y?
| 0
| 0
| 0
| 0
| 1
| 0
|
I remember touching on this subject during a class on programming languages. I vaguely remember that a struct could be seen as a mathematical tuple. Is it possible to describe a class or an object in a similar fashion?
| 0
| 0
| 0
| 0
| 1
| 0
|
Just a matter of curiosity, is the Gray code defined for bases other than base two?
I tried to count in base 3, writing consecutive values paying attention to change only one trit at a time. I've been able to enumerate all the values up to 26 (3**3-1) and it seems to work.
000 122 200
001 121 201
002 120 202
012 110 212
011 111 211
010 112 210
020 102 220
021 101 221
022 100 222
The only issue I can see, is that all three trits change when looping back to zero. But this is only true for odd bases. When using even bases looping back to zero would only change a single digit, as in binary.
I even guess it can be extended to other bases, even decimal. This could lead to another ordering when counting in base ten ... :-)
0 1 2 3 4 5 6 7 8 9 19 18 17 16 15 14 13 12 11 10
20 21 22 23 24 25 26 27 28 29 39 38 37 36 35 34 33 32 31 30
Now the question, has anyone ever heard of it? Is there an application for it? Or it is just mathematical frenzy?
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm working on a (rather) simple 2D project in OpenGL. It's some sort of asteroids clone.
The ship is basically an isosceles triangle of height H, with the base have a length of H/2.
The way I've been doing it so far is simply storing the center point (CP) of the triangle and then calculating the final vertex positions on the fly. The 'point' of the ship is (vectors are x,y) the (CP.x, CP.y + H/2). The other two points are (CP.X - H/4, CP.Y - H/2) and (CP.X + H/4, CP.Y - H/2).
To get the ship facing the right direction, I first call glRotate on the current rotation angle.
This part is working fine however I'm running into issues with collision detection. Currently I'm trying to implement triangle-plane collision detection however to do that, I first need to figure out the actual points of the ship vertices after rotation. I've tried using trigonometry to calculate these points, however I've failed.
The way I've attempted is was to use the cosine rule to find the distance between the unrotated triangle and the triangle after rotation. To give an example, the following is how I've tried to calculate the 'pointy' vertex position after rotation:
//pA is a vector struct holding the position of the pointy vertex of the ship (centerPoint.x, centerPoint.y + height / 2)
//Distance between pA and the rotated pointy vertex - using the cosine rule
float distance = sqrt((2 * pow(size / 2, 2)) * (1 - cosf(rotAngle)));
//The angle to the calculated point
float newPointAngle = (M_PI / 2) - rotAngle;
float xDif = distance * cosf(newPointAngle);
float yDif = distance * sinf(newPointAngle);
//Actually drawing the new point
glVertex2f(pA.x - xDif, pA.y - yDif);
Any idea what I could be doing wrong?
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm studying simple machine learning algorithms, beginning with a simple gradient descent, but I've got some trouble trying to implement it in python.
Here is the example I'm trying to reproduce, I've got data about houses with the (living area (in feet2), and number of bedrooms) with the resulting price :
Living area (feet2) : 2104
#bedrooms : 3
Price (1000$s) : 400
I'm trying to do a simple regression using the gradient descent method, but my algorithm won't work...
The form of the algorithm is not using vectors on purpose (I'm trying to understand it step by step).
i = 1
import sys
derror=sys.maxint
error = 0
step = 0.0001
dthresh = 0.1
import random
theta1 = random.random()
theta2 = random.random()
theta0 = random.random()
while derror>dthresh:
diff = 400 - theta0 - 2104 * theta1 - 3 * theta2
theta0 = theta0 + step * diff * 1
theta1 = theta1 + step * diff * 2104
theta2 = theta2 + step * diff * 3
hserror = diff**2/2
derror = abs(error - hserror)
error = hserror
print 'iteration : %d, error : %s' % (i, error)
i+=1
I understand the math, I'm constructing a predicting function
with
and
being the variables (living area, number of bedrooms) and
the estimated price.
I'm using the cost function (
) (for one point) :
This is a usual problem, but I'm more of a software engineer and I'm learning one step at a time, can you tell me what's wrong ?
I got it working with this code :
data = {(2104, 3) : 400, (1600,3) : 330, (2400, 3) : 369, (1416, 2) : 232, (3000, 4) : 540}
for x in range(10):
i = 1
import sys
derror=sys.maxint
error = 0
step = 0.00000001
dthresh = 0.0000000001
import random
theta1 = random.random()*100
theta2 = random.random()*100
theta0 = random.random()*100
while derror>dthresh:
diff = 400 - (theta0 + 2104 * theta1 + 3 * theta2)
theta0 = theta0 + step * diff * 1
theta1 = theta1 + step * diff * 2104
theta2 = theta2 + step * diff * 3
hserror = diff**2/2
derror = abs(error - hserror)
error = hserror
#print 'iteration : %d, error : %s, derror : %s' % (i, error, derror)
i+=1
print ' theta0 : %f, theta1 : %f, theta2 : %f' % (theta0, theta1, theta2)
print ' done : %f' %(theta0 + 2104 * theta1 + 3*theta2)
which ends up with answers like this :
theta0 : 48.412337, theta1 : 0.094492, theta2 : 50.925579
done : 400.000043
theta0 : 0.574007, theta1 : 0.185363, theta2 : 3.140553
done : 400.000042
theta0 : 28.588457, theta1 : 0.041746, theta2 : 94.525769
done : 400.000043
theta0 : 42.240593, theta1 : 0.096398, theta2 : 51.645989
done : 400.000043
theta0 : 98.452431, theta1 : 0.136432, theta2 : 4.831866
done : 400.000043
theta0 : 18.022160, theta1 : 0.148059, theta2 : 23.487524
done : 400.000043
theta0 : 39.461977, theta1 : 0.097899, theta2 : 51.519412
done : 400.000042
theta0 : 40.979868, theta1 : 0.040312, theta2 : 91.401406
done : 400.000043
theta0 : 15.466259, theta1 : 0.111276, theta2 : 50.136221
done : 400.000043
theta0 : 72.380926, theta1 : 0.013814, theta2 : 99.517853
done : 400.000043
| 0
| 0
| 0
| 1
| 0
| 0
|
I've looked at a bunch of resources provided by similar questions asked on this site, the most helpful so far has been found in this discussion, and the resources linked here: PageRank Explained..
While this provides a detailed overview, I'm looking for something a bit more specific. While I realize there are other factors in play, and there have been multiple changes to the algorithm since it's inception, a good indication of the value passed from each link is this: PageRank divided by total pages linked. So if a site (page) has a PR of 8, and links to 20 sites, the amount of total value passed to each site is 8 / 20. Atleast that is what I am led to believe. I know that PageRank is a value between 1 - 10 on a logarithmic scale, meaning that going from a PR 1 to 2 is significantly less difficult than a PR 9 going to a 10. Here's where I am confused - how would one calculate the amount of PR transferred to each link. I'm very much so simplifying things, because a page with a PR 10 with around 10 outbound links should still be passing more value than a PR 5 site with 2 outbound links. What is the best way to understand the proper math behind this at a simple level?
| 0
| 0
| 0
| 0
| 1
| 0
|
Possible Duplicate:
How do Trigonometric functions work?
What actually goes into the computation of trig functions like Sin, Cos, Tan and Atan?
I think I've found an optimization in my code where I can avoid using any of these functions and base the problem around slope instead of angles. So that means a couple division operations in place of the above trig functions. But I'd like to know more about what goes into those trig functions so that I can compare my new code (from the perspective of number of basic math ops). Or maybe I've just found a more circuitous way of doing the same thing, or worse, introduced a less efficient method.
Using C++ and Python but I imagine these is fairly language agnostic with math operation cost being relative to the most primitive operations.
| 0
| 0
| 0
| 0
| 1
| 0
|
from Wikipedia: fourier division.
Here is a screenshot of the same:
(view in full-resolution)
What is the logic behind this algorithm?
I know it can be used to divide very large numbers, but how exactly does it work?
| 0
| 0
| 0
| 0
| 1
| 0
|
Simple question. I have this code:
total = 41
win = 48
echo ($total/$win) * 100 ;
printing out
85.416666666667
I need to remove the remainder so it prints out: 85 %.
| 0
| 0
| 0
| 0
| 1
| 0
|
I am using this Math for a bg color animation on hover:
var col = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
It produces a random rgb color. Very nice indeed but I look for something different.
Does anybody know a good Math that I can use to have that random color only out of a certain color range, like out of the red color range or out of the greens?
Any help is appreciated.
@Avinash, here is my complete code as I use it right now. How can I include your solution?
$(document).ready(function () {
//bg color animation
original = $('.item,.main-menu-button').css('background-color');
$('.item,.main-menu-button').hover(function () { //mouseover
var col = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')'; //random hover color
$(this).stop().animate({
'backgroundColor': col
}, 1000);
}, function () { //mouseout
$(this).stop().animate({
'backgroundColor': '#111'
}, 500); //original color as in css
});
});
It doesn´t work. I better leave it as it is. Thank to all of you for your help.
| 0
| 0
| 0
| 0
| 1
| 0
|
Possible Duplicate:
Algorithm to find minimum number of weighings required to find defective ball from a set of n balls
We have n coins. One of them is fake, which is heavier or lighter (we don't know). We have scales with 2 plates. How can we get the fake coin in p moves?
Can you give me a hand for writing such a program? No need a whole program, just ideas.
Thank you.
| 0
| 0
| 0
| 0
| 1
| 0
|
I have a homework problem for my algorithms class asking me to calculate the maximum size of a problem that can be solved in a given number of operations using an O(n log n) algorithm (ie: n log n = c). I was able to get an answer by approximating, but is there a clean way to get an exact answer?
| 0
| 0
| 0
| 0
| 1
| 0
|
Why is there a W term in a lot of 3D API's Vector class (i.e. Vector4(x, y, z, w) ) ? Are there math operations that absolutely require the W term?
| 0
| 0
| 0
| 0
| 1
| 0
|
Can anyone tell me what feature generators are with respect to natural language processors?
| 0
| 1
| 0
| 0
| 0
| 0
|
Having a bit of a brain freeze on how to do this. I have an image of an area of a soccer field which the user clicks on to indicate where something occured.
I want to store the coordinates in real world units in my database so that I could change the image at a later time. However, I can't figure out the formula to do this (ignoring the fact that a soccer field has a variable length).
So say my image is 400 px by 300px representing a real-world field 12000cm x 9000cm, what would the point 300px,100px be in centimeters? How would I then convert this cm value back into px on an image that was 800x600 px? Doing it in yards/inches would also be acceptable.
Please show me the working rather than just the single values. Thanks!
| 0
| 0
| 0
| 0
| 1
| 0
|
I am a newbie when it comes to information extraction. For the past several days, I have read a lot of academic papers and ordered a book on NLP. I want to figure out how I can build a FlipDog.com like system (hopefully not from scratch). They extract job openings from more than 60,000 company web sites. How do I get started?
I am open to learning any programming language. Has anybody used Mallet/GATE/MinorThird or RoadRunner? Ideally, I want to be able to train a system with the data set particular to my domain and have it extract information based on that. Which platform would you recommend for this purpose?
Thanks!
| 0
| 1
| 0
| 0
| 0
| 0
|
I wondered how you would go about tokenizing strings in English (or other western languages) if whitespaces were removed?
The inspiration for the question is the Sheep Man character in the Murakami novel 'Dance Dance Dance'
In the novel, the Sheep Man is translated as saying things like:
"likewesaid, we'lldowhatwecan. Trytoreconnectyou, towhatyouwant," said the Sheep Man. "Butwecan'tdoit-alone. Yougottaworktoo."
So, some punctuation is kept, but not all. Enough for a human to read, but somewhat arbitrary.
What would be your strategy for building a parser for this? Common combinations of letters, syllable counts, conditional grammars, look-ahead/behind regexps etc.?
Specifically, python-wise, how would you structure a (forgiving) translation flow? Not asking for a completed answer, just more how your thought process would go about breaking the problem down.
I ask this in a frivolous manner, but I think it's a question that might get some interesting (nlp/crypto/frequency/social) answers.
Thanks!
| 0
| 1
| 0
| 0
| 0
| 0
|
Greetings all,
I am in the designing phase of one of my hobby project.I am going to develop an 3D air-combat game . (inspired by HAWX).
But I am wondering how the AI works for enemy crafts ? I guess ,they do not move along a path (path finding on a graph)as in FPS games .
What kind of algorithms can I use for enemy craft movement?
Are there any AI libraries I can use for this?
Note: I use irrlicht engine,C++ as my development environment.
| 0
| 1
| 0
| 0
| 0
| 0
|
I am currently doing a project on person name disambiguation. The idea behind the project, that it will be able to identify the correct person, when there are multiple people with the same name. I have used wikipedia for this. I want to evaluate my project on some standard data. I am looking for some testing data. I am not familiar with popular names in wikipedia. Any idea, where I can find this data? I am not looking for vast amounts of data. I am just looking for some 100-500 examples.
Thank you
Adding more information to the question.
What I am looking for is of people with same names but are actually different. For ex, Michael Jordon is a famous basketball player and there is also a statistician with that name. I am looking for examples like this.
http://en.wikipedia.org/wiki/Michael_Jordan
http://en.wikipedia.org/wiki/Michael_I._Jordan
Hope, you understand the question now.
| 0
| 1
| 0
| 0
| 0
| 0
|
i want to show some data in percent.
i have a mathematics formula like:
(qty(S) + qty(B))/qty(id)*100%
could i show the result for example like 25%? how do i do that?
| 0
| 0
| 0
| 0
| 1
| 0
|
I've recently come across Intelligent Agents by reading this book :
link text
I'm interested in finding a good book for beginners, so I can start to implement such a system.
I've also tried reading "Multiagent Systems : A modern approach to distributed artificial intelligence" (can't find it on amazon) but it's not what I'm looking for.
Thanks for the help :).
| 0
| 1
| 0
| 0
| 0
| 0
|
I need to find whether a word is verb or noun or it is both
For example, the word is "search" it can be both noun and a verb but stanford parser gives NN tag to it..
is there any way that stanford parser will give that "search" is both noun and verb?
code that i use now
public static String Lemmatize(String word) {
WordTag w = new WordTag(word);
w.setTag(POSTagWord(word));
Morphology m = new Morphology();
WordLemmaTag wT = m.lemmatize(w);
return wT.lemma();
}
or should i use any other software to do it? please suggest me
thanks in advance
| 0
| 1
| 0
| 0
| 0
| 0
|
I have a somewhat math-oriented problem. I have a bunch of bitfields and would like to calculate what subset of them to xor together to achieve a certain other bitfield, or if there isn't a way to do it discover that no such subset exists.
I'd like to do this using a free library, rather than original code, and I'd strongly prefer something with Python bindings (using Python's built-in math libraries would be acceptable as well, but I want to port this to multiple languages eventually). Also it would be good to not take the memory hit of having to expand each bit to its own byte.
Some further clarification: I only need a single solution. My matrices are the opposite of sparse. I'm very interested in keeping the runtime to an absolute minimum, so using algorithmically fancy methods for inverting matrices is strongly preferred. Also, it's very important that the specific given bitfield be the one outputted, so a technique which just finds a subset which xor to 0 doesn't quite cut it.
And I'm generally aware of gaussian elimination. I'm trying to avoid doing this from scratch!
cross-posted to mathoverflow, because it isn't clear what the right place for this question is - https://mathoverflow.net/questions/41036/how-to-find-which-subset-of-bitfields-xor-to-another-bitfield
| 0
| 0
| 0
| 0
| 1
| 0
|
I would like to build a very simple application - Automated FAQ. I searched the internet and found some information about different approaches but there is no .Net specific example. Do you have som experience of building such application or maybe know some .Net specific examples? It would be very interesting to take a look at one.
Here is an example http://193.108.42.79/ikea-us/cgi-bin/ikea-us.cgi
Thanks in advance.
| 0
| 1
| 0
| 0
| 0
| 0
|
I currently have sensor data being dumped into a database. This is raw data, and needs an equation applied to it in order for it to make any sense to the end users. The problem I have, is that I do not know most of the formulas yet, and would also like the program to be flexible enough that when a new sensor is added to the system, the user would be able to enter in the calibration equation that would be able to convert the raw data into something useful.
I have never worked with letting a user enter in an equation to manipulate data. I would appreciate any input that might help. What direction should I be looking, should I be trying out lambda expression trees, evaluating the equation and compiling it using CodeDom, or looking in another direction? I have never done much with either lambda expression trees or CodeDom, and like always and on a fairly tight schedule, so the learning curve does count. I will have the opportunity to go back and make it better at a later date, they just need it up and running for now.
Thanks for any input.
| 0
| 0
| 0
| 0
| 1
| 0
|
Let A denote the set of positive integers whose decimal representation does not contain the digit 0. The sum of the reciprocals of the elements in A is known to be 23.10345.
Ex. 1,2,3,4,5,6,7,8,9,11-19,21-29,31-39,41-49,51-59,61-69,71-79,81-89,91-99,111-119, ...
Then take the reciprocal of each number, and sum the total.
How can this be verified numerically?
Write a computer program to verify this number.
Here is what I have written so far, I need help bounding this problem as this currently takes too long to complete:
Code in Java
import java.util.*;
public class recip
{
public static void main(String[] args)
{
int current = 0; double total = 0;
while(total < 23.10245)
{
if(Integer.toString(current).contains("0"))
{
current++;
}
else
{
total = total + (1/(double)current);
current++;
}
System.out.println("Total: " + total);
}
}
}
| 0
| 0
| 0
| 0
| 1
| 0
|
I'm reading through SICP, and the authors brush over the technique of average damping in computing the fixed points of functions. I understand that it's necessary in certain cases, ie square roots in order to damp out the oscillation of the function y = x/y however, I don't understand why it magically aids the convergence of the fixed point calculating function. Help?
edit
Obviously, I've thought this through somewhat. I can't seem to wrap my head around why averaging a function with itself would speed up convergence when applied repeatedly.
| 0
| 0
| 0
| 0
| 1
| 0
|
I cannot find a consistent method for finding the signed distance between a point and a plane. How can I calculate this given a plane defined as a point and a normal?
struct Plane
{
Vec3 point;
Vec3 normal;
}
| 0
| 0
| 0
| 0
| 1
| 0
|
how to compute the limit of f(x)=(log x)^(log x)?
the logs have base 2.
Is there a way to simplify the function further?
many thanks in advance.
| 0
| 0
| 0
| 0
| 1
| 0
|
I need to convert from fixed point signed Q8 format to fixed point signed Q4 format in c. I assume that I can just do a bitshift by four, is this correct? Do I need to take into account the sign bit?
Update: This is for an ARM11 architecture, but I would prefer a non-architecture specific solution.
Thanks
| 0
| 0
| 0
| 0
| 1
| 0
|
I am taking classes on intro to AI,and the teacher mentioned some point that for the classifier ZeroR,the accuracy under ZeroR is a helpful baseline for interpreting other classifiers.
I searched online about this but still couldn't get my head around it,could anyone give some idea on what that means please,thanks in advance.
| 0
| 1
| 0
| 1
| 0
| 0
|
I’m reading towards M.Sc. in Computer Science and just completed first year of the source. (This is a two year course). Soon I have to submit a proposal for the M.Sc. Project. I have selected following topic.
“Suitability of machine learning for document ranking in information retrieval system”. Researchers have been using various machine learning algorithms for ranking documents. So as the first phase of the project I will be doing a complete literature survey and finding out advantages/disadvantages of current approaches. In the second phase of the project I will be proposing a new (modified) algorithm in order to overcome the limitations of current approaches.
Actually my question is whether this type of project is suitable as a M.Sc. project? Moreover if somebody has some interesting idea in information retrieval filed, is it possible to share those ideas with me.
Thanks
| 0
| 0
| 0
| 1
| 0
| 0
|
I used the weka to train a J48 classifier,and it returned a textual representation of tree.
Now if I want to determine which feature is the most informative,how could I proceed?Any idea is welcomed.
Thanks in advance.
| 0
| 1
| 0
| 0
| 0
| 0
|
I need to choose an aray item based on the values of 4 variables, as shown below, in C.
0 | 1 | 0 | -1 | array[1][0]
-1 | 0 | 1 | 0 | array[1][1]
0 | -1 | 0 | 1 | array[1][2]
1 | 0 | -1 | 0 | array[1][3]
1 | 0 | 0 | -1 | array[2][0]
1 | 0 | 0 | 1 | array[2][1]
-1 | 0 | 0 | 1 | array[2][2]
-1 | 0 | 0 | -1 | array[2][3]
0 | 1 | -1 | 0 | array[3][0]
0 | 1 | 1 | 0 | array[3][1]
0 | -1 | 1 | 0 | array[3][2]
0 | -1 | -1 | 0 | array[3][3]
(The order of the second column in the array isn't important and can be reordered if needed.)
While it's possible (and completely acceptable) to just stick all the possibilities in 12 chained ifs, I'd like to see if anyone can come up with a "cleaner" solution.
EDIT: to clarify: I want a function f(a,b,c,d) where (for example) f(0, 1, 0, -1) returns the value held in array[1][0].
| 0
| 0
| 0
| 0
| 1
| 0
|
Two DFAs (Deterministic Finite Automaton or Deterministic Fininte-State Machines - Which will be called DFAs from here on)
Defined over the set
DFA 1: L1 = {Q1, E, D1, s1, F}
DFA 2: L2 = {Q2, E, D2, s2, F}
Q is the list of states. Ex 1, 2, 3, 4 or a, b, c, d
E is the the language Ex. 0, 1
D is the transition set Ex. {(a,0,b)} state a goes to b on a 0
s is the starting state
F is the final state
How would you take and exclusive-or of two DFAs L1 and L2
| 0
| 0
| 0
| 0
| 1
| 0
|
OK, so I have a play field of 512x512 which wraps around, -32 becomes 512 for both x and y.
Now I need to calculate the angle between two entities, I have the following code as a kind of workaround, it works most of the time, but sometimes it still fails:
Shooter.getAngle = function(a, b) {
var ax = a.x;
var bx = b.x;
if (a.x < this.width / 4 && b.x > this.width - this.width / 4) {
ax += this.width;
} else if (a.x > this.width - this.width / 4 && b.x < this.width / 4) {
bx += this.width;
}
var ay = a.y;
var by = b.y;
if (a.y < this.height / 4 && b.x > this.height - this.height / 4) {
ay += this.height;
} else if (a.y > this.height - this.height / 4 && b.y < this.height / 4) {
by += this.height;
}
return this.wrapAngle(Math.atan2(ax - bx, ay - by) + Math.PI);
};
I just can't figure out how to project a onto b so that the wrapping is accounted for correctly.
If anyone could help, it would be great, since homing missiles that fly away from their target aren't that fun.
For clarification, if the player is moving right, the missile should follow him over the edge of the field to the left side, just as another player would do.
EDIT:
Here's a test version, the examples show that it wraps correctly but in cases were it doesn't have to wrap it breaks:
function getAngle(a, b) {
var tx = a.x - b.x;
var ty = a.y - b.y;
// actual area goes from -16 to 512 due to the border space that's out of screen
tx = ((tx + 16) % (480 + 32)) - 16;
ty = ((ty + 16) % (480 + 32)) - 16;
var r = Math.atan2(ty, tx) * (180 / Math.PI);
// example
// |> b a >|
// a.x = 460
// b.x = 60
// missile should go over the right border
// tx = 400
// r = 0
// missile goes right, OK
// example2
// |< a b <|
// a.x = 60
// b.x = 460
// missile should go over the left border
// tx = -400
// r = 180
// missile goes left, OK
// example3
// | a >>>> b |
// a.x = 60
// b.x = 280
// missile should go right
// tx = -220
// r = 180
// missile goes left, WRONG
// example4
// | b <<<< a |
// a.x = 280
// b.x = 60
// missile should go left
// tx = 220
// r = 0
// missile goes right, WRONG
console.log(ty, tx);
console.log(r);
}
function Point(x, y) {
this.x = x;
this.y = y;
}
getAngle(new Point(460, 240), new Point(60, 240));
getAngle(new Point(60, 240), new Point(460, 240));
getAngle(new Point(60, 240), new Point(280, 240));
getAngle(new Point(280, 240), new Point(60, 240));
It seems the only way to getting it work is by checking for cases when a.x < width * 0.25 and b.x > width * 0.75 etc. but that's buggy, at least in the version I posted above :/
| 0
| 0
| 0
| 0
| 1
| 0
|
after a hard work, my brain turns out of service.. (it is 11:40 P.M. in Turkey)
I am doing a rotation job.:
variables:
_cx = horizontal center of rect
_cy = vertical center of rect
_cos = cos value of current angle
_sin = sin value of current angle
to rotating any point in this rect :
function getx(x, y)
{
return _cx + _cos * (x - _cx) - _sin * (y - _cy);
}
function gety(x, y)
{
return _cy + _sin * (x - _cx) + _cos * (y - _cy);
}
I am trying to do resize given rectangle before rotation process to maximum size what fitted in original bounds.. how could I do?
thanks your advance
EDIT : Igor Krivokon's solution
The problem is solved by Igor Krivokon, and here is the modified version of that solution what works for every angle value
var h1:Number, h2:Number, hh:Number, ww:Number,
degt:Number, d2r:Number, r2d:Number, deg:Number,
sint:Number, cost:Number;
//@angle = given angle in radians
//@r is source/target rectangle
//@d2r is static PI / 180 constant for degree -> radian conversation
//@r2d is static 180 / PI constant for radian -> degree conversation
d2r = 0.017453292519943295769236907683141;
r2d = 57.295779513082320876798154814105;
deg = Math.abs(angle * r2d) % 360;
if(deg < 91)
{
degt = angle;
}else if(deg < 181){
degt = (180 - deg) * d2r;
}else if(deg < 271){
degt = (deg - 180) * d2r;
}else{
degt = (360 - deg) * d2r;
}
sint = Math.sin(degt);
cost = Math.cos(degt);
h1 = r.height * r.height / (r.width * sint + r.height * cost);
h2 = r.height * r.width / (r.width * cost + r.height * sint);
hh = Math.min(h1, h2);
ww = hh * r.width / r.height;
r.x = (r.width - ww) * .5;
r.y = (r.height - hh) * .5;
r.height = hh;
r.width = ww;
Thanks
| 0
| 0
| 0
| 0
| 1
| 0
|
Reading through more SICP and I'm stuck on exercise 1.3.8. My code works properly for approximating 1/phi, but doesn't work for approximating e - 2.
(define (cont-frac n d k)
(define (frac n d k)
(if (= k 0)
1.0
(+ (d k) (/ (n (+ k 1)) (frac n d (- k 1))))))
(/ (n 1) (frac n d k)))
(define (eulers-e-2)
(cont-frac (lambda (i) 1.0)
(lambda (i)
(if (= (remainder (+ i 1) 3) 0)
(* 2.0 (/ (+ i 1) 3))
1.0))
100))
(define (1-over-phi)
(cont-frac (lambda (i) 1.0)
(lambda (i) 1.0)
100))
Instead of getting .7 blah blah blah for e-2, I'm getting .5 blah blah something. I can't figure out why. I'm pretty sure I have "d" defined properly in the "eulers-e-2" function.
Edit:
Thanks guys, I was calculating it backwards. Here's the fixed code.
(define (cont-frac n d k)
(define (frac n d i)
(if (= k i)
(d i)
(+ (d i) (/ (n (+ i 1)) (frac n d (+ i 1))))))
(/ (n 1) (frac n d 1)))
| 0
| 0
| 0
| 0
| 1
| 0
|
Trying to work out distance between two points (lat & lng)
I have an issue because PHP is (after running through my distance function) returning the same distance regardless.
I break it down and I find that PHP has an issue with some maths
For this example, assume:
Lat2: 49.263205
So, I want to convert lat2 to a radian
$pi = pi();
$radianlat2 = $lat2 * ( $pi / 180);
and PHP is failing, it's giving me the same number everytime, regardless of the lat I feed it.
If I break it down I can explain:
$pi / 180 = 0.017453292519943
49.263205 * 0.017453292519943 = 0.859805127334919
BUT if you echo $radianlat2 above you get: 0.85521133347722
Did I just break PHP or am I loosing the plot?
| 0
| 0
| 0
| 0
| 1
| 0
|
Here is an example of my problem
library(RWeka)
iris <- read.arff("iris.arff")
Perform nfolds to obtain the proper accuracy of the classifier.
m<-J48(class~., data=iris)
e<-evaluate_Weka_classifier(m,numFolds = 5)
summary(e)
The results provided here are obtained by building the model with a part of the dataset and testing it with another part, therefore provides accurate precision
Now I Perform AdaBoost to optimize the parameters of the classifier
m2 <- AdaBoostM1(class ~. , data = temp ,control = Weka_control(W = list(J48, M = 30)))
summary(m2)
The results provided here are obtained by using the same dataset for building the model and also the same ones used for evaluating it, therefore the accuracy is not representative of real life precision in which we use other instances to be evaluated by the model. Nevertheless this procedure is helpful for optimizing the model that is built.
The main problem is that I can not optimize the model built, and at the same time test it with data that was not used to build the model, or just use a nfold validation method to obtain the proper accuracy.
| 0
| 0
| 0
| 1
| 0
| 0
|
This is actually for a programming contest, but I've tried really hard and haven't got even the faintest clue how to do this.
Find the first and last k digits of nm where n and m can be very large ~ 10^9.
For the last k digits I implemented modular exponentiation.
For the first k I thought of using the binomial theorem upto certain powers but that involves quite a lot of computation for factorials and I'm not sure how to find an optimal point at which n^m can be expanded as (x+y)m.
So is there any known method to find the first k digits without performing the entire calculation?
Update 1 <= k <= 9 and k will always be <= digits in nm
| 0
| 0
| 0
| 0
| 1
| 0
|
Say I have two sequences of numbers, A and B.
How can I create an object to describe the relationship between the two sequences?
For example:
A: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9...
B: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18...
B = 2A
The relationship, f() is how we get from A to B.
But given two arbitrary sequences, how can I construct f?
Also, how can I return f to the calling method so that it can simply use it straight away with any number? -- Can you use delegate as a return type?
I have one idea but maybe you could advise me on it: I could use a decorator pattern to build an object containing various operators and constants etc... Then just generate the code. This is very messy and I don't want to use this method.
I'm not asking how to find f, I can do that. I'm asking how to model f.
Sorry if all that is not clear, I don't know how else to explain it.
| 0
| 0
| 0
| 0
| 1
| 0
|
Given a time series of sensor state intervals, how do I implement a classifier which learns from supervised training data to detect an incident based on a sequence of state intervals? To simplify the problem, sensor states are reduced to either true or false.
Update: I've found this paper (PDF) on Mining Sequences of Temporal Intervals which addresses a similar problem. Another paper (Google Docs) on Mining Hierarchical Temporal Patterns in Multivariate Time Series takes a novel approach, but deals with hierarchical data.
Example Training Data
The following data is a training example for an incident, represented as a graph over time, where /¯¯¯\ represents a true state interval and \___/ a false state interval for a sensor.
Sensor | Sensor State over time
| 0....5....10...15...20...25... // timestamp
---------|--------------------------------
A | ¯¯¯¯¯¯¯¯¯¯¯¯\________/¯¯¯¯¯¯¯¯
B | ¯¯¯¯¯\___________________/¯¯¯¯
C | ______________________________ // no state change
D | /¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯
E | _________________/¯¯¯¯¯¯¯¯\___
Incident Detection vs Sequence Labeling vs Classification
I initially generalised my problem as a two-category sequence labeling problem, but my categories really represented "normal operation" and a rare "alarm event" so I have rephrased my question as incident detection. Training data is available for "normal operation" and "alarm incident".
To reduce problem complexity, I have discretized sensor events to boolean values, but this need not be the case.
Possible Algorithms
A hidden Markov model seems to be a possible solution, but would it be able to use the state intervals? If a sequence labeler is not the best approach for this problem, alternative suggestions would be appreciated.
Bayesian Probabilistic Approach
Sensor activity will vary significantly by time of day (busy in mornings, quiet at night). My initial approach would have been to measure normal sensor state over a few days and calculate state probability by time of day (hour). The combined probability of sensor states at an unlikely hour surpassing an "unlikelihood threshold" would indicate an incident. But this seemed like it would raise a false alarm if the sensors were noisy. I have not yet implemented this, but I believe that approach has merit.
Feature Extraction
Vector states could be represented as state interval changes occurring at a specific time and lasting a specific duration.
struct StateInterval
{
int sensorID;
bool state;
DateTime timeStamp;
TimeSpan duration;
}
eg. Some State Intervals from the process table:
[ {D, true, 0, 3} ]; [ {D, false, 4, 1} ]; ...
[ {A, true, 0, 12} ]; [ {B, true, 0, 6} ]; [ {D, true, 0, 3} ]; etc.
A good classifier would take into account state-value intervals and recent state changes to determine if a combination of state changes closely matches training data for a category.
Edit: Some ideas after sleeping on how to extract features from multiple sensors' alarm data and how to compare it to previous data...
Start by calculating the following data for each sensor for each hour of the day:
Average state interval length (for true and false states)
Average time between state changes
Number of state changes over time
Each sensor could then be compared to every other sensor in a matrix with data like the following:
Average time taken for sensor B to change to a true state after sensor A did. If an average value is 60 seconds, then a 1-second wait would be more interesting than a 120-second wait.
Average number of state changes sensor B underwent while sensor A was in one state
Given two sets of training data, the classifier should be able to determine from these feature sets which is the most likely category for classification.
Is this a sensible approach and what would be a good algorithm to compare these features?
Edit: the direction of a state change (false->true vs true-false) is significant, so any features should take that into account.
| 0
| 0
| 0
| 1
| 0
| 0
|
I'm interested in working in the Oil and Gas Industry as a Software Engineer. What sort of Math is commonly required to work in this industry? Any first hand experience would be beneficial.
| 0
| 0
| 0
| 0
| 1
| 0
|
I am writing an application which is recording some 'basic' stats -- page views, and unique visitors. I don't like the idea of storing every single view, so have thought about storing totals with a hour/day resolution. For example, like this:
Tuesday 500 views 200 unique visitors
Wednesday 400 views 210 unique visitors
Thursday 800 views 420 unique visitors
Now, I want to be able to query this data set on chosen time periods -- ie, for a week. Calculating views is easy enough: just addition. However, adding unique visitors will not give the correct answer, since a visitor may have visited on multiple days.
So my question is how do I determine or estimate unique visitors for any time period without storing each individual hit. Is this even possible? Google Analytics reports these values -- surely they don't store every single hit and query the data set for every time period!?
I can't seem to find any useful information on the net about this. My initial instinct is that I would need to store 2 sets of values with different resolutions (ie day and half-day), and somehow interpolate these for all possible time ranges. I've been playing with the maths, but can't get anything to work. Do you think I may be on to something, or on the wrong track?
Thanks,
Brendon.
| 0
| 0
| 0
| 0
| 1
| 0
|
I found this sweet code here:
http://geeksforgeeks.org/?p=767
the source link: http://mathworld.wolfram.com/Permutation.html
ok how do I even begin to understand these codes?
how do I start coding like this?
I have encountered many such codes...using dynamic programming, backtracking, branch and bound...and understood squat.
even if u debug them..u cannot understand much..let alone start coding like them.
is some kind of advanced math knowledge is needed..?
| 0
| 0
| 0
| 0
| 1
| 0
|
I have 3 questions pertaining to decimal arithmetic in Python, all 3 of which are best asked inline:
1)
>>> from decimal import getcontext, Decimal
>>> getcontext().prec = 6
>>> Decimal('50.567898491579878') * 1
Decimal('50.5679')
>>> # How is this a precision of 6? If the decimal counts whole numbers as
>>> # part of the precision, is that actually still precision?
>>>
and
2)
>>> from decimal import getcontext, Decimal
>>> getcontext().prec = 6
>>> Decimal('50.567898491579878')
Decimal('50.567898491579878')
>>> # Shouldn't that have been rounded to 6 digits on instantiation?
>>> Decimal('50.567898491579878') * 1
Decimal('50.5679')
>>> # Instead, it only follows my precision setting set when operated on.
>>>
3)
>>> # Now I want to save the value to my database as a "total" with 2 places.
>>> from decimal import Decimal
>>> # Is the following the correct way to get the value into 2 decimal places,
>>> # or is there a "better" way?
>>> x = Decimal('50.5679').quantize(Decimal('0.00'))
>>> x # Just wanted to see what the value was
Decimal('50.57')
>>> foo_save_value_to_db(x)
>>>
| 0
| 0
| 0
| 0
| 1
| 0
|
I've been studying hierachial reinforcement learning problems, and while a lot of papers propose interesting ways for learning a policy, they all seem to assume they know in advance a graph structure describing the actions in the domain. For example, The MAXQ Method for Hierarchial Reinforcement Learning by Dietterich describes a complex graph of actions and sub-tasks for a simple Taxi domain, but not how this graph was discovered. How would you learn the hierarchy of this graph, and not just the policy?
| 0
| 1
| 0
| 1
| 0
| 0
|
I have recently been inspired to write spam filters in JavaScript, Greasemonkey-style, for several websites I use that are prone to spam (especially in comments). When considering my options about how to go about this, I realize I have several options, each with pros/cons. My goal for this question is to expand on this list I have created, and hopefully determine the best way of client-side spam filtering with JavaScript.
As for what makes a spam filter the "best", I would say these are the criteria:
Most accurate
Least vulnerable to attacks
Fastest
Most transparent
Also, please note that I am trying to filter content that already exists on websites that aren't mine, using Greasemonkey Userscripts. In other words, I can't prevent spam; I can only filter it.
Here is my attempt, so far, to compile a list of the various methods along with their shortcomings and benefits:
Rule-based filters:
What it does: "Grades" a message by assigning a point value to different criteria (i.e. all uppercase, all non-alphanumeric, etc.) Depending on the score, the message is discarded or kept.
Benefits:
Easy to implement
Mostly transparent
Shortcomings:
Transparent- it's usually easy to reverse engineer the code to discover the rules, and thereby craft messages which won't be picked up
Hard to balance point values (false positives)
Can be slow; multiple rules have to be executed on each message, a lot of times using regular expressions
In a client-side environment, server interaction or user interaction is required to update the rules
Bayesian filtering:
What it does: Analyzes word frequency (or trigram frequency) and compares it against the data it has been trained with.
Benefits:
No need to craft rules
Fast (relatively)
Tougher to reverse engineer
Shortcomings:
Requires training to be effective
Trained data must still be accessible to JavaScript; usually in the form of human-readable JSON, XML, or flat file
Data set can get pretty large
Poorly designed filters are easy to confuse with a good helping of common words to lower the spamacity rating
Words that haven't been seen before can't be accurately classified; sometimes resulting in incorrect classification of entire message
In a client-side environment, server interaction or user interaction is required to update the rules
Bayesian filtering- server-side:
What it does: Applies Bayesian filtering server side by submitting each message to a remote server for analysis.
Benefits:
All the benefits of regular Bayesian filtering
Training data is not revealed to users/reverse engineers
Shortcomings:
Heavy traffic
Still vulnerable to uncommon words
Still vulnerable to adding common words to decrease spamacity
The service itself may be abused
To train the classifier, it may be desirable to allow users to submit spam samples for training. Attackers may abuse this service
Blacklisting:
What it does: Applies a set of criteria to a message or some attribute of it. If one or more (or a specific number of) criteria match, the message is rejected. A lot like rule-based filtering, so see its description for details.
CAPTCHAs, and the like:
Not feasible for this type of application. I am trying to apply these methods to sites that already exist. Greasemonkey will be used to do this; I can't start requiring CAPTCHAs in places that they weren't before someone installed my script.
Can anyone help me fill in the blanks? Thank you,
| 0
| 1
| 0
| 0
| 0
| 0
|
Greetings everyone,
A friend and I are discussing the possibility of a new project: A translation program that will pop up a translation whenever you hover over any word in any control, even static, non-editable ones. I know there are many browser plugins to do this sort of thing on webpages; we're thinking about how we would do it system-wide (on Windows).
Of course, the key difficulty is figuring out the word the user is hovering over. I'm aware of MSAA and Automation, but as far as I can tell, those things only allow you to get the entire contents of a control, not the specific word the mouse is over.
I stumbled upon this (proprietary) application that does pretty much exactly what we want to do: http://www.gettranslateit.com/
Somehow they are able to get the exact word the user is hovering over in almost any application (It seems to have trouble in a few apps, notably Windows Explorer). It even grabs text out of obviously custom-drawn controls, somehow. At first I thought it must be using OCR. But even when I shrink the font so far down that the text becomes a completely unreadable blob, it can still recognize words perfectly. (And yet, it doesn't recognize anything if I change the font to Wingdings. But maybe that's by design?)
Any ideas as to how it's achieving this seemingly impossible task?
EDIT: It doesn't work with Wingdings, but it does work with some other nonsense fonts, so I've confirmed it can't be OCR.
| 0
| 1
| 0
| 0
| 0
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.