Questions tagged [best-fit]

75 questions
1
vote
1 answer

Algorithm to best fit a rectangle

I'm writing an application which measures boxes from pictures. A sample picture after manipulation is shown below: My application has identified pixels that are part of the box and changed the color to red. You can see that the image is pretty…
Nick
  • 589
  • 7
  • 18
1
vote
1 answer

Binary Search Tree Best Fit Alg.: Incorrect Output

DISCLAIMER: This is for an school assignment Hey, all. I've been toiling away at this Bin Packing program for a fortnight and I have one last hurdle to go over: the find function of my Binary Search Tree is giving me incorrect…
G.B.
  • 11
  • 3
0
votes
0 answers

Are large coefficients resulting from a best-fit process bad or not?

By performing the best fit of a data set, we can get an acceptable or even a good value of R^2. However, one or more of the best-fit coefficients might be quite large, or even exceptionally large, as shown in the figure here below. Are large…
limone
  • 279
  • 2
  • 9
0
votes
0 answers

Finding the best combination of purchases from different retailers

How best to buy 4 products from different sellers, assuming that purchases from each seller must be at least for a certain amount. Below is the input data I have. { "items":[ { "name":"item1", "sellers":[ { …
0
votes
0 answers

Best markov chain's order for discrete data

I would like to know if there is a way to get the AIC and BIC of the different orders of the markov chain derived by the command: fitHigherOrder() from the markovchain package. What I am looking for is something like: maxOrder <- 5 result <-…
Ado
  • 1
0
votes
0 answers

Place rectangulars connected by lines in a box so that lines connecting them won't cut each

Imagine that you have a table and you have to put rectangles on it leaving small spaces between them. There are lines between specific rectangles (there can be even 10 lines coming out from a single rectangular). The idea is to find specific…
Pawel
  • 1
0
votes
0 answers

Best-fit line showing as a jagged/stepped when plotting in log-log plot?

For a class I am needing to make a lot of plots in a logarithmic space and get a line of best fit to find the slope. I seem to be getting correct values for the slope and intercept when I do it the way I show below, but the graph I produce shows the…
0
votes
3 answers

How to Fix False Negative

Background: I am making a program that detects the grid of a maze (like this). The way I do this is by getting the average color of each row/column and graphing it to locate the general grid lines (like this). With these grid lines I can group each…
0
votes
0 answers

Unity UI text "best fit" setting/flag not working when setting text value via code

it works if I set the text value in inspector, but not in code, the horizontal overflow either wraps (if overflow is set to Wrap) or overflows (if overflow is set to Overflow), and the font size never scales to fit without wrapping nor…
0
votes
3 answers

Regression Model (Outputs with only meaninful predictors)

I have constructed a linear regression model, reg_model1, and the model has factors within it. However, within the different sets of factors in the model, very few are significant along with other continuous variables. Is there any code that one can…
0
votes
0 answers

Plotting a non linear best fit line in Python

I'm trying to plot a best fit line for my train/test dataset and compare with the original values to see how well it fits. I am able to plot the line of fit for the original dataset. But when it comes to the train/test dataset, it goes haywire.…
0
votes
1 answer

Best-Fit Memory Management Algorithm?

I was reading about next-fit algorithm for memory management but could not find an answer to a specific detail. From: https://www.geeksforgeeks.org/program-for-next-fit-algorithm-in-memory-management/ Next fit is a modified version of ‘first fit’.…
algo
  • 101
  • 6
0
votes
2 answers

Is this best practice? Checking if variable defined or assign null

const pictureEntity = updateUserDto?.picture ? await this.filesService.find(updateUserDto.picture) : null; if (pictureEntity) { const pictureEntity.url = await this.filesService.getFileUrl(pictureEntity); } Is this the correct way to…
0
votes
1 answer

How to get most probable 68% from a sample in python?

Suppose I have the following sample of 100,000 points drawn from the chi-square distribution. x=np.random.chisquare(10,100000) We plot the histogram which is asymmetric. Let us say the histogram represents the probability. I want to get 68% of the…
deltasata
  • 377
  • 1
  • 4
  • 21
0
votes
1 answer

How to perform linear regression with numpy.polyfit and print error statistics?

I am figuring out how to use the np.polyfit function and the documentation confuses me. In particular, I am trying to perform linear regression and print related statistics like the sum of squared errors (SSE). Can someone provide clear and concise…
funkymickey
  • 111
  • 3
  • 8