Questions in topic: "binary"
https://developer.ibm.com/answers/questions/topics/single/252920.html
The latest questions for the topic "binary"Clustering for binary data
https://developer.ibm.com/answers/questions/494372/clustering-for-binary-data.html
Hi,
I urgently need help. I am trying to perform clustering on the attached file. I have used two step clustering method. However, the result seems quite far off. What should i do?
Thanks
ivanstatisticsclusterclusteringclustersbinaryclassifybinaryvaluesMon, 25 Feb 2019 04:00:09 GMTIvanKhooBinary logistic regression with Akaike Information Criterion (AIC)
https://developer.ibm.com/answers/questions/486215/binary-logistic-regression-with-akaike-information-1.html
I'am trying to carry out a binary logic regression with the backward Wald method. Althouth I can't get the Akaike Information Criterion (AIC) to analyse how model get better as each step.syntaxregressionlogisticregressionbinarybackwardThu, 27 Dec 2018 17:08:37 GMTEdwardGonzaVRP binar non-binary
https://developer.ibm.com/answers/questions/482613/vrp-binar-non-binary.html
hi,
i am writing a VRP model, and i want to link a binary and non binary variables in the same constraint. what i want to say is that if the path xij is chosen, then the constraint is considered otherwise it is 0 (C3 and C4).
i tried using big M but when i ran my model, all the paths were chosen even though i set a constraint saying that a path can only be chosen once.
Here is my model :
//Parameters
int n=...; //Number of Stations
range I=1..19; //from I
range J=1..19; // to J
float c[I][J]=...; //cost
int B_optimal[I]=...; //what we want
int B_upperlimit[I]=...; //what we acccept
int B_lowerlimit[I]=...; //what we accept
int M=100000000;
tuple pinfo
{
int station;
float c[J];
}
pinfo Stationinfo[I];
execute Initialize
{
for (var i in I) {
Stationinfo[i].station=i;
for (var j in J){
Stationinfo[i].c[j]=c[i][j];
}
}
}
tuple result
{ int bikes;
int X_in [I];
int X_out[I];
}
result Result[I];
//Decision Variables
dvar int+ X_in[I];
dvar int+ X_out[I];
int B_currentnumber[I]=...;
dvar boolean x[I][J];
dvar float+ u[I];
//Objective Function
//minimize sum(i in I, j in J : i!=j) (Stationinfo[i].cost[j]*x[i][j]); //+ abs(B_optimal[i] - (B_currentnumber[i] +X_in[i] - X_out[i])));
//minimize sum(i in I, j in J : i!=j) (Stationinfo[i].c[j]*x[i][j]);
minimize sum(i in 1..n-1, j in i+1..n)(Stationinfo[i].c[j]*x[i][j]);
//Constraints
subject to {
c1:
//forall (i in I)
sum (j in 2..19) x[1][j]==1;
c2:
//forall (j in J)
sum (i in 2..19) x[i][1]==1;
c3:
forall (i in 1..n-1, j in i+1..n)
B_currentnumber[i] + X_in[i] - X_out[i] <= B_upperlimit[i]+ M*(1-x[i][j]);
c4:
forall (i in 1..n-1, j in i+1..n )
(B_currentnumber[i] + X_in[i] - X_out[i]) >= B_lowerlimit[i]+ M*(1-x[i][j]);
c5:
forall (j in J)
sum (i in I: i!=j) x[i][j]==1;
c6:
forall (i in I)
sum (j in J: j!=i) x[i][j]==1;
c7:
sum (i in I)(X_in[i])== sum(i in I)(X_out[i]);
c8:
forall (i in I){
sum(j in J:i!=j)x[i][j] == 1;
sum (j in J: i!=j) x[i][j] ==1;
}
c9:
u[1]==1;
c10:
forall (i in I: i!=1) {
u[i]<=n;
u[i] >= 2;
}
c11:
forall(i in 2..19, j in 2..19: i!=j)
u[i]-u[j] + 19*x[i][j] <= 18;
}
execute output
{ for (var i in I) {
for (var j in J){
Result [i].X_in[i]=B_currentnumber[i];
Result [i].X_out[i]=B_currentnumber[i];
}
}
writeln(Result[i]);
}
DATA
SheetConnection sheet("BIXI.xlsx");
c from SheetRead (sheet, "Sheet2!B4:T22");
n from SheetRead (sheet, "Sheet1!A2");
B_optimal from SheetRead (sheet, "Sheet1!C2:C20");
B_upperlimit from SheetRead (sheet, "Sheet1!D2:D20");
B_lowerlimit from SheetRead (sheet, "Sheet1!E2:E20");
B_currentnumber from SheetRead (sheet, "Sheet1!B2:B20");
//X_in to SheetWrite (sheet, "Sheet1!F2:F19");
//X_out to SheetWrite (sheet, "Sheet1!G2:G19");
thanking you in advancecplexindexbinaryconstraintWed, 28 Nov 2018 17:59:49 GMTfrexkVRP Binary and non-binary
https://developer.ibm.com/answers/questions/482612/vrp-binary-and-non-binary.html
hi,
i am writing a VRP model, and i want to link a binary and non binary variables in the same constraint. what i want to say is that if the path xij is chosen, then the constraint is considered otherwise it is 0 (C3 and C4).
i tried using big M but when i ran my model, all the paths were chosen even though i set a constraint saying that a path can only be chosen once.
Here is my model :
//Parameters
int n=...; //Number of Stations
range I=1..19; //from I
range J=1..19; // to J
float c[I][J]=...; //cost
int B_optimal[I]=...; //what we want
int B_upperlimit[I]=...; //what we acccept
int B_lowerlimit[I]=...; //what we accept
int M=100000000;
tuple pinfo
{
int station;
float c[J];
}
pinfo Stationinfo[I];
execute Initialize
{
for (var i in I) {
Stationinfo[i].station=i;
for (var j in J){
Stationinfo[i].c[j]=c[i][j];
}
}
}
tuple result
{ int bikes;
int X_in [I];
int X_out[I];
}
result Result[I];
//Decision Variables
dvar int+ X_in[I];
dvar int+ X_out[I];
int B_currentnumber[I]=...;
dvar boolean x[I][J];
dvar float+ u[I];
//Objective Function
//minimize sum(i in I, j in J : i!=j) (Stationinfo[i].cost[j]*x[i][j]); //+ abs(B_optimal[i] - (B_currentnumber[i] +X_in[i] - X_out[i])));
//minimize sum(i in I, j in J : i!=j) (Stationinfo[i].c[j]*x[i][j]);
minimize sum(i in 1..n-1, j in i+1..n)(Stationinfo[i].c[j]*x[i][j]);
//Constraints
subject to {
c1:
//forall (i in I)
sum (j in 2..19) x[1][j]==1;
c2:
//forall (j in J)
sum (i in 2..19) x[i][1]==1;
c3:
forall (i in 1..n-1, j in i+1..n)
B_currentnumber[i] + X_in[i] - X_out[i] <= B_upperlimit[i]+ M*(1-x[i][j]);
c4:
forall (i in 1..n-1, j in i+1..n )
(B_currentnumber[i] + X_in[i] - X_out[i]) >= B_lowerlimit[i]+ M*(1-x[i][j]);
c5:
forall (j in J)
sum (i in I: i!=j) x[i][j]==1;
c6:
forall (i in I)
sum (j in J: j!=i) x[i][j]==1;
c7:
sum (i in I)(X_in[i])== sum(i in I)(X_out[i]);
c8:
forall (i in I){
sum(j in J:i!=j)x[i][j] == 1;
sum (j in J: i!=j) x[i][j] ==1;
}
c9:
u[1]==1;
c10:
forall (i in I: i!=1) {
u[i]<=n;
u[i] >= 2;
}
c11:
forall(i in 2..19, j in 2..19: i!=j)
u[i]-u[j] + 19*x[i][j] <= 18;
}
execute output
{ for (var i in I) {
for (var j in J){
Result [i].X_in[i]=B_currentnumber[i];
Result [i].X_out[i]=B_currentnumber[i];
}
}
writeln(Result[i]);
}
DATA
SheetConnection sheet("BIXI.xlsx");
c from SheetRead (sheet, "Sheet2!B4:T22");
n from SheetRead (sheet, "Sheet1!A2");
B_optimal from SheetRead (sheet, "Sheet1!C2:C20");
B_upperlimit from SheetRead (sheet, "Sheet1!D2:D20");
B_lowerlimit from SheetRead (sheet, "Sheet1!E2:E20");
B_currentnumber from SheetRead (sheet, "Sheet1!B2:B20");
//X_in to SheetWrite (sheet, "Sheet1!F2:F19");
//X_out to SheetWrite (sheet, "Sheet1!G2:G19");
thanking you in advancebinarybinariesnonWed, 28 Nov 2018 17:56:51 GMTfrexkWhen running a binary logistic regression I keep getting an odds ratio with an exponent, exampe 1.97E+33 what does this mean, and why is it happening?
https://developer.ibm.com/answers/questions/479910/when-running-a-binary-logistic-regression-i-keep-g.html
When running a binary logistic regression I keep getting an odds ratio with an exponent, exampe 1.97E+33 what does this mean, and why is it happening?statisticsbinaryMon, 12 Nov 2018 02:24:59 GMTAngelaACHow to assign probabilities from binary regression to gender?
https://developer.ibm.com/answers/questions/477318/how-to-assign-probabilities-from-binary-regression.html
Hello everybody, I have a set of data which I want to analyse with SPSS. Unfortunately, 16.35 % of the data does not have information for the gender. I have noticed following:
- Female: 25.77 %
- Male: 57.88 %
- No gender: 16.35 %
Proportion of males of data with available gender information: 69.19 %
When predicting gender with a binary regression and saving the values one obtains an average for predicted gender of 0.702596488.
But to use binary data, I want to only have 0 (female) or 1 (male) for gender in the dataset. To achieve this, I exported the data with predicted gender probabilities to Excel. You can find the excel worksheet here: https://1drv.ms/x/s!AtNwspiFU1pNhK9b3Vh8tHcDUA71SA
• When using the Round function in Excel I get a column with following average: 0.97375 (nearly only males, which are coded as 1)
• To get a higher (and more realistic) proportion of females, I have used following formula: =IF(AH2>0.7, 1, 0). This yields an average of 0.589.
Now, I am wondering whether there is a different way in Excel to only have binary data but with a similar distribution (70 % males – 30 % females) of the data with existing gender information while using the results from the regression.
Thank you very much for your answer.regressionlogisticregressionbinaryThu, 25 Oct 2018 13:25:45 GMTSPSS User 12345How do i graph my binary logistic regression results?
https://developer.ibm.com/answers/questions/455561/how-do-i-graph-my-binary-logistic-regression-resul.html
Is it possible to make spss easily graph the results from my binary logistic regression results? I've got the results on my independent variables on my dependent variable, ie. the exp(b). I wan't to make a nice and easy to read graph that shows the nonlinear rise or fall in probability on Y by every unit increase on my X axis. But it doesn't seem like SPSS is able to do this?
Does anyone know if it is possible? And if not, what is the easiest program to use for this? Excel? Can i just export my results and make it there?
Best regardsspssregressionfunctiongraphlogisticregressiongraphsbinaryplotWed, 27 Jun 2018 10:17:48 GMTLoghelpHow I could define binary variables with two indexes in PYTHON in a CpoModel with the instruction "binary_var_dict()"?
https://developer.ibm.com/answers/questions/454612/how-i-could-define-binary-variables-with-two-index.html
I need to define binaries variables x_ij in a CpoModel. I am trying to use the instruction mdl.binary_var_dict(). but I do not know how I have to write in the correct way.
Thanks in advance!pythondocplexcloudvariablesdocplexoplbinaryThu, 21 Jun 2018 14:25:41 GMTTWonderUnable to make boxplots using binary data
https://developer.ibm.com/answers/questions/449828/unable-to-make-boxplots-using-binary-data.html
I have trouble making a boxplot.
Details:
data for both my X and Y variable are binary. (X being data on whether an animal was present (1) or not (0), Y being data on whether water was present (1) or not (0)). This is for a habitat selection study.
Some places were animals were present were visited more than once by the animal. I therefore also have a column 'Weightfactor', where I put down the number of times it actually was visited. So I have also activated Data > Weight Cases > Weight cases by 'Weightfactor'.
When I try to make a simple boxplot I get the following error:
*Warnings
GPL error: GPL Translation Error:
Internal translation error.
Function call position([bin.quantile.letter([Bird*Treepresence])]) has categorical variable on Y axis for boxplot
GPL:
SOURCE: s=userSource(id("graphdataset"))
DATA: Bird=col(source(s), name("__Bird"), unit.category())
DATA: Treepresence=col(source(s), name("__Treepresence"), unit.category())
DATA: id=col(source(s), name("$CASENUM"), unit.category())
GUIDE: axis(dim(1), label(".Bird"))
GUIDE: axis(dim(2), label(".Tree presence"))
ELEMENT: schema(position(bin.quantile.letter(Bird*Treepresence)), label(id))*
Is it just not possible to make boxplots out of binary data? Or is there a way? Do I have to rearrange my data in order to be able to make boxplots?
Thanks in advancegraphbinaryFri, 25 May 2018 12:59:53 GMTCoen.Binary logistic regression with Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC)
https://developer.ibm.com/answers/questions/410314/binary-logistic-regression-with-akaike-information.html
What do I have to write in my Syntax to make the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) appear for a binary logistic regression?syntaxbinaryWed, 01 Nov 2017 11:17:07 GMTNina9352Combining several binary variables into one
https://developer.ibm.com/answers/questions/392306/combining-several-binary-variables-into-one.html
Using Qualtrics, we presented respondents a set of 15 different goals for a project. They were asked to place each goal in to one of three boxes: high priority, low/moderate priority, and not important. The current output is basically 45 separate binary (1 or 0) variables. I would like to create one variable for each goal so when I run frequency statistics on that variable it tells me how me people selected high, low/moderate, and not important for that variable. Is there a way to do this without writing syntax? Also, what is the syntax to use if I need to do it manually? Thanks for any help!binaryMon, 07 Aug 2017 17:19:35 GMTchudom5How do I combine multiple binary ranked variables into one?
https://developer.ibm.com/answers/questions/392304/how-do-i-combine-multiple-binary-ranked-variables.html
Using Qualtrics, we presented respondents a set of 15 different goals for a project. They were asked to place each goal in to one of three boxes: high priority, low/moderate priority, and not important. The current output is basically 45 separate binary (1 or 0) variables. I would like to create one variable for each goal so when I run frequency statistics on that variable it tells me how me people selected high, low/moderate, and not important for that variable. Is there a way to do this without writing syntax? Also, what is the syntax to use if I need to do it manually? Thanks for any help!statisticsrankbinaryMon, 07 Aug 2017 17:17:24 GMTchudom5cannot read binary file
https://developer.ibm.com/answers/questions/389417/cannot-read-binary-file.html
I am using 32 bit Raspberry Pi B+ to install Bluemix CLI.
I downloaded 32 bit Bluemix CLI from - https://plugins.ng.bluemix.net/download/bluemix-cli/0.5.5/linux32
But when I try to run command "bx" or "bluemix", I get message "cannot execute binary file".
Could anyone please let me know where is problem.
I tried to check the execute permission and that exists. (attached screenshot)
ls -l /usr/local/Bluemix/bin/bluemix
![alt text][1]
[1]: /answers/storage/temp/16298-capture.pngbinaryraspberry-piWed, 26 Jul 2017 11:45:41 GMTSandipKumarSharma"Unrecoverable application error in the Statistics processor" when performing logistic regression
https://developer.ibm.com/answers/questions/389386/unrecoverable-application-error-in-the-statistics-2.html
I am using SPSS 23.0, and have a problem when performing a standard logistic regression analysis. When adding certain independent variables and trying to perform the analysis, the programme crashes and leaves me with this message **"Unrecoverable application error in the Statistics processor"**. The output is left (see example below), but the programme closes/crashes.
I cannot see any immediate reason for this considering my own data (no missing data, normal dichotomous dependent variable (disease yes/no) and a combination of 3-5 categorical and scale/continous independent variables ("covariates").
I have tested this using different data files, and this happens not every time, but still often, with different data. I do not see any pattern, but it seems to appear when adding one or more categorical independent variables, while a number of continous independent variables work perfectly fine. Categorical variables are defined properly, and I use the default "Enter" method etc (standard procedure).
I would appreciate any advice or support, thank you.
Example from output:
LOGISTIC REGRESSION VARIABLES DISEASE_VALIDATED
/METHOD=ENTER BMI Gender CAD
/CONTRAST (Gender)=Indicator(1)
/CONTRAST (CAD)=Indicator(1)
/CLASSPLOT
/CASEWISE OUTLIER(2)
/PRINT=GOODFIT SUMMARY CI(95)
/CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).spssstatisticserrorcrashlogisticregressionbinaryWed, 26 Jul 2017 10:18:48 GMTT_BergeModerators in logistic regression SPSS
https://developer.ibm.com/answers/questions/387339/moderators-in-logistic-regression-spss.html
Hello,
I would like to test on SPSS the effects of an independent variable (X) on a dependent variable (Y) given that this dependent variable is binary (1 or 0). Also I would like to test the effects that two moderators M1 and M2 have on the primary relationship.
I am facing difficulties in combining a logit analysis and the effects of moderators, if anyone could help!
Thanks!spssbinarymoderatormoderationlogitTue, 18 Jul 2017 09:54:40 GMTdianadeeHow to convert binary data into continous data in SPSS for applying clustering tecnhiques
https://developer.ibm.com/answers/questions/357384/how-to-convert-binary-data-into-continous-data-in.html
I have binary data with only "1" and "0" values. The columns represents the features and the rows represents the respondants. I am trying to create the clusters of the respondants based on the features they selected. I have heard that two step clustering approach is good for dealing with binary data but when i am trying to run the technique on my data in SPSS it is giving really bad cluster results. I have read somewhere that one possible technique to deal with the binary data is to convert the binary scores in factor scores by applying factor analysis tecnhiques, and then use those continous factor scores to create clusters. But i am not sure how to work with that in SPSS. Any possible suggestion, help , comments or any other approach to deal with the binary data, would be really appreciatedstatisticsclusterclusteringclustersbinaryclassifybinaryvaluesFri, 17 Feb 2017 09:37:30 GMTSidraNaveedHow to access the index of binary decision variable and put a constraint on it?
https://developer.ibm.com/answers/questions/320106/how-to-access-the-index-of-binary-decision-variabl.html
I have a decision variable X[i][t], Where i(1..20) is the index for notifications and t(1..100) is the index for time in my problem.
My problem is to assign X[i][t] such values that t in X[i+1][t] is greater than previously selected t.
I'll try to describe my problem. I have the inflow of notifications and I have a horizon of time. I have a binary decision variable X[i][t] which is 1 when i th notification is selected at time period t. But when the decision comes to select the next notification the time period now should be greater than the previous index t. As one can logically think the time to display next notification should be greater than the previous one.
Can anyone suggest a constraint such that I can access the index t in X[i][t] and use some formulation to make sure that the next t selected is greater than the previous one.
the code is as below:
range notification=1..20;
range modality=1..3;
range time=1..100;
float comm_score[notification]= [7,3,2,3,2,1,1,1,1,1,2,1,8,9,2,2,1,8,2,1];
float interf_score[modality][time]= [[9 ,9 ,5 ,5, 6 ,6, 9, 6, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9, 5, 9, 9, 5, 9, 5, 5, 6, 5, 8, 9, 9, 8, 6, 9, 9, 9, 9, 9, 8, 9, 9, 9, 5, 5, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 5, 9, 9, 5, 9, 9, 9, 9, 5, 9, 9, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 6, 5, 9, 6, 9, 9, 5, 9, 9, 9, 5, 5],
[9 ,9 ,8 ,5 ,8 ,9, 7, 8, 9, 7, 9, 9, 5, 9, 5, 9, 9, 9, 6, 9, 8, 9, 9, 9, 7, 7, 9, 9, 8, 8, 5, 9, 5, 5, 6, 5, 5, 9, 5, 9, 9, 9, 9, 9, 9, 7, 5, 7, 9, 9, 8, 9, 8, 8, 5, 7, 9, 7, 9, 9, 7, 9, 9, 9, 9, 8, 5, 8, 5, 5, 7, 9, 9, 5, 5, 8, 8, 9, 7, 7, 9, 9, 9, 9, 7, 9, 7, 8, 9, 8, 7, 8, 5, 9, 8, 9, 9, 7, 8, 5],
[9 ,9 ,7, 5 ,7, 7, 7, 7, 9, 7, 7, 9, 5, 6, 5, 9, 9, 9, 6, 9, 7, 6, 9, 9, 7, 7, 7, 9, 7, 7, 5, 9, 5, 5, 6, 5, 5, 7, 5, 6, 9, 7, 6, 7, 7, 7, 5, 7, 9, 6, 7, 9, 7, 7, 5, 7, 9, 7, 6, 9, 7, 9, 9, 7, 7, 7, 5, 7, 5, 5, 7, 9, 9, 5, 5, 7, 7, 6, 7, 7, 7, 7, 7, 9, 7, 9, 7, 7, 7, 7, 7, 7, 5, 9, 7, 7, 7, 7, 7, 5]];
dvar float+ X[notification][time];
dvar float+ m[notification][modality][time];
maximize sum(i in notification,t in time) (comm_score[i]*X[i][t])+sum(i in notification, j in modality, t in time)( interf_score[j][t]*m[i][j][t]);
subject to{
forall( i in notification) sum ( t in time) (X[i][t] + X[i][t]) <=1;
}cplexindexbinaryconstraintMon, 14 Nov 2016 07:38:36 GMTHazard!!“cannot execute binary file: Exec format error” cloudfoundry cf-cli
https://developer.ibm.com/answers/questions/311926/cannot-execute-binary-file-exec-format-error-cloud.html
I am installing cloud foundry command line in Raspberry P2 running raspbian Jessie, I have tried two ways using the Installer and the binary Installation, I have tried to force the architecture armhf. The result I get when running the cf command on the terminal is "/usr/bin/cf: cannot execute binary file: Exec format error" I have tried to change the mode with this command "chmod +x /usr/bin/cf" the error is still therecloudfoundrycannotbinaryraspi#cloudfoundryexecTue, 18 Oct 2016 06:47:33 GMTmasindemtesigwaDoes Datapower crypto binary action support OAEP padding?
https://developer.ibm.com/answers/questions/296318/does-datapower-crypto-binary-action-support-oaep-p.html
When a PKCS #7 request is encrypted with OAEP padding, DataPower is not able to decrypt it with the crypto binary action. It fails with:
**20160624T090127.015Z [0x80600071][crypto][error] mpgw(test-mp): tid(173250)[request][1.1.1.1] gtid(173250): PKCS#7 decrypt error: failed to decrypt for any recipients**
However, when the PKCS #7 request is encrypted with RSA padding, decryption succeeds.
Does Datapower crypto binary action support OAEP padding?binarycryptobinoaeppkcs#7pkcs7cryptoThu, 18 Aug 2016 14:51:53 GMTClarissaBHow do I add on Binary Regression to Grad Pac V 23.0 of SPSS
https://developer.ibm.com/answers/questions/252921/how-do-i-add-on-binary-regression-to-grad-pac-v-23.html
How do I add on Binary Regression to V23.0 SPSSbinarySat, 13 Feb 2016 19:06:13 GMTCalaudian