Matching algorithm to find an suitable place in a grid - matching

I'm trying to solve a task from a programming challenge and it should be really easy with a matching algorithm but I'm pretty lost how it should be transfered in a graph.
It should be probably based on max-min-flow or maximum bipartit matching.
Could anybody give me a little hint on how to solve this or how to transfer the input in a graph? Thanks in advance!

Related

Best way to correlate weights to nodes (Use a graph?)

I don't have a strong software engineering background and I am currently tasked with correlating fuzzy hashes (Nilsimsa) and their similarity to one another. For example: I have a ton of strings ( Hundreds of thousands), I hash each one using Nilsimsa and then want to be able to correlate each hash to a similar hash (indicating a similar string)
I've been trying to think of the best way to go about this in a way that can scale (ultimately will need to be able to handle millions of strings input per day) I was thinking maybe a graph database or just a graph in general where the weights in between each node would be the similarity of the Nilsimsa hashes.
Im not asking anyone to implement anything just ideas or suggestions would be very appreciated.

MNIST Dataset, difference of grid search and not, about accuracy

I study AI class and implement Datase MNIST. When I classify the data using grid search and not, SVM and Logistic Regression, it give me almost same accuracy. Is it possible? If it is right results, I want to know reason why it is almost same results. And if I choice one thing, what is correct option to me. Plz explain to me. Thanks.
Which hyperparameters are you optimizing with the grid search? What range are you using? And what do you consider "almost the same" accuracy? Show us some code, please.

How to simulate Grover's Algorithm in quantum computing?

If I want to write a program to simulate Grover's algorithm, how could I write the oracle for it? If I already know the result, why should I use the search?
A lot of examples of Grover search implementation use an oracle with a hardcoded answer, which is indeed not very enlightening. In general case the point of Grover search is, of course, to perform search if you don't know the answer. To write an oracle for this, you need not an oracle which checks whether the input equals some hardcoded value, but an oracle which checks a certain property of the input. Implementing the oracle is the hardest part of solving the problem.
The easiest example of such a problem is SAT problem. You can map the variables in the formula to the qubits of the input and write an oracle which computes f(x) with relative ease, and you can apply Grover search to find the interpretation which satisfies the given formula, but you don't know the answer from just glancing at the oracle. You can see an example of implementing the oracle for solving SAT problem in the SolveSATWithGrover tutorial.
P.S. There are a lot of great answers regarding Grover search algorithm at the Quantum Computing StackExchange.

What algorithm use for random forests?

i am working on my master's thesis. I have some data and i need find some algorithm whitch must tell me if this data represents brain or not. I have same train data where i know whether it is brain or not. I would like use random forests for that, but i dont know if is best for this case. Can you suggest me some algorithm for random forests or something better?

In what sequence cluster analysis is done?

First find the minimum frequent patterns from the database.
Then divide them into various data types like interval based , binary ,ordinal variables etc and define various distance measures for all the variables.
Finally apply cluster analysis method.
Is this sequence right or am i missing something?
whether you're right or not depends on what you want to do. The general approach that you describe seems to go into the right direction, but you'll never know if your on target until you answer the following questions:
What is your data?
What are trying to find/Which cluster method do you want to use?
From what you describe it seems to me that you want to do 'preprocessing' steps like feature selection and vectorization. Unfortunately, this by itself can be quite challenging. For example, one of the biggest partical problems is the design of a distance function (there's a tremendous amount of research available).
So, please give us more information on your specific target application.

Resources