Questions tagged [optimization]
Optimization is the act of improving a method or design. In programming, optimization usually takes the form of increasing the speed of an algorithm, or reducing the resources it requires. Another meaning of optimization is numerical optimization algorithms used in machine learning.
optimization
39,799
questions
0
votes
0
answers
32
views
Easy way to autonomous periodic data update in Laravel, PHP
How can I autonomous calculate and update value for one column in my Laravel project? I have no much experience in web-dev, so I just dont how to do it effective.
For example, now I've column "...
0
votes
0
answers
21
views
Python script gets stuck due to mysql query running for longer period
Mysql version - 5.7
Python version - 3.9.2
I have a dynamic mysql query, which sometimes runs for over 10 mins or something and the mysql's set timeout has been set to around 1 minute. Which is why i ...
0
votes
0
answers
16
views
Linked Stylesheets in Angular: Understanding Inline Inconsistencies
I ran into a problem with how Angular handles styles: With some linked stylesheets, Angular makes them inline on build, but with other linked stylesheets it doesn't. In neither case are any of these ...
-1
votes
0
answers
11
views
How can you appropriately combine multiple loss conditions for an optimization problem
I have a noisy signal (tri-exponential decay) that I am trying to extract parameters from using a global optimization function. The main issue with this is that the loss landscape of the signal has a ...
0
votes
2
answers
66
views
Write an algorithm in Python to find the smallest circle that can enclose a polygon
Write an algorithm in Python to find the smallest circle that can enclose a polygon.
The polygon is defined as a set of coordinates that map the vertices inside a 2D plane.
This is known as the ...
-3
votes
0
answers
22
views
Is there a way to reduce the number of triangles/polygons for a 3D model (.glb/.obj/.fbx) using code such that quality is not hampered a lot?
Is there a way to reduce the number of triangles/polygons for a 3D model (.glb/.obj/.fbx) using python code. I have tried using pymeshlabs and open3D module, but for some reason none of the things ...
0
votes
0
answers
14
views
PyTorch zeroGrad() Equivalent in DiffSharp?
What is the PyTorch zeroGrad() Equivalent in DiffSharp? Doesn't seem to exist any quivalent member function of the Optimizer class.
0
votes
1
answer
22
views
mlrMBO Error in validObject(model, complete = TRUE)
I'm trying to recreate the example from here using my data, but I'm getting an error
x <- structure(list(`1` = c(0L, 0L, 0L, 0L, 0L),
`2` = c(0L, 0L, 0L, 0L, 0L),
...
0
votes
0
answers
21
views
Minimize submatrix rank under constraints
I have a n by 2n binary matrix. I want to find a combination of m unique columns (for a fixed m), so that the new n by m matrix’s rank is minimized. My only constraint is that if I include column k, I ...
0
votes
0
answers
27
views
Least squared optimization with SciPy but without smoothing
I'm currently trying to unfold the neutron spectrum using Bonner spheres spectrometry (which is essentially an under-determined problem). I have been using least_squares from scipy.optimize but I'm ...
3
votes
2
answers
102
views
Optimizing code for detecting adjacent items in an array with SIMD instructions?
I have a function written in C++ that checks if two specific elements are adjacent to each other in an array. The function works fine, but I want to optimize it using SIMD to improve performance. Here ...
-2
votes
0
answers
14
views
Optimize Redux Data Updates
I am building a chat app with React/Redux. I want to store the messages state using Redux, it currently works with this code:
// chatsReducer.js
import {
GET_CHATS_PENDING, GET_CHATS_SUCCESS,
...
1
vote
0
answers
31
views
Find the portfolio with the maximum return at a given risk level using the `fPortfolio` package in `R`
I’m trying to find the portfolio with the maximum return at a given risk level using the fPortfolio package in R. However, there appears to be a bug in the package that the optimal portfolio (based on ...
0
votes
1
answer
31
views
simplification of minimizing f(x) with constraint f(x)<a
For the optimization problem:
min f(x)
s.t. f(x)<a
Can I simplify this problem by ignoring the constraint and then check the feasibility of the solution, which mean minimize f(x) without ...
3
votes
2
answers
105
views
A more efficient algorithm in finding the number of distinct decompositions a number has using only repdigits
This is a problem from a previous semester that I am trying to upsolve. I am trying to solve a problem involving the total number of ways of decomposing a number using only repdigits. A repdigit is a ...