Skip to content

Commit

Permalink
create updated network
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Mar 26, 2024
1 parent 0a39ad3 commit a2b3588
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 12,550 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ $p/berlin-$V-network.xml.gz: input/sumo.net.xml

$(sc) prepare clean-network $@ --output $@ --modes car

#$(sc) prepare sample-network --network $@
$(sc) prepare apply-network-params freespeed capacity\
--network $@ --output $@\
--input-features $p/berlin-$V-network-ft.csv.gz\
--model org.matsim.prepare.network.BerlinNetworkParams\

# To update features and params, running python code is necessary
#$(sc) prepare network-params --network $@ --input-features input/sumo.net-edges.csv.gz --output $@
#$(sc) prepare network-freespeed --network $@ --params input/network-params.json --output $@

$p/berlin-$V-network-with-pt.xml.gz: $p/berlin-$V-network.xml.gz
$(sc) prepare transit-from-gtfs --network $< --output=$p\
Expand All @@ -103,7 +103,7 @@ $p/berlin-$V-counts-vmz.xml.gz: $p/berlin-$V-network.xml.gz
$(sc) prepare counts-from-vmz\
--excel ../shared-svn/projects/matsim-berlin/berlin-v5.5/original_data/vmz_counts_2018/Datenexport_2018_TU_Berlin.xlsx\
--network $<\
--network-geometries $p/berlin-v6.2-network-linkGeometries.csv\
--network-geometries $p/berlin-$V-network-linkGeometries.csv\
--output $p/\
--version berlin-$(V)\
--input-crs EPSG:31468\
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.matsim-scenarios</groupId>
<artifactId>matsim-berlin</artifactId>
<version>6.1-SNAPSHOT</version>
<version>6.2-SNAPSHOT</version>

<name>MATSim Open Berlin scenario</name>
<description>MATSim Open Berlin scenario</description>
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/org/matsim/prepare/RunOpenBerlinCalibration.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.matsim.application.prepare.freight.tripExtraction.ExtractRelevantFreightTrips;
import org.matsim.application.prepare.network.CleanNetwork;
import org.matsim.application.prepare.network.CreateNetworkFromSumo;
import org.matsim.application.prepare.network.params.ApplyNetworkParams;
import org.matsim.application.prepare.population.*;
import org.matsim.application.prepare.pt.CreateTransitScheduleFromGtfs;
import org.matsim.contrib.cadyts.car.CadytsCarModule;
Expand Down Expand Up @@ -49,10 +50,6 @@
import org.matsim.prepare.counts.CreateCountsFromVMZ;
import org.matsim.prepare.counts.CreateCountsFromVMZOld;
import org.matsim.prepare.download.DownloadCommuterStatistic;
import org.matsim.prepare.network.FixNetworkV5;
import org.matsim.prepare.network.FreeSpeedOptimizer;
import org.matsim.prepare.network.PrepareNetworkParams;
import org.matsim.prepare.network.SampleNetwork;
import org.matsim.prepare.opt.RunCountOptimization;
import org.matsim.prepare.opt.SelectPlansFromIndex;
import org.matsim.prepare.population.*;
Expand Down Expand Up @@ -80,12 +77,12 @@
CreateLandUseShp.class, CreateBerlinPopulation.class, CreateBrandenburgPopulation.class, MergePopulations.class,
LookupRegioStaR.class, ExtractFacilityShp.class, DownSamplePopulation.class, DownloadCommuterStatistic.class,
RunActitopp.class, CreateNetworkFromSumo.class, CreateTransitScheduleFromGtfs.class,
CleanNetwork.class, SampleNetwork.class, CreateMATSimFacilities.class, InitLocationChoice.class, FilterRelevantAgents.class,
CleanNetwork.class, CreateMATSimFacilities.class, InitLocationChoice.class, FilterRelevantAgents.class,
CreateCountsFromGeoPortalBerlin.class, CreateCountsFromVMZOld.class, CreateCountsFromVMZ.class, ReprojectNetwork.class, RunActivitySampling.class,
MergePlans.class, SplitActivityTypesDuration.class, CleanPopulation.class, CleanAttributes.class,
GenerateSmallScaleCommercialTrafficDemand.class, RunCountOptimization.class, SelectPlansFromIndex.class, FixNetworkV5.class,
GenerateSmallScaleCommercialTrafficDemand.class, RunCountOptimization.class, SelectPlansFromIndex.class,
ExtractRelevantFreightTrips.class, CheckCarAvailability.class, FixSubtourModes.class, ComputeTripChoices.class, ComputePlanChoices.class,
PrepareNetworkParams.class, FreeSpeedOptimizer.class, SetCarAvailabilityByAge.class
ApplyNetworkParams.class, SetCarAvailabilityByAge.class
})
public class RunOpenBerlinCalibration extends MATSimApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.matsim.prepare.network;

