Questions tagged [best-fit]

75 questions
2
votes
1 answer

How to find best fit of convex polygon into other convex polygon

I'm looking for an algorithm to calculate the translation, rotation and scaling required to position a convex polygon (P1) inside another convex polygon (P2). I need it to return the "best fit", meaning P1 is completely contained within P2 and has…
Bradley Odell
  • 1,248
  • 2
  • 15
  • 28
2
votes
1 answer

find best fit 3d object

I have a uneven 3d object and need to fit another 3d symmetrical shape (Cone or cylinder) into this. I need to rotate and expand / shrink the symmetrical shape so that we can find the largest fitting cone / cylinder into this rough object. I have…
1
vote
2 answers

Find the maximum number of combinations from a data set

I need to write a function that finds the maximum number of combinations from a data set, where the sum of each of the subset combinations are >= a target value. Once numbers are taken from the data_set and put into a combination they cannot be…
J. Lewis
  • 33
  • 9
1
vote
1 answer

Quality of circle fit for points (java/kotli/js/c)

A question I asked on recently SO elicited an excellent solution for finding best fit circle for a collection of points in 2d space. I now find that I need to quantify the quality of the circle fit, and not just determine the circle itself. I do…
DrPhill
  • 614
  • 5
  • 16
1
vote
1 answer

statsmodels.api and scipy.stats not producing proper fit

I'm trying to plot a line of best fit through two sets of data with scipy.stats and statsmodels.api. import matplotlib.pyplot as plt import numpy as np import statsmodels.api as sm from scipy import stats # toy data y1 = np.array([1,2,3,4,5]) x1 =…
Jim421616
  • 1,434
  • 3
  • 22
  • 47
1
vote
0 answers

Python Best fit algorithm -

I'm trying to wright a Best fit algorithm for bin-packing. Bin-packing problem: minimize the number of bins used for packing items, given a volume capacity. What this heuristic should do is Try to place the item in the fullest bin that will…
MathematicsGo
  • 21
  • 1
  • 3
1
vote
1 answer

PHP Symfony's best choice for disable movie

here is the repo: https://github.com/webostin/sf-case-study/tree/master/movie-invalidator Short App description Platform Symfony. We have Movie Entity. We have complex caching system for cache movies pagination and movies itself. We have frontend…
1
vote
2 answers

EXCEL: Lookup Table based on Inputs and Provide Corresponding Output Value based on BEST FIT

Am looking for help regarding the below Size Predictor for Apparels I have a standardized table which has the Dress Sizes namely S, M, L, XL, 2-XL, 3-XL and the associated measurements of key body parameters which are mapped to the standard industry…
1
vote
1 answer

Is $_SESSION a proper way to transport data across many pages securely?

The application I'm making requires users to get different content upon login based on their user type and permissions. The information retrieved from them at login will be needed across several pages. My idea was to make a class called 'users',…
1
vote
0 answers

Using Python to get a best fit from data

New Python user ready to make my first simple code (hopefully!). My goal is to use some kind of best fit feature that Python has to take the make and amount of vehicles to find out what location this data most closely resembles. import numpy as np…
Caroline.py
  • 293
  • 1
  • 4
  • 16
1
vote
1 answer

How to find best fit line using Principal Component Analysis?

I'm plotting graphs in windows application in C#. I've used Least Squares Fitting--Perpendicular Offsets to find best fit line. But my data source varies from vertical line to (almost) horizontal one. Then I read about PCA, and Accord.net…
KSK
  • 65
  • 1
  • 9
1
vote
1 answer

how to produce projective transformation matrix best fit for multiple 4-point sets?

Normally I am using this kind of matlab code to do a projective transformation with a single set of reference points: fixedpoints = [0 0; 50 0; 50 100; 0 100]; movingpoints= [752 361; 888 361; 885 609; 736…
1
vote
1 answer

How to return specific set of data from a class

I have a similar structure to the one below Base class public class BaseClass { public string Name { get; set; } public string Address { get; set; } public int Age { get; set; } public Guid Guid { get; set; } public string…
Rami Alshareef
  • 7,015
  • 12
  • 47
  • 75
1
vote
2 answers

Spring batch DELETE BEFORE INSERT best practice?

In a Spring Batch job, i need to code a DELETE before an INSERT in order to avoid primary key violations on already existing keys. What is the best practice regarding this need ? How and where should i implement this pre-requisited delete ? Thx in…
SylvainR
  • 133
  • 1
  • 13
1
vote
1 answer

How to upgrade liferay services from 6.0 archetype to 6.2?

I am currently working on liferay upgradation from 6.0 to 6.2.2 GA3. I tried upgrading the services portlet. The services portlet of 6.0 version is built using mvn services-portlet-archetype whereas for 6.2 version the archetype is…
Arun
  • 2,562
  • 6
  • 25
  • 43