Skip to content

Commit de335a8

Browse files
committed
Changing query string separator to &
1 parent 381fa8b commit de335a8

19 files changed

+182
-182
lines changed

docs/local_resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ combining the outputs of each model.
924924
BigMLClient api = new BigMLClient();
925925
926926
JSONArray models = (JSONArray) api.listModels(
927-
";tags__in=my_tag").get("objects");
927+
"&tags__in=my_tag").get("objects");
928928
929929
MultiModel multiModel = new MultiModel(models, null, null);
930930
```

docs/resources.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ hosted locally at port ``9200`` by calling:
146146
147147
JSONObject connectionInfo = JSONValue.parse(
148148
"{\"hosts\": [\"elasticsearch\"]}"
149-
);
149+
);
150150
JSONObject externalConnector = api.createExternalConnector(
151151
elasticsearch, connectionInfo);
152152
```
@@ -170,7 +170,7 @@ Here's a sample invocation:
170170
JSONObject args = JSONValue.parse(
171171
"{\"name\": \"my source\",
172172
\"source_parser\": {\"missing_tokens\": [\"?\""]}}"
173-
);
173+
);
174174
JSONObject source = api.createSource("./data/iris.csv", args);
175175
```
176176

@@ -985,13 +985,13 @@ A few examples:
985985
First 5 sources created before April 1st, 2012
986986
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
987987

988-
api.listSources("limit=5;created__lt=2012-04-1");
988+
api.listSources("limit=5&created__lt=2012-04-1");
989989

990990

991991
First 10 datasets bigger than 1MB
992992
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
993993

994-
api.listDatasets("limit=10;size__gt=1048576");
994+
api.listDatasets("limit=10&size__gt=1048576");
995995

996996

997997
Models with more than 5 fields (columns)
@@ -1022,7 +1022,7 @@ Sources ordered by size
10221022
Datasets created before April 1st, 2012 ordered by size
10231023
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10241024

1025-
api.listDatasets("created__lt=2012-04-1;order_by=size");
1025+
api.listDatasets("created__lt=2012-04-1&order_by=size");
10261026

10271027
Models ordered by number of predictions (in descending order).
10281028
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/main/java/org/bigml/binding/BigMLClient.java

Lines changed: 132 additions & 132 deletions
Large diffs are not rendered by default.

src/main/java/org/bigml/binding/LocalCluster.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public class LocalCluster extends ModelFields {
6868
private List<LocalCentroid> centroids;
6969
private JSONArray clusters;
7070
private LocalCentroid clusterGlobal;
71-
private Double totalSS = null;
72-
private Double withinSS = null;
73-
private Double betweenSS = null;
74-
private Double ratioSS = null;
71+
private Double totalSS = null;
72+
private Double withinSS = null;
73+
private Double betweenSS = null;
74+
private Double ratioSS = null;
7575
private Long criticalValue = null;
7676
private String defaultNumericValue;
7777
private Integer k;

src/main/java/org/bigml/binding/LocalDeepnet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public LocalDeepnet(BigMLClient bigmlClient, JSONObject deepnet)
8383
deepnetId = (String) deepnet.get("resource");
8484

8585
inputFields = (JSONArray) Utils.getJSONObject(
86-
deepnet, "input_fields");
86+
deepnet, "input_fields");
8787

8888
if (deepnet.containsKey("deepnet")
8989
&& deepnet.get("deepnet") instanceof JSONObject) {

src/main/java/org/bigml/binding/LocalLogisticRegression.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ private HashMap<String, Object> predictOperating(
309309
for (Object pred: predictions) {
310310
HashMap<String, Object> prediction
311311
= (HashMap<String, Object>) pred;
312-
String category = (String) prediction.get("prediction");
312+
String category = (String) prediction.get("prediction");
313313
if (category.equals(positiveClass) &&
314314
(Double) prediction.get(kind) > threshold) {
315315
return prediction;
@@ -716,20 +716,20 @@ private JSONArray getCoefficients(String category, String fieldId) {
716716
*
717717
*/
718718
private void formatFieldCodings(JSONArray fieldCodingsArray) {
719-
fieldCodings = new JSONObject();
719+
fieldCodings = new JSONObject();
720720
for (int i=0; i<fieldCodingsArray.size(); i++) {
721721
JSONObject element = (JSONObject)
722-
fieldCodingsArray.get(i);
722+
fieldCodingsArray.get(i);
723723
String fieldId = (String) element.get("field");
724-
String coding = (String) element.get("coding");
725-
JSONObject elemObject = new JSONObject();
724+
String coding = (String) element.get("coding");
725+
JSONObject elemObject = new JSONObject();
726726
if (coding.equals("dummy")) {
727-
elemObject.put(coding,element.get("dummy_class"));
727+
elemObject.put(coding,element.get("dummy_class"));
728728
} else {
729729
elemObject.put(coding,element.get("coefficients"));
730730
}
731731

732-
fieldCodings.put(fieldId, elemObject);
732+
fieldCodings.put(fieldId, elemObject);
733733
}
734734
}
735735

src/main/java/org/bigml/binding/LocalPca.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* // API client
3333
* BigMLClient api = new BigMLClient();
3434
*
35-
* JSONObject pca = api. getPca("pca/5026965515526876630001b2");
35+
* JSONObject pca = api. getPca("pca/5026965515526876630001b2");
3636
* LocalPca localPca = new LocalPca(pca)
3737
*
3838
* JSONObject predictors = (JSONObject) JSONValue.parse(

src/main/java/org/bigml/binding/LocalTimeseries.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public int compare(JSONObject o1, JSONObject o2) {
264264

265265
String name = (String)sm.get("name");
266266
String trend = name;
267-
String seasonality = null;
267+
String seasonality = null;
268268
if (name.indexOf(",") >= 0) {
269269
String[] cs = name.split(",");
270270
trend = cs[1];
@@ -355,7 +355,7 @@ public HashMap<String, Object> forecast()
355355
}
356356
}
357357
if (this.inputFields.contains(fid)) {
358-
newInput.put(fid, val);
358+
newInput.put(fid, val);
359359
} else {
360360
unusedFields.add(fid);
361361
}

src/main/java/org/bigml/binding/LocalTopicModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ private ArrayList<Integer> tokenize(String text) {
274274

275275
char ch = text.charAt(index);
276276
StringBuilder buf = new StringBuilder();
277-
sawChar = false;
277+
sawChar = false;
278278

279279
if (!Character.isLetterOrDigit(ch)) {
280-
sawChar = true;
280+
sawChar = true;
281281
}
282282

283283
while (!Character.isLetterOrDigit(ch) && index < length) {
@@ -426,7 +426,7 @@ private Double[] infer(ArrayList<Integer> doc) {
426426
}
427427

428428
int[] randomInit = new int[1];
429-
randomInit[0] = (int) this.seed;
429+
randomInit[0] = (int) this.seed;
430430
MersenneTwister rng = new MersenneTwister(randomInit);
431431

432432
double normalizer = (doc.size() * updates) + this.ktimesalpha;

src/main/java/org/bigml/binding/ModelFields.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected ModelFields(BigMLClient bigmlClient, JSONObject model)
123123
model = (JSONObject) model.get("object");
124124
}
125125

126-
this.model = model;
126+
this.model = model;
127127
}
128128

129129
/**

0 commit comments

Comments
 (0)