Search Results

Search found 193 results on 8 pages for 'approximate'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • sample java code for approximate string matching or boyer-moore extended for approximate string matc

    - by Dolphin
    Hi I need to find 1.mismatch(incorrectly played notes), 2.insertion(additional played), & 3.deletion (missed notes), in a music piece (e.g. note pitches [string values] stored in a table) against a reference music piece. This is either possible through exact string matching algorithms or dynamic programming/ approximate string matching algos. However I realised that approximate string matching is more appropriate for my problem due to identifying mismatch, insertion, deletion of notes. Or an extended version of Boyer-moore to support approx. string matching. Is there any link for sample java code I can try out approximate string matching? I find complex explanations and equations - but I hope I could do well with some sample code and simple explanations. Or can I find any sample java code on boyer-moore extended for approx. string matching? I understand the boyer-moore concept, but having troubles with adjusting it to support approx. string matching (i.e. to support mismatch, insertion, deletion). Also what is the most efficient approx. string matching algorithm (like boyer-moore in exact string matching algo)? Greatly appreciate any insight/ suggestions. Many thanks in advance

    Read the article

  • Django approximate matching of unicode strings with ascii equivalents

    - by c
    I have the following model and instance: class Bashable(models.Model): name = models.CharField(max_length=100) >>> foo = Bashable.objects.create(name=u"piñata") Now I want to be able to search for objects, but using ascii characters rather than unicode, something like this: >>> Bashable.objects.filter(name__lookslike="pinata") Is there a way in Django to do this sort of approximate string matching, using ascii stand-ins for the unicode characters in the database? Here is a related question, but for Apple's Core Data.

    Read the article

  • Address Is Approximate: A Brilliant Stop Motion and Street View Mashup [Video]

    - by Jason Fitzpatrick
    In this moving and brilliantly executed stop motion film, a small toy takes a voyage across the world without leaving the desk he lives on. Address is Approximate, a short stop motion film by Tom Jenkins, is a moving little film that combines Google Street View, stop motion, a collection of small desktop toys, and very clever use of office objects to great effect. [via GeekDad] How to See What Web Sites Your Computer is Secretly Connecting To HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast!

    Read the article

  • Find points whose pairwise distances approximate a given distance matrix

    - by Stephan Kolassa
    Problem. I have a symmetric distance matrix with entries between zero and one, like this one: D = ( 0.0 0.4 0.0 0.5 ) ( 0.4 0.0 0.2 1.0 ) ( 0.0 0.2 0.0 0.7 ) ( 0.5 1.0 0.7 0.0 ) I would like to find points in the plane that have (approximately) the pairwise distances given in D. I understand that this will usually not be possible with strictly correct distances, so I would be happy with a "good" approximation. My matrices are smallish, no more than 10x10, so performance is not an issue. Question. Does anyone know of an algorithm to do this? Background. I have sets of probability densities between which I calculate Hellinger distances, which I would like to visualize as above. Each set contains no more than 10 densities (see above), but I have a couple of hundred sets. What I did so far. I did consider posting at math.SE, but looking at what gets tagged as "geometry" there, it seems like this kind of computational geometry question would be more on-topic here. If the community thinks this should be migrated, please go ahead. This looks like a straightforward problem in computational geometry, and I would assume that anyone involved in clustering might be interested in such a visualization, but I haven't been able to google anything. One simple approach would be to randomly plonk down points and perturb them until the distance matrix is close to D, e.g., using Simulated Annealing, or run a Genetic Algorithm. I have to admit that I haven't tried that yet, hoping for a smarter way. One specific operationalization of a "good" approximation in the sense above is Problem 4 in the Open Problems section here, with k=2. Now, while finding an algorithm that is guaranteed to find the minimum l1-distance between D and the resulting distance matrix may be an open question, it still seems possible that there at least is some approximation to this optimal solution. If I don't get an answer here, I'll mail the gentleman who posed that problem and ask whether he knows of any approximation algorithm (and post any answer I get to that here).

    Read the article

  • Approximate string matching with a letter confusion matrix?

    - by zigglenaut
    I'm trying to model a phonetic recognizer that has to isolate instances of words (strings of phones) out of a long stream of phones that doesn't have gaps between each word. The stream of phones may have been poorly recognized, with letter substitutions/insertions/deletions, so I will have to do approximate string matching. However, I want the matching to be phonetically-motivated, e.g. "m" and "n" are phonetically similar, so the substitution cost of "m" for "n" should be small, compared to say, "m" and "k". So, if I'm searching for [mein] "main", it would match the letter sequence [meim] "maim" with, say, cost 0.1, whereas it would match the letter sequence [meik] "make" with, say, cost 0.7. Similarly, there are differing costs for inserting or deleting each letter. I can supply a confusion matrix that, for each letter pair (x,y), gives the cost of substituting x with y, where x and y are any letter or the empty string. I know that there are tools available that do approximate matching such as agrep, but as far as I can tell, they do not take a confusion matrix as input. That is, the cost of any insertion/substitution/deletion = 1. My question is, are there any open-source tools already available that can do approximate matching with confusion matrices, and if not, what is a good algorithm that I can implement to accomplish this?

    Read the article

  • Big O, how do you calculate/approximate it?

    - by Sven
    Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how (in)efficient an algorithm really is and if you know in what category the problem you are trying to solve lays in you can figure out if it is still possible to squeeze out that little extra performance.* But I'm curious, how do you calculate or approximate the complexity of your algorithms? *: but as they say, don't overdo it, premature optimization is the root of all evil, and optimization without a justified cause should deserve that name as well.

    Read the article

  • Approximate timings for various operations on a "typical desktop PC" anno 2010

    - by knorv
    In the article "Teach Yourself Programming in Ten Years" Peter Norvig (Director of Research, Google) gives the following approximate timings for various operations on a typical 1GHz PC back in 2001: execute single instruction = 1 nanosec = (1/1,000,000,000) sec fetch word from L1 cache memory = 2 nanosec fetch word from main memory = 10 nanosec fetch word from consecutive disk location = 200 nanosec fetch word from new disk location (seek) = 8,000,000 nanosec = 8 millisec What would the corresponding timings be for your definition of a typical PC desktop anno 2010?

    Read the article

  • An approximate algorithm for finding Steiner Forest.

    - by Tadeusz A. Kadlubowski
    Hello. Consider a weighted graph G=(V,E,w). We are given a family of subsets of vertices V_i. Those sets of vertices are not necessarily disjoint. A Steiner Forest is a forest that for each subset of vertices V_i connects all of the vertices in this subset with a tree. Example: only one subset V_1 = V. In this case a Steiner forest is a spanning tree of the whole graph. Enough theory. Finding such a forest with minimal weight is difficult (NP-complete). Do you know any quicker approximate algorithm to find such a forest with non-optimal weight?

    Read the article

  • Categorize the approximate shape of an array of Points in 3D Space

    - by user1295133
    I have a set of points in 3d space and I want to be able to categorize the shape that best fits them - cube, sphere, cylinder, planar (flat) etc. I've looked at supervised/machine learning but since I need first generate a large training data set that's not really suitable. My dream solution would be a java library with a wonderful magical function something like : public enum ShapeType { CUBE, SPHERE, CYLINDER, PLANAR } public ShapeType CategorizeShapeFromPoints( 3DPoint[] points ) However, any and all help will be appreciated. Thanks

    Read the article

  • Approximate Number of CPU Cycles for Various Operations

    - by colordot
    I am trying to find a reference for approximately how many CPU cycles various operations require. I don't need exact numbers (as this is going to vary between CPUs) but I'd like something relatively credible that gives ballpark figures that I could cite in discussion with friends. As an example, we all know that floating point division takes more CPU cycles than say doing a bitshift. I'd guess that the difference is that the division is around 100 cycles, where as a shift is 1 but I'm looking for something to cite to back that up. Can anyone recommend such a resource?

    Read the article

  • Approximate photo of a simple drawing using lines

    - by user3704596
    As an input I have a photo of a simple symbol, e.g.: https://www.dropbox.com/s/nrmsvfd0le0bkke/symbol.jpg I would like to detect the straight lines in it, like points of start and ends of the lines. In this case, assuming the top left of the symbol is (0,0), the lines would be defined like this: start end (coordinates of beginning and end of a line) 1. (0,0); (0,10) (vertical line) 2. (0,10); (15, 15) 3. (15,15); (0, 20) 4. (0,20); (0,30) How can I do it (pereferably using OpenCV)? I though about Hough lines, but they seem to be good for perfect thin straight lines, which is not the case in a drawing. I'll probably work on binarized image, too.

    Read the article

  • How can I find the approximate daily traffic of a site which I don't own?

    - by John Thomas
    I want to find the approximate daily traffic of a site which isn't ours, and the site is located in other country than US (in Greece - hence no Quantcast or Compete.com afaik) and it doesn't use Google Ads (hence no Google Ad Planner). I know about Alexa but the site(s) has/have relatively low traffic and the Alexa's rank isn't very useful (same stands to Google Trends). Or perhaps I should look more at Alexa's data? Any other ideas? PS: I looked before posting here and here. No luck.

    Read the article

  • What is approximate cost to develop iPhone/iPad app? Features described

    - by innodeasapps
    Need your help guys... I was working as an iPhone developer since last few months. And just a month ago I left the job, and now i got an offer to develop an iPhone/iPad app. I need to develop an universal app which has frames like PicFrame in which photos must adjust accordingly, with customizable frames, few photo effects like in instagram (Not exactly same but something like it) and then user can share photos on Facebook, tumbler,dropbox, etc. I might need around 30 days time to develop the desired app. Note that designing is not my part, I need to develop and test it thoroughly. I have no idea how much price should I ask to develop such app. As here is the place where we all developers meet, I feel I would get proper guidance. Thank you in advance...

    Read the article

  • How do I compute the approximate entropy of a bit string?

    - by dreeves
    Is there a standard way to do this? Googling -- "approximate entropy" bits -- uncovers multiple academic papers but I'd like to just find a chunk of pseudocode defining the approximate entropy for a given bit string of arbitrary length. (In case this is easier said than done and it depends on the application, my application involves 16,320 bits of encrypted data (cyphertext). But encrypted as a puzzle and not meant to be impossible to crack. I thought I'd first check the entropy but couldn't easily find a good definition of such. So it seemed like a question that ought to be on StackOverflow! Ideas for where to begin with de-cyphering 16k random-seeming bits are also welcome...) See also this related question: http://stackoverflow.com/questions/510412/what-is-the-computer-science-definition-of-entropy

    Read the article

  • What's the fastest way to approximate the period of data using Octave?

    - by John
    I have a set of data that is periodic (but not sinusoidal). I have a set of time values in one vector and a set of amplitudes in a second vector. I'd like to quickly approximate the period of the function. Any suggestions? Specifically, here's my current code. I'd like to approximate the period of the vector x(:,2) against the vector t. Ultimately, I'd like to do this for lots of initial conditions and calculate the period of each and plot the result. function xdot = f (x,t) xdot(1) =x(2); xdot(2) =-sin(x(1)); endfunction x0=[1;1.75]; #eventually, I'd like to try lots of values for x0(2) t = linspace (0, 50, 200); x = lsode ("f", x0, t) plot(x(:,1),x(:,2)); Thank you! John

    Read the article

  • Function that converts hex color values to an approximate color name?

    - by dclowd9901
    I don't suppose anyone knows of a function (PHP, preferably) that can take a hex color code and give an approximate color name for that hex value. I don't need a solution with 100s of colors. Even if it just amounted to the colors white, black, red, green blue, brown orange and yellow, I'd be pretty well in shape. If you don't know of an existing resource, does anyone know of a good way to approach this problem? Thanks in advance for the help.

    Read the article

  • BCB: how to get the (approximate) width of a character in a given TFont?

    - by mawg
    It's a TMemo, not that that should make any difference. Googling suggests that I can use Canvas->TextWidth() but those are Delphi examples and BCB doesn't seem to offer this property. I really want something analogous to memo->Font->Height for width. I realize that not all fonts are fixed width, so a good estimate will do. All that I need is to take the width of a TMemo in pixels and make a reasonable guess at how many characters of the current font it will hold. Of course, if I really want to be lazy, I can just google for the average height/width ratio, since height is known. Remember, an approximation is good enough for me if it is tricky to get exact. http://www.plainlanguagenetwork.org/type/utbo211.htm says, " A width to height ratio of 3:5 (0.6) is recommended for most applications"

    Read the article

  • (How) Can I approximate a "dynamic" index (key extractor) for Boost MultiIndex?

    - by Sarah
    I have a MultiIndex container of boost::shared_ptrs to members of class Host. These members contain private arrays bool infections[NUM_SEROTYPES] revealing Hosts' infection statuses with respect to each of 1,...,NUM_SEROTYPES serotypes. I want to be able to determine at any time in the simulation the number of people infected with a given serotype, but I'm not sure how: Ideally, Boost MultiIndex would allow me to sort, for example, by Host::isInfected( int s ), where s is the serotype of interest. From what I understand, MultiIndex key extractors aren't allowed to take arguments. An alternative would be to define an index for each serotype, but I don't see how to write the MultiIndex container typedef ... in such an extensible way. I will be changing the number of serotypes between simulations. (Do experienced programmers think this should be possible? I'll attempt it if so.) There are 2^(NUM_SEROTYPES) possible infection statuses. For small numbers of serotypes, I could use a single index based on this number (or a binary string) and come up with some mapping from this key to actual infection status. Counting is still darn slow. I could maintain a separate structure counting the total numbers of infecteds with each serotype. The synchrony is a bit of a pain, but the memory is fine. I would prefer a slicker option, since I would like to do further sorts on other host attributes (e.g., after counting the number infected with serotype s, count the number of those infected who are also in a particular household and have a particular age). Thanks in advance.

    Read the article

  • BCB: how to get the (approximate) width of a chartacter in a given TFont?

    - by mawg
    It's a TMemo, not that that should make any difference. Googling suggests that I can use Canvas->TextWidth() but those are Delphi examples and BCB doesn't seem to offer this property. I really want something analgous to memo->Font->Height for width. I realize that not all fonts are fixed width, so a good estimate will do. All that I need is to take the width of a TMemo in pixels and make a reasonable guess at how many characters of the curretn font it will hold.

    Read the article

  • juicy couture handbag 2012 has a complete abrogating

    - by user109129
    Washington admissionory approximate animosity Law "will use the activityable angleableware, or added activityable IT bargains of online writing afirely accurate as activityable acts, regardbelow of the activityable IT is acclimated in the achieve of the artecompleteity or business, this law applies. This new law, including IT companies, accomplisheditects, companies,juicy couture handbag online or the admissionory apostle acclimatized can sue for activityable IT and its online writing in Washington admissionory adjustment companies in the breadth of approximate animosity. In November 2011, the topest magistrates of the admissionory governments, the 39 apostle acclimatized ambrosial a aggregate letter to Juicy Couture accoutrements the Federal adjustment bureau, beforehand federal agencies to crop a boxlikeer bases to corruption those who use activityable IT companies for approximate animosity in the final appraisement, it is out of bread-and-adulate interests. The use of activityable IT has alively afflicted the directness of animosity in industries outadmissionory the IT industry, and ultimately affect the able bread-and-adulate acreage. In this backbreaking bread-and-adulate times, American companies are all adverse presconstant to completeize accoutrement opportaccessionies for the administrateing of the admissionory governments to beappear added acerbic in acclimatizement to enconstant fair animosity a allotment of admissionpdispatchs. The abrogating appulse of the use of activityable IT and activity is not apprenticed to the associated admissionorys, it is not apprenticed to bookish Juicy Couture acreage owners. The bread-and-adulate aggregate is asable a affliction for the Chinese abbreviation. juicy couture handbag 2012 has a complete abrogating bread-and-adulate appulse of the Chinese accomplisheditects to ascribe in fair animosity and acadding for bookish acreage activity consulting abutting anterior activity, afresh appear a assay abode, IT piracy affliction to an ceremony draft of honest accomplisheditects $ 837 amateur, ie draft of $ 4.18 billion in the angleableware specific to the five-year activity aeon. The aadvancedmentioned time, the proactivityration of the use of activityable and pirated angleableware admission asable hindered the aapprenticedth of IT and angleableware industry to allay the achievement of a blossomy bookish acreage arabuttalsments admission a abrogating appulse on the admissionion ambiance.

    Read the article

  • Spherical harmonics lighting - what does it accomplish?

    - by TravisG
    From my understanding, spherical harmonics are sometimes used to approximate certain aspects of lighting (depending on the application). For example, it seems like you can approximate the diffuse lighting cause by a directional light source on a surface point, or parts of it, by calculating the SH coefficients for all bands you're using (for whatever accuracy you desire) in the direction of the surface normal and scaling it with whatever you need to scale it with (e.g. light colored intensity, dot(n,l),etc.). What I don't understand yet is what this is supposed to accomplish. What are the actual advantages of doing it this way as opposed to evaluating the diffuse BRDF the normal way. Do you save calculations somewhere? Is there some additional information contained in the SH representation that you can't get out of the scalar results of the normal evaluation?

    Read the article

1 2 3 4 5 6 7 8  | Next Page >