I am trying to reproduce a GitHub repo. I have normalized data using minmaxscaler(). However, when I use graph lasso to get the skeleton of my data using:
skeleton = glasso.predict(df)
I face the following error:
FloatingPointError: The system is too ill-conditioned for this solver. The system is too ill-conditioned for this solver. What does this mean? How to resolve this issue?
Related
I am trying to replicate the output obtained in SPSS doing it in R but I do not get the same results. I used the following libraries to help me, but I didn't get the same results as SPSS:
library ("rpart")
library ("readr")
library ("caTools")
library ("dplyr")
library ("party")
library ("party kit")
library ("rpart.plot")
Does anyone know how I could do it? From my research I discovered that at one point there was a library called "CHAID" but now it is no longer available.
I have a basic binary linear programming model with twenty-five constraints and 416 variables. I create the model and solve for an optimal solution, using the LpSolveAPI package, with no problem. However, when I try to run the package's sensitivity analysis functions I receive this error:
'''Error in get.sensitivity.obj(ff.lp) : OPTIMAL solution'''
If the function is run before the model is solved then this error is given:
'''Error in get.sensitivity.obj(ff.lp) : Model has not been optimized'''
There is no reason the solution being optimal should prevent sensitivity analysis. I don't understand what this error is telling me and I can't find the source code of the function to see what conditions are producing this error message.
Can anyone explain why I am getting this error and how to fix it, or otherwise perform sensitivity analysis on a model built with LpSolveAPI package.
I am new to the package CVXR. I am using it to do the convex optimization within each iteration of EM algorithms. Everything is fine at first but after 38 iterations, I have an error:
Error in valuesById(object, results_dict, sym_data, solver) :
Solver failed. Try another.
I am not sure why the solver works fine at first but then fails to work later. I looked up the manual about how to change the solver but could not find the answer. I am also curious about whether we can specify learning step size in CVXR. Really appreciate any help
The list of installed solvers in CVXR you can get with
installed_solvers()
In my case that is:
# "ECOS" "ECOS_BB" "SCS"
You can change the one that is used just using argument solver, e.g. to change from the default ECOS to SCS:
result <- solve(prob, solver="SCS")
I think the developers are planning to support other solvers in the future, e.g. gurobi...
I am trying to use the Rsocp package in R to solve a linear optimization problem with quadratic constraints. Much like in R - fPortfolio - Error in eqsumW[2, -1] : subscript out of bounds
More specifically I am attempting to maximize an expected return given a target risk parameter and portfolio/position limits.
install.packages("Rsocp", repos="http://R-Forge.R-project.org")
install.packages("fPortfolio")
require(fPortfolio)
require(Rsocp)
I run
lppData=100*LPP2005.RET[,1:6]
maxRetSpec=portfolioSpec()
setTargetRisk(maxRetSpec)=0.07
groupConstraints <- c("minsumW[1:6]=-.75",
"maxsumW[1:6]=1.75")
boxConstraints <- c("minW[1:6]=-1",
"maxW[1:6]=1")
bgConstraints <- c(groupConstraints, boxConstraints)
setSolver(maxRetSpec)="solveRsocp"
efficientPortfolio(data=lppData, spec=maxRetSpec, constraints=bgConstraints)
and get the following error...
Error in eqsumW[2, -1] : subscript out of bounds
It is my understand that Rsocp is a second order cone solver designed specifically for this purpose. Having gone through several different stackexchange forums it seems there are several people who have encountered this problem with unsatisfactory solutions. I was wondering if anyone has had success using the Rsocp solver that could give me a hand working through this error? Or alternatively can someone point me towards an 'R' solver that can handle this type of optimization problem?
I am using poweRlaw package to fit distribution as described by Gillespie , but I got this warning messages which is given in attach and I am blocked can't go on?
What should I do for continuing with the procedure?
How to deal with NAN warning message in poweRlaw package in R?
I suspect you have numerical instability. This usually means that the lognormal isn't suitbale. However, without a reproducible example it's not possible to tell. Create an issue at https://github.com/csgillespie/powerlaw with a data set that can be used to reproduce the problem.