import org.matsim.application.prepare.network.opt.FeatureRegressor;
import org.matsim.application.prepare.network.opt.NetworkModel;
import org.matsim.application.prepare.network.params.FeatureRegressor;
import org.matsim.application.prepare.network.params.NetworkModel;

@SuppressWarnings("unused")
public class BerlinNetworkParams implements NetworkModel {
@Override
public FeatureRegressor capacity(String junctionType) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package org.matsim.prepare.network;
import org.matsim.application.prepare.network.opt.FeatureRegressor;
import org.matsim.application.prepare.network.params.FeatureRegressor;
import it.unimi.dsi.fastutil.objects.Object2DoubleMap;

/**
* Generated model, do not modify.
*/
public final class BerlinNetworkParams_capacity_right_before_left implements FeatureRegressor {

public static BerlinNetworkParams_capacity_right_before_left INSTANCE = new BerlinNetworkParams_capacity_right_before_left();
public static final double[] DEFAULT_PARAMS = {328.5757, 269.49268, 231.0964, 232.20732, 238.96944, 217.52971, 245.93172, 196.2599, 130.11137, 162.67091, 163.88892, 168.91855, 177.93335, 120.14436, 164.4786, 162.06781, 139.9658, 110.37732, 114.853226, 122.946236, 104.39815, 115.12266, 119.465096, 79.75374, 124.89497, 87.860054, 29.94975, 71.75533, 135.55458, 111.58922, 81.732124, 63.05375, 83.79276, 88.973175, 59.21387, 86.27968, 54.50634, 43.036, 57.698544, 59.136612, 63.140118, 66.2636, 54.35065, 94.81921, 33.714684, 63.78595, 2.5854192, 40.278103, 67.96995, 65.76385, 51.57006, 39.75378, 41.452232, 44.53736, 31.997284, 10.905647, 42.840084, 27.180868, 41.26702, 44.15924, 62.49501, 33.340282, 34.941944, 20.610315, 61.56515, 26.562513, 17.145185, 42.70646, 29.333172, 32.076294, 16.195492, 47.306076, 0.038455993, 26.993008, 57.766266, 19.425892, 44.300034, 18.40526, 34.33802, 20.988033, 24.663631, 8.912071, 16.680994, 20.58277, -2.8025827, 17.442913, 27.01601, 13.931712, 15.10554, 19.0708, 7.64242, 19.289486, 26.840696, -7.763874, 16.059181, 38.44315, -12.641703, 15.14082, 9.366194, 14.997878, -10.614942, 7.670979, -2.6596265, 22.54426, -39.99585, 10.795762, 15.121941, -24.76626, 8.156524, 13.459406, 1.9710164, 25.679066, 32.778603, 7.3173504, 18.013678, -12.889844, 8.557115, -16.925081, 21.958729, 5.212196, 18.448833, -9.052041, 25.488205, -11.65606, 18.484278, -24.807718, 16.140015, 3.490814, 6.3571334, -22.313322, 1.9848174, -14.237209, 5.360275, 14.617204, -6.1242256, -21.332108, 13.842055, 4.7554398, -8.330782, -2.283184, 1.6876256, 2.2970202, 2.9211318, 11.132554, 8.222093, -3.9318573, 1.0153062, -5.786771, 1.9176867, 20.111982, -13.341735, -5.2488017, 18.932772, -2.2183902, 6.023973, 1.0027256, -11.451071, 2.4872222, -18.286674, 7.4326425, 1.363571, -8.058313, 2.9623373, 0.6662814, 2.0770974, -7.1936674, 5.135833, -1.0970511, 1.265644, 2.826718, 17.753006, 6.6504216, 1.1511834, -4.57029, 1.2588999, -9.778034, 10.277584, 0.7607379, -14.093642, -5.7878227, 25.867159, -12.429686, 5.3511887, 0.4285916, 10.114006, -17.682116, -0.6951186, -3.686415, 5.9004226, 13.114284, 6.1482863, -8.650964, -21.94511, 4.131482, -13.5670595, 0.4509796, -5.169152, 9.02604, 4.7153153, 11.034595, 0.36327785, -10.315573, 11.911259, -11.446489, 0.21937746, -1.9593282, -16.709671, 7.9414787, 10.704911, -15.123205, 0.19036125, -24.913687, 17.289347, 7.1274853, -6.104514, 0.09103825, -16.644897, 14.6652155, -9.731849, 9.392941, 0.027961692, 13.964792, -12.233078, 6.300041, -8.140979, 5.66955, 0.23326816, -8.987359, 24.763414, 0.5058552, 7.135163, -13.049223, 0.9535057, -20.696547, -0.0388047, 14.340578, -16.97962, 12.339516, -10.289911, -0.96544015, -0.017682046, -25.752195, -4.7804914, 1.9569407, 9.993857, -14.980678, -5.454724, 0.24939379, 0.6361772, -0.1201637, -1.6190526, -3.2766292, 0.441606, 12.357215, -1.7070338, 0.3730253, -0.013359121, -14.511282, 10.292064, 3.6254585, -16.11821, 4.9755793, -8.917786, 13.915958};

@Override
public double predict(Object2DoubleMap<String> ft) {
return predict(ft, DEFAULT_PARAMS);
}

@Override
public double[] getData(Object2DoubleMap<String> ft) {
double[] data = new double[14];
Expand All @@ -35,14 +35,14 @@ public double[] getData(Object2DoubleMap<String> ft) {

return data;
}

@Override
public double predict(Object2DoubleMap<String> ft, double[] params) {

double[] data = getData(ft);
for (int i = 0; i < data.length; i++)
if (Double.isNaN(data[i])) throw new IllegalArgumentException("Invalid data at index: " + i);

return score(data, params);
}
public static double score(double[] input, double[] params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package org.matsim.prepare.network;
import org.matsim.application.prepare.network.opt.FeatureRegressor;
import org.matsim.application.prepare.network.params.FeatureRegressor;
import it.unimi.dsi.fastutil.objects.Object2DoubleMap;

/**
* Generated model, do not modify.
*/
public final class BerlinNetworkParams_capacity_traffic_light implements FeatureRegressor {

public static BerlinNetworkParams_capacity_traffic_light INSTANCE = new BerlinNetworkParams_capacity_traffic_light();
public static final double[] DEFAULT_PARAMS = {317.58615, 371.90707, 444.4079, 367.89938, 452.4632, 521.194, 221.14998, 418.9447, 238.79091, 291.76675, 264.705, 355.61447, 403.7937, 365.5921, 474.24683, 378.32794, 242.66312, 287.93793, 215.85152, 241.08905, 280.70428, 339.63272, 196.49597, 283.9714, 116.53004, 150.8152, 112.89288, 94.35883, 181.27068, 132.51706, 154.97064, 107.99846, 208.10245, 163.60548, 236.45038, 161.46591, 185.89522, 144.78482, 81.959114, 160.35768, 86.85572, 122.00112, 55.440426, 35.59504, 47.5406, -1.0464447, 81.68298, 32.481655, 99.88309, 60.85922, 105.463844, 26.421547, 122.86391, 78.82281, 149.16399, 77.819954, 140.49277, 101.915344, 182.51973, 129.1828, 133.98146, 93.75589, 124.24183, 100.78432, 16.466816, 75.58953, 127.80552, 93.29994, 0.23376957, 50.7932, 74.782455, -96.85942, 63.563084, 114.841225, 22.465748, -38.290997, -6.226846, 12.155517, -17.9986, 2.825286, 51.25106, 81.81281, 45.701965, 97.45851, -55.91527, 54.186794, -100.4851, 33.078182, 31.951622, 59.77364, 15.712449, -25.123415, -62.046227, 3.7386997, -1.6807469, 14.7223425, -79.280334, -25.098291, 44.65327, 39.59787, 26.189135, 38.452682, -44.48076, -27.07064, -0.87748986, 33.476585, 2.828202, -7.2282915, 9.147684, -19.32649, -2.6688836, -35.19168, 18.406137, 35.666, -16.669056, 13.995589, -58.327385, 37.820515, -111.47696, 30.654888, 4.6534038, -23.836727, 40.73129, -24.646233, -0.9896539, 9.164257, -16.09563, 23.879135, -81.265884, 110.806305, -10.096006, -103.59249, 23.250616, -6.6231976, 35.643917, 10.402804, -6.304007, 10.867795, 98.86006, 4.4328437, -26.356064, 14.777711, 39.44366, -32.003937, 39.398407, 66.29276, -13.146882, 2.4501045, -48.886215, 13.147323, -2.6031258, -86.03715, -30.806654, -150.73279, -63.707138, -71.69192, -8.80235, 22.45347, -33.47753, 5.1553164, -9.7972975, 39.895508, 101.05463, -4.5401998, -4.673586, -50.86595, 21.978512, 67.956795, -0.083185144, 32.137566, -93.2094, -8.153724, -80.777176, 14.455805, -93.85309, 60.21245, -13.692038, -7.277415, 30.83212, -32.24603, -100.652504, -3.2667801, 9.385725, -38.886555, -5.074366, -108.04678, -4.881211, 3.4359636, 18.0662, -53.116997, 24.502695, -106.45072, -47.24272, -64.23612, 16.40234, 0.9675224, 29.659426, -8.674287, 3.482585, 13.971542, -13.440412, 25.287634, -22.662998, -40.285034, -0.5344266, 21.63141, -27.944065, -78.229294, -8.196033, 73.80613, 22.734848, 83.64019, -6.376454, 1.6941653, -36.45411, -2.6223135, -11.914062, 8.024685, -24.971369, -31.42377, -79.49115, 7.7874856, -36.06723, -120.7791, -27.250916, 6.121556, -4.0152144, -0.40800256, 10.563392, -65.45086, 3.7691972, -5.0086923, -3.4474616, 75.673386, -39.768024, -19.732847, -96.24271, -8.064, -141.17542, -13.893994, 38.31635, 6.502543, -0.25883764, -65.41306, 22.5695, 49.069233, -58.0, 15.185812, -84.45052, 119.54463, 0.025481887, -71.81797, -105.66058, -9.727463, 15.423478, -32.08496, -18.302551, 15.111941, -0.47762036, -70.54971, 101.254326, 52.622845, -102.82444, 50.721146, -50.955395, -22.096672, 2.4938214, -70.05265, -44.918053, 13.204018, -3.3703663, 12.0528345, -4.2761703, 17.460169, -55.959614, 5.86055, -8.090916, -36.531765, 63.93945, 9.11229, -4.176654, -28.24129, 7.667246, -70.52138, 14.541222, 43.480156, 19.017843, -9.304955, -0.4843453, -36.023712, -15.291022, 13.037652, -9.797114, -0.14657627, 3.43533, 80.58867, 14.950171, 74.262886, -22.100275, 8.342942, -21.63872, 26.351545, -81.59937, -7.085229, -17.849325, 0.3312027, -36.536587, -2.5713947, 0.6827665, -7.373554, 27.991127, 51.084366, -89.37909, -24.954538, 63.68669, -6.560981, -35.436714, 32.551506, 12.246587, 43.34547, 74.816246, 0.90199566, -52.66724, -7.0378876, 53.683746, -90.4814, 16.260605, -43.59657, 9.725355, -36.489067, -130.91338, 6.6463614, -1.3643489, 25.442492, -23.657804, 2.5023246, 9.16801, -4.0494256, 14.785485, 72.87099, 48.20112, -15.935579, -66.26077, -3.2686286, -44.378895, -0.7018758, -62.95795, -32.5529, 51.700504, 46.990604, 0.5599213, -5.394757, 28.516947, -0.15938608, -42.77303, 59.238365, -58.80193, 18.635473, 75.40997, 0.2182797, -18.758831, -63.21626, -24.601416, -3.0369816, -86.35893, 32.47767, 10.12496, 60.1001, -28.54264, -84.800735, 3.1651325, 8.93944, -1.5898098, 9.563412, -0.0071494957, 4.110711, -25.789635, 8.986566, -2.7054036, -1.0445749, -15.091509, 1.0582832, -62.30669, -43.359802, 80.34613, -71.1757, 1.3190874, 27.325521, -3.8557642, 37.018536, -55.109516, -0.124732435, 30.982325, -45.928547, 7.0627384, 57.678307, -155.60118, -3.1058724, -24.38769, 3.5961235, -52.660564, 41.334145, 13.617065, -14.218936, 12.212501, 20.175562, -21.666336, -2.080644, 1.5821923, 16.48899, -2.187525, 6.8576293, -5.880714, -30.201483, 2.281507, -0.0108891735, 7.9575567, -86.923996, -37.013927, 3.3186255, 50.558243, 0.8518762, 61.000675, -95.17265, 29.628761, 48.984306, -6.324449, -62.8095, -27.715534, 12.40723, 48.279, -2.5604773, -38.657818, 29.339884, 0.06334605};

@Override
public double predict(Object2DoubleMap<String> ft) {
return predict(ft, DEFAULT_PARAMS);
}

@Override
public double[] getData(Object2DoubleMap<String> ft) {
double[] data = new double[14];
Expand All @@ -35,14 +35,14 @@ public double[] getData(Object2DoubleMap<String> ft) {

return data;
}

@Override
public double predict(Object2DoubleMap<String> ft, double[] params) {

double[] data = getData(ft);
for (int i = 0; i < data.length; i++)
if (Double.isNaN(data[i])) throw new IllegalArgumentException("Invalid data at index: " + i);

return score(data, params);
}
public static double score(double[] input, double[] params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package org.matsim.prepare.network;
import org.matsim.application.prepare.network.opt.FeatureRegressor;
import org.matsim.application.prepare.network.params.FeatureRegressor;
import it.unimi.dsi.fastutil.objects.Object2DoubleMap;

/**
* Generated model, do not modify.
*/
public final class BerlinNetworkParams_speedRelative_priority implements FeatureRegressor {

public static BerlinNetworkParams_speedRelative_priority INSTANCE = new BerlinNetworkParams_speedRelative_priority();
public static final double[] DEFAULT_PARAMS = {0.15724492, 0.19273548, 0.18403086, 0.19157858, 0.16120821, 0.1980568, 0.17025721, 0.14275415, 0.11048176, 0.102709346, 0.06792478, 0.10821823, 0.09011285, 0.08277143, 0.09243622, 0.09845659, 0.06138229, 0.06789871, 0.057023786, 0.045561712, 0.040391147, 0.054062303, 0.0, 0.040396813, 0.035386518, 0.0, 0.042849354, 0.0466025, 0.035123896, 0.0, 0.016435765, 0.0, 0.0, 0.019191166, 0.040614914, 0.027222177, 0.0048989994, 0.035677213, 0.021704927, 0.015032333, 0.031955387, 0.01666849, 0.0074288645, 0.014110131, 0.024576068, 0.010005573, 0.041455485, 0.025570804, 0.017918263, 0.0, 0.0, 0.01256823, 0.015104672, -0.012481432, 0.00536652, 0.009893488, 0.009986547, 0.018633667, 0.012301514, 0.0055723884, -0.0042632725, 0.009677288, 0.0015550333, 0.006243969, -0.0037499985, 0.0032326714, 0.0217748, 0.0048877522, -0.01280412, 0.0, 0.011345619, 0.0, 0.0, 0.0035977655, -0.008411235, 0.0, 0.01370504, -0.0006115317, 0.007350211, 0.0014637669, 0.005347326, 0.0020510554, 0.005052541, -0.0014409187, 0.0018602, -0.0016169732, 0.0031055745, -0.0056220083, 0.011374512, 0.0, 0.001966972, -0.0028674304, 0.0020517444, 0.00076617644, -0.0046325005, -0.004758692, 0.0012792036, -0.008385347, 0.0, 0.002726265, 0.00020829745, 0.0, 0.0, -0.0082345735, 0.0, -0.035001624, -0.0050901906, 0.0, -0.0017592426, 0.00027184488, -0.0030666916, -0.013880559, 0.0053953347, 0.0035018784, 0.00045144613, 8.061571e-05, -0.0033695176, 0.0030606918, 0.00033529464, -0.004963807, 0.010418295, -0.00029751126, -0.006895263, 0.00044846663, 0.0026161217, -0.021911642, -0.0044968612, 0.0, -0.0012206174, -0.025058791, 0.0042696362, -0.0005126147, 0.0004962817, -0.00077095797, 0.002565097, 0.0, -0.006931564, 0.0, -0.022092693, -0.007780278, 0.0007043617, -0.0008171179, -0.002066162, 0.008384691, 0.0011571822, 0.00027108335, -0.0009287675, 0.006082932, 0.0028573114, -0.00846794, 0.00018975107, 0.0045378944, -0.0011339803, 0.005224601, -6.513751e-05, 0.0, 0.0, -0.018269084, 0.0034695654, -0.00026458103, -0.0027475485, 0.0068913423, 0.0, -0.012815217, 0.00026853607, -0.0027989408, 0.00024086394, 0.0066861873, 0.0, 6.4727988e-06, -0.0014501911, -0.002494975, 0.0015008535, -0.00049155444, 0.0067627244, -0.0014077883, 0.0015698029, 0.0, -0.010308943, -0.0009068087, 0.0, 0.0027998113, -0.0046737837, 0.00012720711, -0.0042179585, 0.003662557, -0.0012615945, 0.00192968, 3.7585372e-07, 9.2846225e-05, 0.013026616, -0.008578217, -0.005248636, -0.0036968153, 0.0003156052, 0.0024093715, -0.0003495667, -0.00030448436, -3.8445793e-05, 0.0, -0.024849607, 0.00016108007, 0.015603923, 0.0, -0.0035782477, -2.18532e-05, -0.009707966, 0.0, 0.0041826395, -0.0035536666, 0.004105262, 0.010043072, 0.00020426886, 3.1741417e-06, 0.00572087, -0.0007401902, 0.0, -0.0108033465, -0.013462666, -0.001430584, -0.00095125375, 4.312593e-05, 0.00028308886, 0.0037140378, 0.00079021766, -0.005122026, -0.0013027412, -0.0047874786, 0.0041786814, -0.0005791032, -0.008750576, 0.0137136765, 4.2379565e-06, 0.0030340564, -0.021573383, -0.0009175329, 0.00065593724, -0.0048078895, 0.00050423876, 0.0017348679, -0.010162599, 0.00016265023, 0.0029644673, -0.008102837, 0.0024075173, -1.6770764e-05, 0.00025584106, -3.6568855e-07, -0.0074612647, 0.011033748, 0.0, 0.007791925, -0.019453187, 0.0005933511, 0.0024033622, -0.0007407156, -0.0063573257, 0.0012771342, 0.0044823387, -0.0023863865, 4.71596e-05, 0.000489205, -0.0005635803, -3.7119185e-05, 0.0027739953, -0.0083763795, -0.02207759, -0.002804457, 0.015720833, 0.0, 0.0007142104, -3.4262026e-05, 0.005516721, -0.0006166697, 0.0, 0.0132253505, 0.0, -0.0045134304, 0.0060599926, -0.00045232018};

@Override
public double predict(Object2DoubleMap<String> ft) {
return predict(ft, DEFAULT_PARAMS);
}

@Override
public double[] getData(Object2DoubleMap<String> ft) {
double[] data = new double[14];
Expand All @@ -35,14 +35,14 @@ public double[] getData(Object2DoubleMap<String> ft) {

return data;
}

@Override
public double predict(Object2DoubleMap<String> ft, double[] params) {

double[] data = getData(ft);
for (int i = 0; i < data.length; i++)
if (Double.isNaN(data[i])) throw new IllegalArgumentException("Invalid data at index: " + i);

return score(data, params);
}
public static double score(double[] input, double[] params) {
Expand Down
Loading

0 comments on commit a2b3588

Please sign in to comment.