diff --git a/ATT/ATT.csproj b/ATT/ATT.csproj index bf3dc94..f960553 100644 --- a/ATT/ATT.csproj +++ b/ATT/ATT.csproj @@ -57,9 +57,8 @@ False ..\Libraries\LAIR.MachineLearning.dll - - False - ..\Libraries\LAIR.Misc.dll + + ..\Libraries\LAIR.Math.dll False diff --git a/ATT/Classifiers/AdaBoost.cs b/ATT/Classifiers/AdaBoost.cs index 5c304d0..0cc9553 100644 --- a/ATT/Classifiers/AdaBoost.cs +++ b/ATT/Classifiers/AdaBoost.cs @@ -33,8 +33,7 @@ public class AdaBoost : Classifier { static AdaBoost() { - if (Configuration.RCranMirror != null) - R.InstallPackages(R.CheckForMissingPackages(new string[] { "ada" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); + R.InstallPackages(R.CheckForMissingPackages(new string[] { "ada" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); } private int _iterations; @@ -107,7 +106,7 @@ public override void Consume(FeatureVectorList featureVectors) } protected override void BuildModel() - { + { StringBuilder rCmd = new StringBuilder(@" trainRaw=read.csv(""" + RawTrainPath.Replace(@"\", "/") + @""", header = TRUE, sep = ',')" + @" trainNorm=trainRaw @@ -223,9 +222,11 @@ public override void Classify(FeatureVectorList featureVectors) } write.table(mult, file=""" + PredictionsPath.Replace("\\", "/") + @""", row.names=FALSE, sep=',')" + @" "); - R.Execute(rCmd.ToString(), false); + string output, error; + R.Execute(rCmd.ToString(), false, out output, out error); - if (File.Exists(PredictionsPath)) + try + { using (StreamReader predictionsFile = new StreamReader(PredictionsPath)) { string[] colnames = predictionsFile.ReadLine().Split(','); @@ -238,7 +239,7 @@ public override void Classify(FeatureVectorList featureVectors) for (int i = 0; i < colnames.Length; i++) { - string label = colnames[i].Replace("\"", @""); ; + string label = colnames[i].Replace("\"", ""); float prob = float.Parse(lines[i]); featureVectors[row].DerivedFrom.PredictionConfidenceScores.Add(label, prob); } @@ -250,14 +251,27 @@ public override void Classify(FeatureVectorList featureVectors) if (row != featureVectors.Count) throw new Exception("Number of predictions doesn't match number of input vectors"); } - else - Console.Out.WriteLine("WARNING: AdaBoost failed to classify points. See previous messages for hints."); - - File.Delete(ColumnMaxMinPath); - File.Delete(ClassPath); - File.Delete(AdaModelPath); - File.Delete(RawPredictionInstancesPath); - File.Delete(PredictionsPath); + } + catch (Exception ex) + { + throw new Exception("ERROR: AdaBoost failed to classify points. Output and error messages follow:" + Environment.NewLine + + "\tException message: " + ex.Message + Environment.NewLine + + "\tR output: " + output + Environment.NewLine + + "\tR orror: " + error); + } + finally + { + try { File.Delete(ColumnMaxMinPath); } + catch { } + try { File.Delete(ClassPath); } + catch { } + try { File.Delete(AdaModelPath); } + catch { } + try { File.Delete(RawPredictionInstancesPath); } + catch { } + try { File.Delete(PredictionsPath); } + catch { } + } } } diff --git a/ATT/Classifiers/RandomForest.cs b/ATT/Classifiers/RandomForest.cs index e879867..4848fe5 100644 --- a/ATT/Classifiers/RandomForest.cs +++ b/ATT/Classifiers/RandomForest.cs @@ -33,8 +33,7 @@ public class RandomForest : Classifier { static RandomForest() { - if (Configuration.RCranMirror != null) - R.InstallPackages(R.CheckForMissingPackages(new string[] { "randomForest" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); + R.InstallPackages(R.CheckForMissingPackages(new string[] { "randomForest" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); } private int _numTrees; @@ -104,7 +103,7 @@ public override void Consume(FeatureVectorList featureVectors) } } } - + protected override void BuildModel() { StringBuilder rCmd = new StringBuilder(@" @@ -126,9 +125,26 @@ protected override void BuildModel() rf=randomForest(Class ~., data=trainNorm, ntree=" + _numTrees + ", importance=TRUE, seed=99)" + @" save(rf, file=""" + RandomForestModelPath.Replace("\\", "/") + @""")" + @" "); - R.Execute(rCmd.ToString(), false); + string output, error; + R.Execute(rCmd.ToString(), false, out output, out error); - File.Delete(RawTrainPath); + try + { + if (!File.Exists(RandomForestModelPath)) + throw new Exception("RandomForest model was not created at \"" + RandomForestModelPath + "\"."); + } + catch (Exception ex) + { + throw new Exception("ERROR: RandomForest failed to build model. Output and error messages follow:" + Environment.NewLine + + "\tException message: " + ex.Message + Environment.NewLine + + "\tR output: " + output + Environment.NewLine + + "\tR orror: " + error); + } + finally + { + try { File.Delete(RawTrainPath); } + catch { } + } } public override IEnumerable SelectFeatures(Prediction prediction) @@ -182,9 +198,11 @@ public override void Classify(FeatureVectorList featureVectors) names(dfp)[names(dfp)=='NULL.'] <- 'NULL' write.table(dfp, file=""" + PredictionsPath.Replace("\\", "/") + @""", row.names=FALSE, sep=',')" + @" "); - R.Execute(rCmd.ToString(), false); + string output, error; + R.Execute(rCmd.ToString(), false, out output, out error); - if (File.Exists(PredictionsPath)) + try + { using (StreamReader predictionsFile = new StreamReader(PredictionsPath)) { string[] colnames = predictionsFile.ReadLine().Split(','); @@ -210,13 +228,25 @@ public override void Classify(FeatureVectorList featureVectors) if (row != featureVectors.Count) throw new Exception("Number of predictions doesn't match number of input vectors"); } - else - Console.Out.WriteLine("WARNING: RandomForest failed to classify points. See previous messages for hints."); - - File.Delete(ColumnMaxMinPath); - File.Delete(RandomForestModelPath); - File.Delete(RawPredictionInstancesPath); - File.Delete(PredictionsPath); + } + catch (Exception ex) + { + throw new Exception("ERROR: RandomForest failed to classify points. Output and error messages follow:" + Environment.NewLine + + "\tException message: " + ex.Message + Environment.NewLine + + "\tR output: " + output + Environment.NewLine + + "\tR orror: " + error); + } + finally + { + try { File.Delete(ColumnMaxMinPath); } + catch { } + try { File.Delete(RandomForestModelPath); } + catch { } + try { File.Delete(RawPredictionInstancesPath); } + catch { } + try { File.Delete(PredictionsPath); } + catch { } + } } } diff --git a/ATT/Configuration.cs b/ATT/Configuration.cs index 15f9a22..cd2011f 100644 --- a/ATT/Configuration.cs +++ b/ATT/Configuration.cs @@ -24,6 +24,7 @@ using LAIR.ResourceAPIs.R; using PTL.ATT.Models; using System.Reflection; +using LAIR.Extensions; namespace PTL.ATT { @@ -108,6 +109,7 @@ public static int PostgresCommandTimeout #region postgis private static string _shp2pgsqlPath; private static string _pgsql2shpPath; + private static string _postgisShapefileDirectory; public static string Shp2PgsqlPath { @@ -120,6 +122,12 @@ public static string Pgsql2ShpPath get { return _pgsql2shpPath; } set { _pgsql2shpPath = value; } } + + public static string PostGisShapefileDirectory + { + get { return Configuration._postgisShapefileDirectory; } + set { Configuration._postgisShapefileDirectory = value; } + } #endregion #region r @@ -149,6 +157,36 @@ public static Dictionary> ClassifierTypeOptions } #endregion + #region incidents + private static string _incidentsImportDirectory; + + public static string IncidentsImportDirectory + { + get { return Configuration._incidentsImportDirectory; } + set { Configuration._incidentsImportDirectory = value; } + } + #endregion + + #region events + private static string _eventsImportDirectory; + + public static string EventsImportDirectory + { + get { return Configuration._eventsImportDirectory; } + set { Configuration._eventsImportDirectory = value; } + } + #endregion + + #region importers + private static string _importersLoadDirectory; + + public static string ImportersLoadDirectory + { + get { return Configuration._importersLoadDirectory; } + set { Configuration._importersLoadDirectory = value; } + } + #endregion + #region models private static string _modelsDirectory; private static Dictionary _modelTypeFeatureExtractorType; @@ -195,6 +233,11 @@ public static int ProcessorCount private static string _path = null; private static bool _initialized = false; + public static bool Initialized + { + get { return _initialized; } + } + public static string LicenseText { get @@ -238,6 +281,7 @@ public static void Initialize(string path, bool initializeDB) XmlParser postgisP = new XmlParser(p.OuterXML("postgis")); _shp2pgsqlPath = postgisP.ElementText("shp2pgsql"); _pgsql2shpPath = postgisP.ElementText("pgsql2shp"); + _postgisShapefileDirectory = postgisP.ElementText("shapefile_directory"); if (string.IsNullOrWhiteSpace(_shp2pgsqlPath) || !File.Exists(_shp2pgsqlPath)) throw new FileNotFoundException("Failed to locate shp2pgsql executable. Check configuration."); @@ -288,6 +332,15 @@ public static void Initialize(string path, bool initializeDB) _classifierTypeOptions.Add(type, optionValue); } + XmlParser incidentsP = new XmlParser(p.OuterXML("incidents")); + _incidentsImportDirectory = incidentsP.ElementText("import_directory"); + + XmlParser eventsP = new XmlParser(p.OuterXML("events")); + _eventsImportDirectory = eventsP.ElementText("import_directory"); + + XmlParser importersP = new XmlParser(p.OuterXML("importers")); + _importersLoadDirectory = importersP.ElementText("load_directory"); + XmlParser modelingP = new XmlParser(p.OuterXML("modeling")); _modelsDirectory = modelingP.ElementText("model_directory"); if (string.IsNullOrWhiteSpace(_modelsDirectory)) @@ -338,11 +391,33 @@ public static void Initialize(string path, bool initializeDB) throw new Exception("Invalid processor count (must be >= 1): " + _processorCount); if (initializeDB) + { DB.Initialize(); + _initialized = true; + } + } - _initialized = true; + /// + /// Resets the entire ATT system, deleting and recreating tables. ATT system must be initialized before calling this. + /// + /// Tables to keep + public static void Reset(IEnumerable tablesToKeep) + { + if (!_initialized) + throw new InvalidOperationException("ATT system has not been initialized. Cannot reset."); + + string tablesToDrop = DB.Tables.Where(t => tablesToKeep == null || !tablesToKeep.Contains(t)).Concatenate(","); + if (!string.IsNullOrWhiteSpace(tablesToDrop)) + { + DB.Connection.ExecuteNonQuery("DROP TABLE " + tablesToDrop + " CASCADE"); + PTL.ATT.Configuration.Reload(true); + } } + /// + /// Reloads the configuration, keeping all existing data. + /// + /// Whether or not to reinitialize the database. public static void Reload(bool reinitializeDB) { _initialized = false; diff --git a/ATT/DB.cs b/ATT/DB.cs index ac4f6d4..2542477 100644 --- a/ATT/DB.cs +++ b/ATT/DB.cs @@ -28,6 +28,11 @@ public static class DB { public static ConnectionPool Connection; + public static string[] Tables + { + get { return Connection.GetTables().Where(t => t != "spatial_ref_sys").ToArray(); } + } + public static void Initialize() { Connection = new ConnectionPool(Configuration.PostgresHost, Configuration.PostgresPort, Configuration.PostgresSSL, Configuration.PostgresUser, Configuration.PostgresPassword, Configuration.PostgresDatabase, Configuration.PostgresConnectionTimeout, Configuration.PostgresRetryLimit, Configuration.PostgresCommandTimeout, Configuration.PostgresMaxPoolSize); diff --git a/ATT/Evaluation/Plot.cs b/ATT/Evaluation/Plot.cs index 5ab8107..9856896 100644 --- a/ATT/Evaluation/Plot.cs +++ b/ATT/Evaluation/Plot.cs @@ -94,6 +94,17 @@ protected Plot(string title, long slice, Dictionary> series _imageFormat = format; } + /// + /// Renders this surveillance plot + /// + /// Height in pixels + /// Width in pixels + /// Whether or not to include the title + /// Pass non-null to plot a series difference. If both elements are null, the series difference with largest difference is plotted. Or you can pass specific series names to plot a specific difference. If only one series name is provided, the maximum difference between that series and another will be computed. + /// Whether or not to use black and white only + /// Whether or not to retain the image on disk + /// Additional arguments: (0) plot margins in 0,0,0,0 format (default is 5,4,4,2), (1) additional arguments to plot and lines commands (e.g., cex), (2) additional arguments to legend command (e.g., cex) + /// Path to rendered image file public void Render(int height, int width, bool includeTitle, Tuple plotSeriesDifference, bool blackAndWhite, bool retainImageOnDisk, params string[] args) { _imagePath = CreateImageOnDisk(height, width, includeTitle, plotSeriesDifference, blackAndWhite, args); diff --git a/ATT/Evaluation/SurveillancePlot.cs b/ATT/Evaluation/SurveillancePlot.cs index 011fa1e..aa08d10 100644 --- a/ATT/Evaluation/SurveillancePlot.cs +++ b/ATT/Evaluation/SurveillancePlot.cs @@ -36,8 +36,7 @@ public class SurveillancePlot : Plot #region static members static SurveillancePlot() { - if (Configuration.RCranMirror != null) - R.InstallPackages(R.CheckForMissingPackages(new string[] { "zoo" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); + R.InstallPackages(R.CheckForMissingPackages(new string[] { "zoo" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); } public static Dictionary> GetSliceLocationTrueCount(IEnumerable incidents, Prediction prediction) @@ -234,7 +233,7 @@ public SurveillancePlot(string title, long slice, DictionaryWhether or not to include the title /// Pass non-null to plot a series difference. If both elements are null, the series difference with largest difference is plotted. Or you can pass specific series names to plot a specific difference. If only one series name is provided, the maximum difference between that series and another will be computed. /// Whether or not to use black and white only - /// Additional arguments: 1) plot margins in 0,0,0,0 format (default is 5,4,4,2), 2) additional arguments to plot and lines commands (e.g., cex), 3) additional arguments to legend command (e.g., cex) + /// Additional arguments: (0) plot margins in 0,0,0,0 format (default is 5,4,4,2), (1) additional arguments to plot and lines commands (e.g., cex), (2) additional arguments to legend command (e.g., cex) /// Path to rendered image file protected override string CreateImageOnDisk(int height, int width, bool includeTitle, Tuple plotSeriesDifference, bool blackAndWhite, params string[] args) { @@ -245,8 +244,8 @@ protected override string CreateImageOnDisk(int height, int width, bool includeT List tmpPaths = new List(); #region difference series - // make sure series have the same x coordinates across the entire series - if (plotSeriesDifference != null && !SeriesPoints.Keys.All(series => SeriesPoints[series].Count == SeriesPoints.Values.First().Count && SeriesPoints[series].Zip(SeriesPoints.Values.First(), (p1, p2) => new Tuple(p1, p2)).All(t => t.Item1.X == t.Item2.X))) + // make sure we have more than one series and that all series have the same x coordinates across the series (i.e., they're comparable) + if (SeriesPoints.Count == 1 || !SeriesPoints.Keys.All(series => SeriesPoints[series].Count == SeriesPoints.Values.First().Count && SeriesPoints[series].Zip(SeriesPoints.Values.First(), (p1, p2) => new Tuple(p1, p2)).All(t => t.Item1.X == t.Item2.X))) plotSeriesDifference = null; string diffSeriesPath = null; @@ -257,7 +256,7 @@ protected override string CreateImageOnDisk(int height, int width, bool includeT diffSeriesPath = Path.GetTempFileName(); tmpPaths.Add(diffSeriesPath); - Func, List, List> seriesDifferencer = new Func,List,List>((series1, series2) => + Func, List, List> seriesDifferencer = new Func, List, List>((series1, series2) => series1.Zip(series2, (p1, p2) => { if (p1.X != p2.X) @@ -315,9 +314,9 @@ protected override string CreateImageOnDisk(int height, int width, bool includeT main.title = paste(title.lines, sep=""\n"")"); int seriesNum = 0; - List seriesOrder = new List(); + string[] seriesOrder = new string[SeriesPoints.Count]; string[] seriesDiffDummy = plotSeriesDifference == null ? new string[] { } : new string[] { "dummy" }; - List plotCharacters = SeriesPoints.Keys.OrderBy(k => k).Union(seriesDiffDummy).Select((s, i) => ((i + 1) % 25)).ToList(); // R has 25 plot characters indexed starting at 1 + List plotCharacters = SeriesPoints.Keys.OrderBy(k => k).Union(seriesDiffDummy).Select((s, i) => ((i + 1) % 25).ToString()).ToList(); // R has 25 plot characters indexed starting at 1 List plotColors = SeriesPoints.Keys.OrderBy(k => k).Union(seriesDiffDummy).Select((s, i) => blackAndWhite ? "\"black\"" : (i + 1).ToString()).ToList(); // R color numbers start at 1 and wrap string aucOutputPath = Path.GetTempFileName(); tmpPaths.Add(aucOutputPath); @@ -341,21 +340,34 @@ protected override string CreateImageOnDisk(int height, int width, bool includeT if (seriesTitle.Length > 20) seriesTitle = seriesTitle.Substring(0, 20); + string plotCommand; + if (seriesNum == 0) + plotCommand = "plot(x,y,type=\"o\",col=" + plotColor + ",pch=" + plotCharacterVector + ",xlim=c(0,1),xlab=\"% area surveilled\",ylim=c(" + minY + ",1),ylab=\"% incidents captured\"" + (includeTitle ? ",main=main.title" : ""); // for the first series, plot the series + else + plotCommand = "lines(x,y,type=\"o\",col=" + plotColor + ",pch=" + plotCharacterVector; // for subsequent series, just plot the series line + + if(args != null) + plotCommand += "," + args[1]; // add additional plot arguments, which are passed in + + plotCommand += ")"; // close plot command + + if(seriesNum == 0) + plotCommand += Environment.NewLine + "abline(0,1,lty=\"dashed\")"; // and add the diagonal line for the first series + rCmd.Append(@" points = read.csv(""" + pointsInputPath.Replace(@"\", @"\\") + @""",header=FALSE) x = points[,1] y = points[,2] -" + (seriesNum == 0 ? @"plot(x,y,type=""o"",col=" + plotColor + ",pch=" + plotCharacterVector + @",xlim=c(0,1),xlab=""% area surveilled"",ylim=c(" + minY + @",1),ylab=""% incidents captured""" + (includeTitle ? ",main=main.title" : "") + (args == null ? "" : "," + args[1]) + @") -abline(0,1,lty=""dashed"")" : @"lines(x,y,type=""o"",col=" + plotColor + ",pch=" + plotCharacterVector + (args == null ? "" : "," + args[1]) + ")") + @" +" + plotCommand + @" idx = order(x) auc = round(sum(diff(x[idx])*rollmean(y[idx],2)),digits=" + _aucDigits + @") legend_labels=c(legend_labels,paste(""" + seriesTitle + @" (AUC="",auc,"")"",sep=""""))" + @" cat(as.character(auc),file=""" + aucOutputPath.Replace(@"\", @"\\") + @""",sep=""\n"",append=TRUE)"); - seriesNum++; - seriesOrder.Add(series); + seriesOrder[seriesNum++] = series; } + #region difference series if (plotSeriesDifference != null && diffMax.Y != 0) { string plotCharacterVector = "c(" + plotCharacters.Last() + ",rep(NA_integer_," + (SeriesPoints.Values.First().Count / 10) + "))"; // show 10 plot characters for series @@ -369,16 +381,20 @@ protected override string CreateImageOnDisk(int height, int width, bool includeT abline(v=" + diffMax.X + @",lty=""dotted"",col=""grey"") abline(h=" + diffMax.Y + @",lty=""dotted"",col=""grey"")"); } + #endregion rCmd.Append(@" grid() -legend(0.4,0.4,legend_labels,pch=c(" + plotCharacters.Select(c => c.ToString()).Concatenate(",") + @"),col=c(" + plotColors.Select(c => c.ToString()).Concatenate(",") + @")" + (args == null ? "" : "," + args[2]) + @",bg=""white"") +legend(0.4,0.4,legend_labels,pch=c(" + plotCharacters.Concatenate(",") + @"),col=c(" + plotColors.Concatenate(",") + @")" + (args == null ? "" : "," + args[2]) + @",bg=""white"") dev.off()"); R.Execute(rCmd.ToString(), false); - _seriesAUC = new Dictionary(); string[] aucOutput = File.ReadLines(aucOutputPath).ToArray(); + if (aucOutput.Length != seriesOrder.Length) + throw new Exception("Failed to compute AUC for all " + seriesOrder + " surveillance plot series: " + aucOutput.Length + " of " + seriesOrder.Length + " succeeded."); + + _seriesAUC = new Dictionary(); for (int i = 0; i < aucOutput.Length; ++i) _seriesAUC.Add(seriesOrder[i], aucOutput[i] == "NA" ? float.NaN : float.Parse(aucOutput[i])); diff --git a/ATT/Importers/Importer.cs b/ATT/Importers/Importer.cs index 1f44208..bc5d9b4 100644 --- a/ATT/Importers/Importer.cs +++ b/ATT/Importers/Importer.cs @@ -159,6 +159,7 @@ public Importer(string name, string path, string relativePath, string sourceURI) public virtual void Import() { + // if the file doesn't exist but we have a source URI, try to download it if (!System.IO.File.Exists(_path) && !string.IsNullOrWhiteSpace(_sourceURI)) { // if the import path used to reside within an unzipped archive that no longer exists, download the source URI to the original archive path (we'll unzip below) @@ -181,9 +182,12 @@ public virtual void Import() { string potentialZipFilePath = parentDirectory.Substring(0, unzippedIndex); string extension = System.IO.Path.GetExtension(potentialZipFilePath); - if (!System.IO.Directory.Exists(parentDirectory) && System.IO.File.Exists(potentialZipFilePath) && extension == ".zip") + if (!System.IO.Directory.Exists(parentDirectory) && System.IO.File.Exists(potentialZipFilePath) && extension.ToLower() == ".zip") ZipFile.ExtractToDirectory(potentialZipFilePath, parentDirectory); } + + if (!System.IO.File.Exists(_path)) + throw new FileNotFoundException("File to import does not exist and could not be downloaded: \"" + _path + "\"."); } public void Save(bool deleteFirst) diff --git a/ATT/Importers/IncidentShapefileImporter.cs b/ATT/Importers/IncidentShapefileImporter.cs index 4668a54..e567987 100644 --- a/ATT/Importers/IncidentShapefileImporter.cs +++ b/ATT/Importers/IncidentShapefileImporter.cs @@ -44,7 +44,7 @@ public IncidentShapefileImporter(string name, string path, string relativePath, _importArea = importArea; _incidentColumnShapefileColumn = incidentColumnShapefileColumn; _hourOffset = hourOffset; - } + } public override void Import() { @@ -68,5 +68,21 @@ public override void Import() Console.Out.WriteLine("Incident import from shapefile finished."); } + + public override void GetUpdateRequests(UpdateRequestDelegate updateRequest) + { + base.GetUpdateRequests(updateRequest); + + updateRequest("Area", _importArea, Area.GetAll(), GetUpdateRequestId("area")); + updateRequest("Hour offset", _hourOffset, null, GetUpdateRequestId("offset")); + } + + public override void Update(Dictionary updateKeyValue) + { + base.Update(updateKeyValue); + + _importArea = (Area)updateKeyValue[GetUpdateRequestId("area")]; + _hourOffset = Convert.ToInt32(updateKeyValue[GetUpdateRequestId("offset")]); + } } } diff --git a/ATT/Importers/ShapefileImporter.cs b/ATT/Importers/ShapefileImporter.cs index 2711816..cd72a9b 100644 --- a/ATT/Importers/ShapefileImporter.cs +++ b/ATT/Importers/ShapefileImporter.cs @@ -75,7 +75,12 @@ public override void Import() if (!importOptionValue.ContainsKey("reprojection") || string.IsNullOrWhiteSpace(importOptionValue["reprojection"])) neededValues.Add("reprojection"); if (!importOptionValue.ContainsKey("name") || string.IsNullOrWhiteSpace(importOptionValue["name"])) neededValues.Add("name"); if (neededValues.Count > 0) - _shapefileInfoRetriever.GetShapefileInfo(Path, neededValues, importOptionValue); + { + if (_shapefileInfoRetriever == null) + throw new Exception("Missing the following shapefile options, and no information retriever was present: " + neededValues.Concatenate(",")); + else + _shapefileInfoRetriever.GetShapefileInfo(Path, neededValues, importOptionValue); + } string missingValues = neededValues.Where(v => !importOptionValue.ContainsKey(v) || string.IsNullOrWhiteSpace(importOptionValue[v])).Concatenate(", "); if (missingValues != "") @@ -160,8 +165,11 @@ public override void Import() } catch (Exception ex) { - try { _importedShapefile.Delete(); } - catch (Exception ex2) { Console.Out.WriteLine("Failed to delete shapefile: " + ex2.Message); } + if (_importedShapefile != null) + { + try { _importedShapefile.Delete(); } + catch (Exception ex2) { Console.Out.WriteLine("Failed to delete shapefile: " + ex2.Message); } + } _importedShapefile = null; diff --git a/ATT/Models/DiscreteChoiceModel.cs b/ATT/Models/DiscreteChoiceModel.cs index 3d6d100..3cc0d6d 100644 --- a/ATT/Models/DiscreteChoiceModel.cs +++ b/ATT/Models/DiscreteChoiceModel.cs @@ -147,7 +147,8 @@ public static void Evaluate(Prediction prediction, int plotWidth, int plotHeight } Dictionary> seriesPoints = new Dictionary>(); - seriesPoints.Add("Slice " + sliceNum++, SurveillancePlot.GetSurveillancePlotPoints(sliceLocationTrueCount[slice], sliceLocationThreats[slice], true, true)); + string predictionSeriesName = sliceLocationTrueCount.Count > 1 ? "Slice " + sliceNum++ : "Prediction"; + seriesPoints.Add(predictionSeriesName, SurveillancePlot.GetSurveillancePlotPoints(sliceLocationTrueCount[slice], sliceLocationThreats[slice], true, true)); seriesPoints.Add(OptimalSeriesName, SurveillancePlot.GetOptimalSurveillancePlotPoints(sliceLocationTrueCount[slice], sliceLocationThreats[slice], true, true)); prediction.AssessmentPlots.Add(new SurveillancePlot(slicePlotTitle, slice, seriesPoints, plotHeight, plotWidth, Plot.Format.JPEG, 2)); prediction.SliceThreatCorrelation.Add(slice, GetThreatCorrelation(sliceLocationThreats[slice], sliceLocationTrueCount[slice])); @@ -214,7 +215,6 @@ private static float GetThreatCorrelation(Dictionary> locat private DateTime _trainingStart; private DateTime _trainingEnd; private List _smoothers; - private string _modelDirectory; private Area _predictionArea; #region properties @@ -285,7 +285,7 @@ public List Smoothers public string ModelDirectory { - get { return _modelDirectory; } + get { return Path.Combine(Configuration.ModelsDirectory, _id.ToString()); } } public Area PredictionArea @@ -318,12 +318,11 @@ protected DiscreteChoiceModel() string predictionAreaId = _predictionArea == null ? "NULL" : _predictionArea.Id.ToString(); _id = Convert.ToInt32(DB.Connection.ExecuteScalar("INSERT INTO " + Table + " (" + Columns.Insert + ") VALUES (@bytes," + predictionAreaId + "," + trainingAreaId + ") RETURNING " + Columns.Id, new Parameter("bytes", NpgsqlDbType.Bytea, ms.ToArray()))); - _modelDirectory = Path.Combine(Configuration.ModelsDirectory, _id.ToString()); + // if the database gets reset, there could be an old model directory hanging around -- delete it + if (Directory.Exists(ModelDirectory)) + Directory.Delete(ModelDirectory, true); - if (Directory.Exists(_modelDirectory)) - Directory.Delete(_modelDirectory, true); - - Directory.CreateDirectory(_modelDirectory); + Directory.CreateDirectory(ModelDirectory); Update(); } @@ -407,7 +406,7 @@ public virtual string GetDetails(int indentLevel) indent + "Training start: " + _trainingStart.ToShortDateString() + " " + _trainingStart.ToShortTimeString() + Environment.NewLine + indent + "Training end: " + _trainingEnd.ToShortDateString() + " " + _trainingEnd.ToShortTimeString() + Environment.NewLine + indent + "Smoothers: " + _smoothers.Select(s => s.GetSmoothingDetails()).Concatenate(", ") + Environment.NewLine + - (_modelDirectory == "" ? "" : indent + "Model directory: " + _modelDirectory); + (ModelDirectory == "" ? "" : indent + "Model directory: " + ModelDirectory); } public void Update() @@ -431,8 +430,8 @@ public void Delete() try { - if (Directory.Exists(_modelDirectory)) - Directory.Delete(_modelDirectory, true); + if (Directory.Exists(ModelDirectory)) + Directory.Delete(ModelDirectory, true); } catch (Exception ex) { Console.Out.WriteLine("Failed to delete model directory: " + ex.Message); } diff --git a/ATT/Models/FeatureBasedDCM.cs b/ATT/Models/FeatureBasedDCM.cs index 255ae80..fda57f5 100644 --- a/ATT/Models/FeatureBasedDCM.cs +++ b/ATT/Models/FeatureBasedDCM.cs @@ -104,23 +104,23 @@ public static IEnumerable GetAvailableFeatures(Area area) { // spatial distance parameters = new FeatureParameterCollection(); - parameters.Add(SpatialDistanceParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); - parameters.Add(SpatialDistanceParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); + parameters.Set(SpatialDistanceParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); + parameters.Set(SpatialDistanceParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); yield return new Feature(typeof(FeatureType), FeatureType.MinimumDistanceToGeometry, shapefile.Id.ToString(), shapefile.Id.ToString(), shapefile.Name + " (distance)", parameters); // spatial density parameters = new FeatureParameterCollection(); - parameters.Add(SpatialDensityParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); - parameters.Add(SpatialDensityParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); - parameters.Add(SpatialDensityParameter.SampleSize, "500", "Sample size for spatial density estimate."); - parameters.Add(SpatialDensityParameter.DefaultValue, "0", "Value to use when density is not computable (e.g., too few spatial objects)."); + parameters.Set(SpatialDensityParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); + parameters.Set(SpatialDensityParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); + parameters.Set(SpatialDensityParameter.SampleSize, "500", "Sample size for spatial density estimate."); + parameters.Set(SpatialDensityParameter.DefaultValue, "0", "Value to use when density is not computable (e.g., too few spatial objects)."); yield return new Feature(typeof(FeatureType), FeatureType.GeometryDensity, shapefile.Id.ToString(), shapefile.Id.ToString(), shapefile.Name + " (density)", parameters); // geometry attribute parameters = new FeatureParameterCollection(); - parameters.Add(GeometryAttributeParameter.AttributeColumn, "", "Name of column within geometry from which to draw value."); - parameters.Add(GeometryAttributeParameter.AttributeType, "", "Type of attribute: Nominal or Numeric"); - parameters.Add(GeometryAttributeParameter.DefaultValue, "0", "Value to use when geometry does not overlap a model point."); + parameters.Set(GeometryAttributeParameter.AttributeColumn, "", "Name of column within geometry from which to draw value."); + parameters.Set(GeometryAttributeParameter.AttributeType, "", "Type of attribute: Nominal or Numeric"); + parameters.Set(GeometryAttributeParameter.DefaultValue, "0", "Value to use when geometry does not overlap a model point."); yield return new Feature(typeof(FeatureType), FeatureType.GeometryAttribute, shapefile.Id.ToString(), shapefile.Id.ToString(), shapefile.Name + " (attribute)", parameters); } @@ -128,11 +128,11 @@ public static IEnumerable GetAvailableFeatures(Area area) foreach (string incidentType in Incident.GetUniqueTypes(DateTime.MinValue, DateTime.MaxValue, area).OrderBy(i => i)) { parameters = new FeatureParameterCollection(); - parameters.Add(IncidentDensityParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); - parameters.Add(IncidentDensityParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); - parameters.Add(IncidentDensityParameter.LagCount, "1", "Number of lags of the given offset and duration to use, with offsets being additive."); - parameters.Add(IncidentDensityParameter.SampleSize, "500", "Sample size for incident density estimate."); - parameters.Add(IncidentDensityParameter.DefaultValue, "0", "Value to use when density is not computable (e.g., too few incidents)."); + parameters.Set(IncidentDensityParameter.LagOffset, "31.00:00:00", "Offset prior to training/prediction window. Format: DAYS.HH:MM:SS"); + parameters.Set(IncidentDensityParameter.LagDuration, "30.23:59:59", "Duration of lag window. Format: DAYS.HH:MM:SS"); + parameters.Set(IncidentDensityParameter.LagCount, "1", "Number of lags of the given offset and duration to use, with offsets being additive."); + parameters.Set(IncidentDensityParameter.SampleSize, "500", "Sample size for incident density estimate."); + parameters.Set(IncidentDensityParameter.DefaultValue, "0", "Value to use when density is not computable (e.g., too few incidents)."); yield return new Feature(typeof(FeatureType), FeatureType.IncidentDensity, incidentType, incidentType, "\"" + incidentType + "\" density", parameters); } @@ -370,7 +370,7 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio threads.Clear(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(o => { int core = (int)o; NpgsqlConnection threadConnection = DB.Connection.OpenConnection; @@ -427,7 +427,10 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio NumericFeature distanceFeature = _idNumericFeature[spatialDistanceFeature.Id]; while (reader.Read()) { - FeatureVector vector = pointIdFeatureVector[Convert.ToInt32(reader["points_" + Point.Columns.Id])]; + FeatureVector vector; + if (!pointIdFeatureVector.TryGetValue(Convert.ToInt32(reader["points_" + Point.Columns.Id]), out vector)) // above, we select all points that fall between point_start and point_end. the latter can be one tick short of the next minute, and npgsql rounds up causing points to appear in the reader that we didn't add to the pointIdFeatureVector collection. + continue; + double value = Convert.ToDouble(reader["feature_value"]); // value > threshold shouldn't happen here, since we exluced such objects from consideration above; however, the calculations aren't perfect in postgis, so we check again and reset appropriately @@ -460,13 +463,12 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio threads.Clear(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; NpgsqlCommand command = DB.Connection.NewCommand(null); - for (int j = 0; j + core < spatialDensityFeatures.Count; j += Configuration.ProcessorCount) + for (int j = (int)core; j < spatialDensityFeatures.Count; j += Configuration.ProcessorCount) { - Feature spatialDensityFeature = spatialDensityFeatures[j + core]; + Feature spatialDensityFeature = spatialDensityFeatures[j]; DateTime spatialDensityFeatureStart = start - spatialDensityFeature.Parameters.GetTimeSpanValue(SpatialDensityParameter.LagOffset); DateTime spatialDensityFeatureEnd = spatialDensityFeatureStart + spatialDensityFeature.Parameters.GetTimeSpanValue(SpatialDensityParameter.LagDuration); @@ -526,7 +528,7 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio threads.Clear(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(o => { int core = (int)o; NpgsqlConnection threadConnection = DB.Connection.OpenConnection; @@ -538,7 +540,7 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio NpgsqlCommand cmd = DB.Connection.NewCommand("SELECT " + pointTableName + "." + Point.Columns.Id + " as point_id," + shapefile.GeometryTable + "." + attributeColumn + " as geometry_attribute " + "FROM " + pointTableName + " " + "LEFT JOIN " + shapefile.GeometryTable + " " + // the geometry might not overlap the point, in which case we'll use the default feature value below - "ON st_intersects(" + pointTableName + "." + Point.Columns.Location + "," + shapefile.GeometryTable + "." + ShapefileGeometry.Columns.Geometry + ") " + + "ON st_intersects(" + pointTableName + "." + Point.Columns.Location + "," + shapefile.GeometryTable + "." + ShapefileGeometry.Columns.Geometry + ") " + "WHERE " + pointTableName + "." + Point.Columns.Id + " % " + Configuration.ProcessorCount + " = " + core + " AND " + "(" + pointTableName + "." + Point.Columns.Time + "='-infinity'::timestamp OR " + @@ -622,12 +624,11 @@ protected virtual IEnumerable ExtractFeatureVectors(Predictio threads.Clear(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; - for (int j = 0; j + core < kdeFeatures.Count; j += Configuration.ProcessorCount) + for (int j = (int)core; j < kdeFeatures.Count; j += Configuration.ProcessorCount) { - Feature kdeFeature = kdeFeatures[j + core]; + Feature kdeFeature = kdeFeatures[j]; List kdeInputPoints = new List(); string incident = training ? kdeFeature.TrainingResourceId : kdeFeature.PredictionResourceId; diff --git a/ATT/Models/FeatureParameterCollection.cs b/ATT/Models/FeatureParameterCollection.cs index 4f4cc50..1fe42a9 100644 --- a/ATT/Models/FeatureParameterCollection.cs +++ b/ATT/Models/FeatureParameterCollection.cs @@ -36,17 +36,20 @@ public FeatureParameterCollection() _parameterValueTip = new Dictionary>(); } - public void Add(Enum parameter, string value, string tip) + public void Set(Enum parameter, string value) { - _parameterValueTip.Add(parameter, new Tuple(value, tip)); + if (_parameterValueTip.ContainsKey(parameter)) + _parameterValueTip[parameter] = new Tuple(value, _parameterValueTip[parameter].Item2); + else + _parameterValueTip.Add(parameter, new Tuple(value, "")); } - public void SetValue(Enum parameter, string value) + public void Set(Enum parameter, string value, string tip) { - if (!_parameterValueTip.ContainsKey(parameter)) - throw new KeyNotFoundException("Cannot set missing parameter: " + parameter); - - _parameterValueTip[parameter] = new Tuple(value, _parameterValueTip[parameter].Item2); + if (_parameterValueTip.ContainsKey(parameter)) + _parameterValueTip[parameter] = new Tuple(value, tip); + else + _parameterValueTip.Add(parameter, new Tuple(value, tip)); } public int GetIntegerValue(Enum parameter) diff --git a/ATT/Models/KernelDensityDCM.cs b/ATT/Models/KernelDensityDCM.cs index 0353fde..05f2521 100644 --- a/ATT/Models/KernelDensityDCM.cs +++ b/ATT/Models/KernelDensityDCM.cs @@ -36,8 +36,7 @@ public class KernelDensityDCM : DiscreteChoiceModel { static KernelDensityDCM() { - if (Configuration.RCranMirror != null) - R.InstallPackages(R.CheckForMissingPackages(new string[] { "ks" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); + R.InstallPackages(R.CheckForMissingPackages(new string[] { "ks" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); } public static List GetDensityEstimate(IEnumerable inputPoints, int inputSampleSize, bool binned, float bGridSizeX, float bGridSizeY, IEnumerable evalPoints, bool normalize) @@ -100,7 +99,7 @@ public static List GetDensityEstimate(IEnumerable inputPoi h = Hpi(input.points,pilot=""dscalar""" + (binned ? ",binned=TRUE,bgridsize=" + bGridSizes : "") + @") est = kde(input.points,H=h," + (binned ? "binned=TRUE,bgridsize=" + bGridSizes + "," : "") + @"eval.points=eval.points)$estimate " + (normalize ? "est = (est - min(est)) / (max(est) - min(est))" : "") + @" -write.table(est,file=""" + outputPath.Replace(@"\", @"\\") + @""",row.names=FALSE,col.names=FALSE)", out rOutput, out rError, false); +write.table(est,file=""" + outputPath.Replace(@"\", @"\\") + @""",row.names=FALSE,col.names=FALSE)", false, out rOutput, out rError); } catch (Exception ex) diff --git a/ATT/Models/TimeSliceDCM.cs b/ATT/Models/TimeSliceDCM.cs index 2418f63..feeb646 100644 --- a/ATT/Models/TimeSliceDCM.cs +++ b/ATT/Models/TimeSliceDCM.cs @@ -183,14 +183,10 @@ protected override IEnumerable ExtractFeatureVectors(Predicti IFeatureExtractor externalFeatureExtractor = InitializeExternalFeatureExtractor(typeof(TimeSliceDCM)); for (int i = 0; i < processorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; - - for (long j = firstSlice; j + core <= lastSlice; j += processorCount) + for (long slice = firstSlice + (int)core; slice <= lastSlice; slice += processorCount) { - long slice = j + core; - Console.Out.WriteLine("Processing slice " + (slice - firstSlice + 1) + " of " + (lastSlice - firstSlice + 1)); DateTime sliceStart = new DateTime(slice * _timeSliceTicks); @@ -198,10 +194,10 @@ protected override IEnumerable ExtractFeatureVectors(Predicti DateTime sliceMid = new DateTime((sliceStart.Ticks + sliceEnd.Ticks) / 2L); #region get interval features that are true for all points in the current slice - Dictionary threeHourIntervalFeatureValue = new Dictionary(); + Dictionary threeHourIntervalFeatureValue = new Dictionary(); int startingThreeHourInterval = sliceStart.Hour / 3; // which 3-hour interval does the current slice start in? int threeHourIntervalsTouched = (int)(((sliceEnd.Ticks - sliceStart.Ticks) / ticksPerHour) / 3) + 1; // how many 3-hour intervals does the current slice touch? - int endingThreeHourInterval = startingThreeHourInterval + threeHourIntervalsTouched - 1; // which 3-hour interval does the current slice end in? + int endingThreeHourInterval = startingThreeHourInterval + threeHourIntervalsTouched - 1; // which 3-hour interval does the current slice end in? for (int k = 0; k < threeHourIntervals.Count; ++k) { TimeSliceFeature threeHourInterval = threeHourIntervals[k]; @@ -213,7 +209,7 @@ protected override IEnumerable ExtractFeatureVectors(Predicti if (interval % 8 == k) covered = true; - threeHourIntervalFeatureValue.Add(IdNominalFeature[id], covered.ToString()); + threeHourIntervalFeatureValue.Add(IdNumericFeature[id], covered ? 1 : 0); } } #endregion @@ -235,8 +231,8 @@ protected override IEnumerable ExtractFeatureVectors(Predicti else if ((long)(point.Time.Ticks / _timeSliceTicks) != slice) throw new Exception("Point should not be in slice: " + point); - foreach (LAIR.MachineLearning.NominalFeature feature in threeHourIntervalFeatureValue.Keys) - featureVector.Add(feature, threeHourIntervalFeatureValue[feature]); + foreach (LAIR.MachineLearning.NumericFeature threeHourIntervalFeature in threeHourIntervalFeatureValue.Keys) + featureVector.Add(threeHourIntervalFeature, threeHourIntervalFeatureValue[threeHourIntervalFeature]); double percentThroughPeriod = (slice % _periodTimeSlices) / (double)(_periodTimeSlices - 1); double radians = 2 * Math.PI * percentThroughPeriod; diff --git a/ATT/PointPrediction.cs b/ATT/PointPrediction.cs index 9ddde4e..9078c9f 100644 --- a/ATT/PointPrediction.cs +++ b/ATT/PointPrediction.cs @@ -120,17 +120,16 @@ internal static void Insert(List> valueParameters, Pred Set threads = new Set(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; NpgsqlCommand cmd = DB.Connection.NewCommand(null); StringBuilder cmdText = new StringBuilder(); int pointNum = 0; int pointsPerBatch = 5000; string table = GetTableName(prediction); - for (int j = 0; j + core < valueParameters.Count; j += Configuration.ProcessorCount) + for (int j = (int)core; j < valueParameters.Count; j += Configuration.ProcessorCount) { - Tuple valueParameter = valueParameters[j + core]; + Tuple valueParameter = valueParameters[j]; cmdText.Append((cmdText.Length == 0 ? "INSERT INTO " + table + " (" + Columns.Insert + ") VALUES " : ",") + valueParameter.Item1); if (valueParameter.Item2 != null) @@ -191,17 +190,16 @@ internal static void UpdateThreatScores(List pointPredictions, Set threads = new Set(); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; int pointsPerBatch = 1000; int pointNum = 0; NpgsqlCommand cmd = DB.Connection.NewCommand(""); StringBuilder cmdText = new StringBuilder(); string table = GetTableName(prediction); - for (int j = 0; j + core < pointPredictions.Count; j += Configuration.ProcessorCount) + for (int j = (int)core; j < pointPredictions.Count; j += Configuration.ProcessorCount) { - PointPrediction pointPrediction = pointPredictions[j + core]; + PointPrediction pointPrediction = pointPredictions[j]; string labels, scores; GetLabelsScoresSQL(pointPrediction.IncidentScore, out labels, out scores); diff --git a/ATT/Properties/AssemblyInfo.cs b/ATT/Properties/AssemblyInfo.cs index 43a157c..cfdb6d6 100644 --- a/ATT/Properties/AssemblyInfo.cs +++ b/ATT/Properties/AssemblyInfo.cs @@ -21,12 +21,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Library")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("Asymmetric Threat Tracker Core")] +[assembly: AssemblyDescription("Core library for Asymmetric Threat Tracker")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Library")] -[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyCompany("University of Virginia Predictive Technology Laboratory")] +[assembly: AssemblyProduct("Asymmetric Threat Tracker")] +[assembly: AssemblyCopyright("Copyright © 2013-2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -48,5 +48,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.1.0.0")] +[assembly: AssemblyFileVersion("2.1.0.0")] diff --git a/ATT/Smoothers/MarsSmoother.cs b/ATT/Smoothers/MarsSmoother.cs index c9a587d..a8863f4 100644 --- a/ATT/Smoothers/MarsSmoother.cs +++ b/ATT/Smoothers/MarsSmoother.cs @@ -28,8 +28,7 @@ public class MarsSmoother : Smoother { static MarsSmoother() { - if (Configuration.RCranMirror != null) - R.InstallPackages(R.CheckForMissingPackages(new string[] { "earth" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); + R.InstallPackages(R.CheckForMissingPackages(new string[] { "earth" }), Configuration.RCranMirror, Configuration.RPackageInstallDirectory); } private int _numberOfKnots; diff --git a/ATT/Smoothers/WeightedAverageSmoother.cs b/ATT/Smoothers/WeightedAverageSmoother.cs index e657fdf..06d7ee0 100644 --- a/ATT/Smoothers/WeightedAverageSmoother.cs +++ b/ATT/Smoothers/WeightedAverageSmoother.cs @@ -62,13 +62,12 @@ public override void Apply(Prediction prediction) Set threads = new Set(Configuration.ProcessorCount); for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; List>> threadPointPredictionIncidentScore = new List>>((int)((pointPredictions.Count / (float)Configuration.ProcessorCount) + 1)); - for (int j = 0; j + core < pointPredictions.Count; j += Configuration.ProcessorCount) + for (int j = (int)core; j < pointPredictions.Count; j += Configuration.ProcessorCount) { - PointPrediction pointPrediction = pointPredictions[j + core]; + PointPrediction pointPrediction = pointPredictions[j]; Dictionary neighborInvDist = new Dictionary(); foreach (PointPrediction neighbor in pointPredictions) { diff --git a/ATT/att_config.xml b/ATT/att_config.xml index 05e4461..9d51971 100644 --- a/ATT/att_config.xml +++ b/ATT/att_config.xml @@ -20,6 +20,7 @@ + @@ -43,6 +44,18 @@ + + + + + + + + + + + + diff --git a/AttTest/AttTest.csproj b/AttTest/AttTest.csproj index 0b0ad05..44c5bee 100644 --- a/AttTest/AttTest.csproj +++ b/AttTest/AttTest.csproj @@ -41,6 +41,7 @@ + @@ -48,6 +49,10 @@ + + + + diff --git a/AttTest/Importers/AreaShapefileImporterTest.cs b/AttTest/Importers/AreaShapefileImporterTest.cs new file mode 100644 index 0000000..f9663ec --- /dev/null +++ b/AttTest/Importers/AreaShapefileImporterTest.cs @@ -0,0 +1,61 @@ +using NUnit.Framework; +using PTL.ATT; +using PTL.ATT.Importers; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO.Compression; + +namespace AttTest.Importers +{ + [TestFixture] + public class AreaShapefileImporterTest + { + private static string AreaZipFilePath + { + get { return Path.Combine(Configuration.PostGisShapefileDirectory, "Chicago", "AO", "chicago_city_boundary.zip"); } + } + + private static string UnzippedAreaDirectory + { + get { return Path.Combine(AreaZipFilePath, "_unzipped"); } + } + + [TestFixtureSetUp] + public void SetUp() + { + if (Configuration.Initialized) + Configuration.Reset(null); + else + Configuration.Initialize("att_config.xml", true); + + UnzipTestArea(); + } + + [Test] + public void Test() + { + ImportTestArea(); + Area importedArea1 = Area.GetAll().Last(); + ImportTestArea(); + Area importedArea2 = Area.GetAll().Last(); + Assert.AreEqual(importedArea1.Id, 1); + Assert.AreEqual(importedArea2.Id, 2); + Assert.AreEqual(Area.GetAll().Count, 2); + } + + public static void UnzipTestArea() + { + if (!Directory.Exists(UnzippedAreaDirectory)) + ZipFile.ExtractToDirectory(AreaZipFilePath, UnzippedAreaDirectory); + } + + public static void ImportTestArea() + { + new AreaShapefileImporter("Chicago", Path.Combine(UnzippedAreaDirectory, "chicago_city_boundary.shp"), null, null, -1, -1, null, 1000).Import(); + } + } +} diff --git a/AttTest/Importers/FeatureShapefileImporterTest.cs b/AttTest/Importers/FeatureShapefileImporterTest.cs new file mode 100644 index 0000000..9389c5f --- /dev/null +++ b/AttTest/Importers/FeatureShapefileImporterTest.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; +using PTL.ATT; +using PTL.ATT.Importers; +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AttTest.Importers +{ + [TestFixture] + public class FeatureShapefileImporterTest + { + public static string FeaturesDirectory + { + get { return Path.Combine(Configuration.PostGisShapefileDirectory, "Chicago", "Features"); } + } + + [TestFixtureSetUp] + public void SetUp() + { + if (Configuration.Initialized) + Configuration.Reset(null); + else + Configuration.Initialize("att_config.xml", true); + + UnzipTestFeatures(); + } + + [Test] + public void Test() + { + int featureShapefileCount = ImportTestFeatures(); + Assert.AreEqual(featureShapefileCount, Shapefile.GetAll().Count()); + } + + public static void UnzipTestFeatures() + { + foreach (string featureZipFilePath in Directory.GetFiles(FeaturesDirectory, "*.zip")) + { + string unzippedPath = featureZipFilePath + "_unzipped"; + if (!Directory.Exists(unzippedPath)) + ZipFile.ExtractToDirectory(featureZipFilePath, unzippedPath); + } + } + + public static int ImportTestFeatures() + { + int shapefileCount = 0; + foreach (string distanceShapefilePath in Directory.GetFiles(FeaturesDirectory, "*.shp", SearchOption.AllDirectories)) + { + new FeatureShapefileImporter(Path.GetFileName(distanceShapefilePath), distanceShapefilePath, null, null, -1, -1, null).Import(); + ++shapefileCount; + } + + return shapefileCount; + } + } +} diff --git a/AttTest/Importers/IncidentShapefileImporterTest.cs b/AttTest/Importers/IncidentShapefileImporterTest.cs new file mode 100644 index 0000000..56d1a31 --- /dev/null +++ b/AttTest/Importers/IncidentShapefileImporterTest.cs @@ -0,0 +1,38 @@ +using NUnit.Framework; +using PTL.ATT; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AttTest.Importers +{ + [TestFixture] + public class IncidentShapefileImporterTest + { + [TestFixtureSetUp] + public void SetUp() + { + if (Configuration.Initialized) + Configuration.Reset(null); + else + Configuration.Initialize("att_config.xml", true); + } + + [Test] + public void Test() + { + } + + public static void UnzipTestIncidents() + { + + } + + public static void ImportTestIncidents() + { + + } + } +} diff --git a/AttTest/Importers/XmlImporterTest.cs b/AttTest/Importers/XmlImporterTest.cs new file mode 100644 index 0000000..cdcff54 --- /dev/null +++ b/AttTest/Importers/XmlImporterTest.cs @@ -0,0 +1,78 @@ +using NUnit.Framework; +using PTL.ATT; +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AttTest.Importers +{ + [TestFixture] + public class XmlImporterTest + { + public static string ZippedIncidentsPath + { + get { return Path.Combine(Configuration.IncidentsImportDirectory, "chicago_crimes_december_2012-march_2013.zip"); } + } + + public static string ZippedEventsPath + { + get { return Path.Combine(Configuration.EventsImportDirectory, "building_violations_jan-mar_2013.zip"); } + } + + public static string UnzippedIncidentsDirectory + { + get { return ZippedIncidentsPath + "_unzipped"; } + } + + public static string UnzippedEventsDirectory + { + get { return ZippedEventsPath + "_unzipped"; } + } + + public static string UnzippedIncidentsPath + { + get { return Path.Combine(UnzippedIncidentsDirectory, "chicago_crimes_december_2012-march_2013.xml"); } + } + + public static string UnzippedEventsPath + { + get { return Path.Combine(UnzippedEventsDirectory, "building_violations_jan-mar_2013.xml"); } + } + + [TestFixtureSetUp] + public void SetUp() + { + if (Configuration.Initialized) + Configuration.Reset(null); + else + Configuration.Initialize("att_config.xml", true); + + UnzipTestIncidents(); + } + + [Test] + public void TestIncidentXmlImporter() + { + } + + [Test] + public void TestPointXmlImporter() + { + } + + public static void UnzipTestIncidents() + { + if (!Directory.Exists(UnzippedIncidentsDirectory)) + ZipFile.ExtractToDirectory(ZippedIncidentsPath, UnzippedIncidentsDirectory); + } + + public static void UnzipTestPoints() + { + + } + } +} diff --git a/AttTest/Models/FeatureBasedDcmTest.cs b/AttTest/Models/FeatureBasedDcmTest.cs index 2abe750..2de8d79 100644 --- a/AttTest/Models/FeatureBasedDcmTest.cs +++ b/AttTest/Models/FeatureBasedDcmTest.cs @@ -2,6 +2,7 @@ using PTL.ATT; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading; @@ -15,7 +16,10 @@ public class FeatureBasedDcmTest [TestFixtureSetUp] public void SetUp() { - Configuration.Initialize("att_config.xml", true); + if (Configuration.Initialized) + Configuration.Reset(null); + else + Configuration.Initialize("att_config.xml", true); } [Test] @@ -26,7 +30,6 @@ public void Test() [TestFixtureTearDown] public void TearDown() { - DB.Connection.Dispose(); } } } diff --git a/AttTest/att_config_travis_ci.xml b/AttTest/att_config_travis_ci.xml index 2177efc..9663464 100644 --- a/AttTest/att_config_travis_ci.xml +++ b/AttTest/att_config_travis_ci.xml @@ -16,6 +16,7 @@ /usr/bin/shp2pgsql /usr/bin/pgsql2shp + /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Shapefiles @@ -36,6 +37,18 @@ + + /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Crimes + + + + /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Events + + + + /home/travis/MatthewGerber/asymmetric-threat-tracker/Importers + + /home/travis/MatthewGerber/asymmetric-threat-tracker/Models diff --git a/GUI/AttForm.cs b/GUI/AttForm.cs index 2089114..67bc410 100644 --- a/GUI/AttForm.cs +++ b/GUI/AttForm.cs @@ -34,7 +34,6 @@ using PTL.ATT.GUI.Visualization; using LAIR.ResourceAPIs.PostGIS; using LAIR.Extensions; -using LAIR.Misc; using PTL.ATT.Evaluation; using System.Diagnostics; using PTL.ATT.GUI.Plugins; @@ -45,7 +44,6 @@ using System.Net; using System.Net.Sockets; using System.Net.NetworkInformation; -using Newtonsoft.Json.Linq; using LAIR.ResourceAPIs.PostgreSQL; using PostGIS = LAIR.ResourceAPIs.PostGIS; using PTL.ATT.Importers; @@ -320,7 +318,7 @@ private void AttForm_Load(object sender, EventArgs e) { Splash splash = new Splash(4); bool done = false; - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(o => { Splash s = o as Splash; s.Show(); @@ -421,7 +419,7 @@ private void AttForm_FormClosing(object sender, FormClosingEventArgs e) #region data public void importShapefilesToolStripMenuItem_Click(object sender, EventArgs e) { - Import(Configuration.PostGisShapefileDirectory, + Import(ATT.Configuration.PostGisShapefileDirectory, new CompleteImporterFormDelegate(f => { @@ -445,7 +443,7 @@ public void importShapefilesToolStripMenuItem_Click(object sender, EventArgs e) Shapefile.ShapefileType shapefileType = importerForm.GetValue("type"); ShapefileInfoRetriever shapefileInfoRetriever = new ShapefileInfoRetriever(name, sourceSRID, targetSRID); - string relativePath = RelativizePath(path, Configuration.PostGisShapefileDirectory, PathRelativizationId.ShapefileDirectory); + string relativePath = RelativizePath(path, ATT.Configuration.PostGisShapefileDirectory, PathRelativizationId.ShapefileDirectory); if (shapefileType == Shapefile.ShapefileType.Area) { @@ -458,14 +456,14 @@ public void importShapefilesToolStripMenuItem_Click(object sender, EventArgs e) throw new NotImplementedException("Unrecognized shapefile type: " + shapefileType); }), - Configuration.PostGisShapefileDirectory, + ATT.Configuration.PostGisShapefileDirectory, "Shapefiles (*.shp;*.zip)|*.shp;*.zip", new string[] { "*.shp" }, new ImportCompletionDelegate(() => { RefreshPredictionAreas(); })); } private void importPointfilesToolStripMenuItem_Click(object sender, EventArgs e) { - Import(Configuration.EventsImportDirectory, + Import(ATT.Configuration.EventsImportDirectory, new CompleteImporterFormDelegate(f => { @@ -490,13 +488,13 @@ private void importPointfilesToolStripMenuItem_Click(object sender, EventArgs e) Type[] rowInserterTypes = Assembly.GetAssembly(typeof(XmlImporter.XmlRowInserter)).GetTypes().Where(type => !type.IsAbstract && (type == typeof(XmlImporter.PointfileXmlRowInserter) || type.IsSubclassOf(typeof(XmlImporter.PointfileXmlRowInserter)))).ToArray(); string[] databaseColumns = new string[] { XmlImporter.PointfileXmlRowInserter.Columns.X, XmlImporter.PointfileXmlRowInserter.Columns.Y, XmlImporter.PointfileXmlRowInserter.Columns.Time }; - return CreateXmlImporter(name, path, Configuration.EventsImportDirectory, PathRelativizationId.EventDirectory, sourceURI, rowInserterTypes, databaseColumns, databaseColumnInputColumn => + return CreateXmlImporter(name, path, ATT.Configuration.EventsImportDirectory, PathRelativizationId.EventDirectory, sourceURI, rowInserterTypes, databaseColumns, databaseColumnInputColumn => { return new XmlImporter.PointfileXmlRowInserter(databaseColumnInputColumn, sourceSRID, importArea); }); }), - Configuration.EventsImportDirectory, + ATT.Configuration.EventsImportDirectory, null, null, null); } @@ -551,7 +549,7 @@ private void deleteGeographicDataToolStripMenuItem_Click(object sender, EventArg public void importIncidentsToolStripMenuItem_Click(object sender, EventArgs e) { - Import(Configuration.IncidentsImportDirectory, + Import(ATT.Configuration.IncidentsImportDirectory, new CompleteImporterFormDelegate(f => { @@ -584,7 +582,7 @@ public void importIncidentsToolStripMenuItem_Click(object sender, EventArgs e) Type[] rowInserterTypes = Assembly.GetAssembly(typeof(XmlImporter.XmlRowInserter)).GetTypes().Where(type => !type.IsAbstract && (type == typeof(XmlImporter.IncidentXmlRowInserter) || type.IsSubclassOf(typeof(XmlImporter.IncidentXmlRowInserter)))).ToArray(); string[] databaseColumns = new string[] { Incident.Columns.NativeId, Incident.Columns.Time, Incident.Columns.Type, Incident.Columns.X(importArea), Incident.Columns.Y(importArea) }; - return CreateXmlImporter(name, path, Configuration.IncidentsImportDirectory, PathRelativizationId.IncidentDirectory, sourceURI, rowInserterTypes, databaseColumns, databaseColumnInputColumn => + return CreateXmlImporter(name, path, ATT.Configuration.IncidentsImportDirectory, PathRelativizationId.IncidentDirectory, sourceURI, rowInserterTypes, databaseColumns, databaseColumnInputColumn => { return new XmlImporter.IncidentXmlRowInserter(databaseColumnInputColumn, importArea, hourOffset, sourceSRID); }); @@ -593,13 +591,13 @@ public void importIncidentsToolStripMenuItem_Click(object sender, EventArgs e) { int targetSRID = importArea.Shapefile.SRID; ShapefileInfoRetriever shapefileInfoRetriever = new ShapefileInfoRetriever(name, 0, targetSRID); - return new IncidentShapefileImporter(name, path, RelativizePath(path, Configuration.IncidentsImportDirectory, PathRelativizationId.IncidentDirectory), sourceURI, 0, targetSRID, shapefileInfoRetriever, importArea, new IncidentTableShapefileTableMappingRetriever(), hourOffset); + return new IncidentShapefileImporter(name, path, RelativizePath(path, ATT.Configuration.IncidentsImportDirectory, PathRelativizationId.IncidentDirectory), sourceURI, 0, targetSRID, shapefileInfoRetriever, importArea, new IncidentTableShapefileTableMappingRetriever(), hourOffset); } else throw new NotImplementedException("Unrecognized incident import file extension: " + extension); }), - Configuration.IncidentsImportDirectory, + ATT.Configuration.IncidentsImportDirectory, "Incident files (*.shp;*.xml;*.zip)|*.shp;*.xml;*.zip", new string[] { "*.xml", "*.shp" }, null); @@ -867,7 +865,7 @@ private void manageStoredImportersToolStripMenuItem_Click(object sender, EventAr if (action == ManageImporterAction.Load) { DynamicForm df = new DynamicForm("Select importer source...", DynamicForm.CloseButtons.OkCancel); - df.AddTextBox("Path:", GUI.Configuration.ImportersLoadDirectory, 75, "path", addFileBrowsingButtons: true, fileFilter: "ATT importers|*.attimp", initialBrowsingDirectory: GUI.Configuration.ImportersLoadDirectory); + df.AddTextBox("Path:", ATT.Configuration.ImportersLoadDirectory, 75, "path", addFileBrowsingButtons: true, fileFilter: "ATT importers|*.attimp", initialBrowsingDirectory: ATT.Configuration.ImportersLoadDirectory); if (df.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string path = df.GetValue("path"); @@ -895,11 +893,11 @@ private void manageStoredImportersToolStripMenuItem_Click(object sender, EventAr PathRelativizationId pathRelativizationId = (PathRelativizationId)Enum.Parse(typeof(PathRelativizationId), relativizationId); string relativeTrailingPath = importer.RelativePath.Substring(relativizationIdEnd + 1).Trim(Path.DirectorySeparatorChar); if (pathRelativizationId == PathRelativizationId.EventDirectory) - absolutePath = Path.Combine(Configuration.EventsImportDirectory, relativeTrailingPath); + absolutePath = Path.Combine(ATT.Configuration.EventsImportDirectory, relativeTrailingPath); else if (pathRelativizationId == PathRelativizationId.IncidentDirectory) - absolutePath = Path.Combine(Configuration.IncidentsImportDirectory, relativeTrailingPath); + absolutePath = Path.Combine(ATT.Configuration.IncidentsImportDirectory, relativeTrailingPath); else if (pathRelativizationId == PathRelativizationId.ShapefileDirectory) - absolutePath = Path.Combine(Configuration.PostGisShapefileDirectory, relativeTrailingPath); + absolutePath = Path.Combine(ATT.Configuration.PostGisShapefileDirectory, relativeTrailingPath); else throw new NotImplementedException("Unrecognized path relativization id: " + pathRelativizationId); } @@ -959,7 +957,7 @@ private void manageStoredImportersToolStripMenuItem_Click(object sender, EventAr else if (action == ManageImporterAction.Store) { if (exportDirectory == null) - exportDirectory = LAIR.IO.Directory.PromptForDirectory("Select export directory...", GUI.Configuration.ImportersLoadDirectory); + exportDirectory = LAIR.IO.Directory.PromptForDirectory("Select export directory...", ATT.Configuration.ImportersLoadDirectory); if (Directory.Exists(exportDirectory)) { @@ -1172,11 +1170,14 @@ private void run_Click(object sender, EventArgs e) else { string defaultPredictionName = m.Name + " (" + m.GetType().Name + ")" + (!perIncident.Checked ? " " + m.IncidentTypes.Concatenate("+") : ""); - string predictionName = GetValue.Show("Enter name for prediction" + (perIncident.Checked ? " (per-incident names will be added)" : "") + "...", defaultPredictionName); - if (predictionName == null) - return; - - Run(true, predictionName, null); + DynamicForm f = new DynamicForm("Enter name for prediction" + (perIncident.Checked ? " (per-incident names will be added)" : "") + "...", DynamicForm.CloseButtons.OkCancel); + f.AddTextBox("Prediction name:", defaultPredictionName, -1, "name"); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string predictionName = f.GetValue("name").Trim(); + if (predictionName != "") + Run(true, predictionName, null); + } } } @@ -1435,7 +1436,7 @@ public void displayPredictionToolStripMenuItem_Click(object sender, EventArgs e) double pointDistanceThreshold = 100; List overlays = new List(); - Thread areaT = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread areaT = new Thread(new ParameterizedThreadStart(o => { Area area = o as Area; NpgsqlCommand command = DB.Connection.NewCommand(null); @@ -1458,7 +1459,7 @@ public void displayPredictionToolStripMenuItem_Click(object sender, EventArgs e) string minId = features.Min(f => f.Id); foreach (Feature f in features) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(o => { Feature feature = o as Feature; if (feature.EnumType == typeof(FeatureBasedDCM.FeatureType) && (feature.EnumValue.Equals(FeatureBasedDCM.FeatureType.MinimumDistanceToGeometry) || @@ -1506,16 +1507,26 @@ public void editPredictionNameToolStripMenuItem_Click(object sender, EventArgs e List selectedPredictions = SelectedPredictions; if (selectedPredictions.Count == 1) { - string name = GetValue.Show("New prediction name.", SelectedPrediction.Name); - if (name != null && name.Trim() != "") - selectedPredictions[0].Name = name.Trim(); + DynamicForm f = new DynamicForm("", DynamicForm.CloseButtons.OkCancel); + f.AddTextBox("New prediction name:", SelectedPrediction.Name, -1, "name"); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string name = f.GetValue("name").Trim(); + if (name != "") + selectedPredictions[0].Name = name; + } } else if (selectedPredictions.Count > 1) { - string name = GetValue.Show("Common base name for " + selectedPredictions.Count + " predictions."); - if (name != null && name.Trim() != "") - for (int i = 0; i < selectedPredictions.Count; ++i) - selectedPredictions[i].Name = name.Trim() + "-" + i; + DynamicForm f = new DynamicForm("", DynamicForm.CloseButtons.OkCancel); + f.AddTextBox("Common base name for " + selectedPredictions.Count + " predictions:", null, -1, "name"); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string name = f.GetValue("name").Trim(); + if (name != "") + for (int i = 0; i < selectedPredictions.Count; ++i) + selectedPredictions[i].Name = name.Trim() + "-" + i; + } } else return; @@ -1539,16 +1550,16 @@ private void editPredictionRunToolStripMenuItem_Click(object sender, EventArgs e MessageBox.Show("Select one or more predictions to edit run number for."); else { - string newRunIdStr = GetValue.Show("New run number for " + SelectedPredictions.Count + " prediction(s)."); - if (newRunIdStr == null) - return; - - int newRunId; - if (int.TryParse(newRunIdStr, out newRunId)) + DynamicForm f = new DynamicForm("", DynamicForm.CloseButtons.OkCancel); + f.AddNumericUpdown("New run number for " + SelectedPredictions.Count + " prediction(s):", 1, 0, 1, int.MaxValue, 1, "run"); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + int run = Convert.ToInt32(f.GetValue("run")); foreach (Prediction prediction in SelectedPredictions) - prediction.RunId = newRunId; + prediction.RunId = run; - RefreshPredictions(SelectedPredictions.ToArray()); + RefreshPredictions(SelectedPredictions.ToArray()); + } } } @@ -1717,8 +1728,9 @@ public void comparePredictionsToolStripMenuItem_Click(object sender, EventArgs e } SurveillancePlot comparisonPlot = new SurveillancePlot(comparisonTitle.ToString(), -1, seriesPoints, 500, 500, Plot.Format.JPEG, 2); - List comparisonPlotImages = new List(new TitledImage[] { new TitledImage(comparisonPlot.Image, null) }); - new ImageViewer(comparisonPlotImages, 0).ShowDialog(); + DynamicForm f = new DynamicForm("Result comparison", DynamicForm.CloseButtons.OK); + f.AddPictureBox(comparisonPlot.Image); + f.ShowDialog(); } } } @@ -1754,19 +1766,16 @@ public void aggregateAndEvaluateToolStripMenuItem_Click(object sender, EventArgs MessageBox.Show("Select at least two predictions to run an aggregate evaluation."); else { - List images = new List(); - - string title = "Aggregated"; - if (TraversePredictionTree().Count(n => n.Checked) == 1) - title = TraversePredictionTree().Where(n => n.Checked).First().Text; - try { + string title = "Aggregated"; + if (TraversePredictionTree().Count(n => n.Checked) == 1) + title = TraversePredictionTree().Where(n => n.Checked).First().Text; + Tuple surveillancePlotAndCorrelation = DiscreteChoiceModel.GetAggregateSurveillancePlotAndCorrelation(SelectedPredictions, 500, 500, title, title); - images.Add(new TitledImage(surveillancePlotAndCorrelation.Item1.Image, title)); - ImageViewer viewer = new ImageViewer(images, 0); - viewer.Text = "Correlation between threat and crime count: " + surveillancePlotAndCorrelation.Item2; - viewer.Show(); + DynamicForm f = new DynamicForm(title, DynamicForm.CloseButtons.OK); + f.AddPictureBox(surveillancePlotAndCorrelation.Item1.Image, "Correlation between threat and crime count: " + surveillancePlotAndCorrelation.Item2); + f.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Error rendering aggregate plot: " + ex.Message); } } @@ -1833,12 +1842,11 @@ public void EvaluateSelectedPredictions() Set threads = new Set(PTL.ATT.GUI.Configuration.ProcessorCount); for (int i = 0; i < PTL.ATT.GUI.Configuration.ProcessorCount; ++i) { - Thread t = new Thread(new ParameterizedThreadStart(delegate(object o) + Thread t = new Thread(new ParameterizedThreadStart(core => { - int core = (int)o; - for (int j = 0; j + core < selectedNodes.Count; j += PTL.ATT.GUI.Configuration.ProcessorCount) + for (int j = (int)core; j < selectedNodes.Count; j += PTL.ATT.GUI.Configuration.ProcessorCount) { - TreeNode node = selectedNodes[j + core]; + TreeNode node = selectedNodes[j]; if (node.Tag is PredictionGroup) { PredictionGroup group = node.Tag as PredictionGroup; @@ -1989,7 +1997,6 @@ public void RefreshAssessments() PictureBox plotBox = new PictureBox(); plotBox.Size = plot.Image.Size; plotBox.Image = plot.Image; - plotBox.MouseDoubleClick += new MouseEventHandler(plot_MouseDoubleClick); assessments.AddPlot(plotBox); float correlation = float.NaN; @@ -2002,17 +2009,6 @@ public void RefreshAssessments() toolTip.SetToolTip(plotBox, "Correlation between threat and crime count: " + correlation); } } - - private void plot_MouseDoubleClick(object sender, MouseEventArgs e) - { - List images = new List(); - foreach (Plot plot in threatMap.DisplayedPrediction.AssessmentPlots) - try { images.Add(new TitledImage(plot.Image, null)); } - catch (Exception ex) { MessageBox.Show("Error rendering plot: " + ex.Message); } - - ImageViewer v = new ImageViewer(images, assessments.GetIndexOf(sender as Control)); - v.ShowDialog(); - } #endregion #region notifications @@ -2104,7 +2100,7 @@ private void encryptTextToolStripMenuItem_Click(object sender, EventArgs e) #region help private void resetToolStripMenuItem_Click(object sender, EventArgs e) { - string[] candidateTables = DB.Connection.GetTables().Where(t => t != "spatial_ref_sys").ToArray(); + string[] candidateTables = DB.Tables; if (candidateTables.Length == 0) { MessageBox.Show("It appears as though the ATT system has not yet been initialized. This indicates an error somewhere in the configuration."); @@ -2117,18 +2113,14 @@ private void resetToolStripMenuItem_Click(object sender, EventArgs e) if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Set tablesToKeep = new Set(f.GetValue("keep").Cast().ToArray()); - string tablesToDelete = candidateTables.Where(t => !tablesToKeep.Contains(t)).Concatenate(","); - if (!string.IsNullOrWhiteSpace(tablesToDelete) && MessageBox.Show("This will permanently delete data from the database. Proceed?", "WARNING", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) - { + if (candidateTables.Where(t => !tablesToKeep.Contains(t)).Count() > 0 && MessageBox.Show("This will permanently delete data from the database. Proceed?", "WARNING", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) try { - DB.Connection.ExecuteNonQuery("DROP TABLE " + tablesToDelete + " CASCADE"); - PTL.ATT.Configuration.Reload(true); + ATT.Configuration.Reset(tablesToKeep); _logWriter.Clear(); RefreshAll(); } catch (Exception ex) { Console.Out.WriteLine("Error resetting the ATT system: " + ex.Message); } - } } } diff --git a/GUI/Configuration.cs b/GUI/Configuration.cs index 07438d9..403343e 100644 --- a/GUI/Configuration.cs +++ b/GUI/Configuration.cs @@ -25,7 +25,6 @@ using PTL.ATT.GUI.Properties; using LAIR.Extensions; using System.Windows.Forms; -using LAIR.Misc; using System.Security.Cryptography; using System.Configuration; @@ -33,16 +32,6 @@ namespace PTL.ATT.GUI { public static class Configuration { - #region postgis - private static string _postgisShapefileDirectory; - - public static string PostGisShapefileDirectory - { - get { return Configuration._postgisShapefileDirectory; } - set { Configuration._postgisShapefileDirectory = value; } - } - #endregion - #region logging private static string _logPath; @@ -62,36 +51,6 @@ public static string LoggingEditor #endregion - #region incidents - private static string _incidentsImportDirectory; - - public static string IncidentsImportDirectory - { - get { return Configuration._incidentsImportDirectory; } - set { Configuration._incidentsImportDirectory = value; } - } - #endregion - - #region events - private static string _eventsImportDirectory; - - public static string EventsImportDirectory - { - get { return Configuration._eventsImportDirectory; } - set { Configuration._eventsImportDirectory = value; } - } - #endregion - - #region importers - private static string _importersLoadDirectory; - - public static string ImportersLoadDirectory - { - get { return Configuration._importersLoadDirectory; } - set { Configuration._importersLoadDirectory = value; } - } - #endregion - #region plugins private static Set _pluginTypes; @@ -223,21 +182,9 @@ public static void Initialize(string path) File.WriteAllText(encryptionInitPath, string.Join("-", _encryptionInitialization)); } - XmlParser postgisP = new XmlParser(p.OuterXML("postgis")); - _postgisShapefileDirectory = postgisP.ElementText("shapefile_directory"); - XmlParser loggingP = new XmlParser(p.OuterXML("logging")); - _logPath = Path.Combine(applicationDataDirectory, "log.txt"); _loggingEditor = loggingP.ElementText("editor"); - - XmlParser incidentsP = new XmlParser(p.OuterXML("incidents")); - _incidentsImportDirectory = incidentsP.ElementText("import_directory"); - - XmlParser eventsP = new XmlParser(p.OuterXML("events")); - _eventsImportDirectory = eventsP.ElementText("import_directory"); - - XmlParser importersP = new XmlParser(p.OuterXML("importers")); - _importersLoadDirectory = importersP.ElementText("load_directory"); + _logPath = Path.Combine(applicationDataDirectory, "log.txt"); _pluginTypes = new Set(); XmlParser pluginsP = new XmlParser(p.OuterXML("plugins")); diff --git a/GUI/DynamicForm.cs b/GUI/DynamicForm.cs index f10aa00..7b5fd79 100644 --- a/GUI/DynamicForm.cs +++ b/GUI/DynamicForm.cs @@ -327,6 +327,23 @@ public void AddListBox(string label, Array values, object selected, SelectionMod lb.SelectedIndex = 0; } + public void AddPictureBox(Image image, string toolTipText = null) + { + PictureBox pictureBox = new PictureBox(); + pictureBox.Image = image; + pictureBox.Size = pictureBox.PreferredSize; + + if (toolTipText != null) + toolTip.SetToolTip(pictureBox, toolTipText); + + FlowLayoutPanel p = new FlowLayoutPanel(); + p.FlowDirection = FlowDirection.LeftToRight; + p.Controls.Add(pictureBox); + p.Size = p.PreferredSize; + + _mainPanel.Controls.Add(p); + } + public void AddControl(string label, Control control, Func returnValueFunction, string valueId, string toolTipText = null) { Label l = new Label(); diff --git a/GUI/FeatureBasedDcmOptions.cs b/GUI/FeatureBasedDcmOptions.cs index f7346b3..444f361 100644 --- a/GUI/FeatureBasedDcmOptions.cs +++ b/GUI/FeatureBasedDcmOptions.cs @@ -238,7 +238,7 @@ private void parameterizeFeatureToolStripMenuItem_Click(object sender, EventArgs if (f.ShowDialog() == DialogResult.OK) foreach (Enum parameter in feature.Parameters.OrderBy(p => p)) - feature.Parameters.SetValue(parameter, f.GetValue(parameter.ToString())); + feature.Parameters.Set(parameter, f.GetValue(parameter.ToString())); } private void parameterizeSelectedFeaturesToolStripMenuItem_Click(object sender, EventArgs e) @@ -265,7 +265,7 @@ private void parameterizeSelectedFeaturesToolStripMenuItem_Click(object sender, foreach (Feature feature in Features) foreach (Enum parameter in feature.Parameters.ToArray()) if (parameter.GetType().FullName.EndsWith("+" + enumType) && parameter.ToString() == enumValue) - feature.Parameters.SetValue(parameter, f.GetValue(parameterId)); + feature.Parameters.Set(parameter, f.GetValue(parameterId)); } } diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 8a7c56d..47d7ff3 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -69,10 +69,6 @@ False ..\Libraries\LAIR.MachineLearning.dll - - False - ..\Libraries\LAIR.Misc.dll - False ..\Libraries\LAIR.ResourceAPIs.PostGIS.dll @@ -85,9 +81,6 @@ False ..\Libraries\LAIR.XML.dll - - ..\Libraries\Newtonsoft.Json.dll - False ..\Libraries\Npgsql.dll diff --git a/GUI/Properties/AssemblyInfo.cs b/GUI/Properties/AssemblyInfo.cs index 83bf9c7..5ac16d1 100644 --- a/GUI/Properties/AssemblyInfo.cs +++ b/GUI/Properties/AssemblyInfo.cs @@ -21,12 +21,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("GUI")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("Asymmetric Threat Tracker GUI")] +[assembly: AssemblyDescription("GUI for ATT")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GUI")] -[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyCompany("University of Virginia Predictive Technology Laboratory")] +[assembly: AssemblyProduct("ATT GUI")] +[assembly: AssemblyCopyright("Copyright © 2013-2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -48,5 +48,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/GUI/Visualization/ThreatMap.cs b/GUI/Visualization/ThreatMap.cs index 5298609..063ab97 100644 --- a/GUI/Visualization/ThreatMap.cs +++ b/GUI/Visualization/ThreatMap.cs @@ -27,7 +27,6 @@ using PTL.ATT.Models; using LAIR.Extensions; using PTL.ATT.Evaluation; -using LAIR.Misc; using PostGIS = LAIR.ResourceAPIs.PostGIS; using Npgsql; using System.Drawing.Drawing2D; @@ -42,9 +41,6 @@ namespace PTL.ATT.GUI.Visualization public partial class ThreatMap : Visualizer { #region static members - private static Pen _pen; - private static SolidBrush _brush; - private static PointF ConvertMetersPointToDrawingPoint(PointF pointInMeters, PointF regionBottomLeftInMeters, float pixelsPerMeter, Rectangle drawingRectangle) { float drawingPointX = (pointInMeters.X - regionBottomLeftInMeters.X) * pixelsPerMeter + drawingRectangle.Left; @@ -127,8 +123,6 @@ public ThreatMap() { InitializeComponent(); - _pen = new Pen(BackColor, 1); - _brush = new SolidBrush(BackColor); _zoomIncrement = 0.1f; _clarifyZoomTimer = new System.Windows.Forms.Timer(); _clarifyZoomTimer.Interval = 1000; @@ -272,171 +266,225 @@ private void GetThreatSurfaces(Rectangle bitmapDimensions, bool displayFirstSlic float threatRectanglePixelWidth; GetDrawingParameters(bitmapDimensions, out pixelsPerMeter, out threatRectanglePixelWidth); - Dictionary newSliceThreatSurface = new Dictionary(_sliceIncidentPointScores.Count); + List slices = _sliceIncidentPointScores.Keys.OrderBy(s => s).ToList(); + Dictionary>>> sliceRowColScoreIncident = new Dictionary>>>(slices.Count); + Dictionary newSliceThreatSurface = new Dictionary(slices.Count); + double overallMinScore = double.MaxValue; + double overallMaxScore = double.MinValue; - #region get incident probabilities for each cell - Dictionary>>>> sliceRowColIncidentScores = new Dictionary>>>>(); - foreach (long slice in _sliceIncidentPointScores.Keys) + List threads = new List(Configuration.ProcessorCount); + for (int i = 0; i < Configuration.ProcessorCount; ++i) { - try { newSliceThreatSurface.Add(slice, new Bitmap(bitmapDimensions.Width, bitmapDimensions.Height, PixelFormat.Format16bppRgb565)); } - catch (ArgumentException) - { - Console.Out.WriteLine("Maximum zoom exceeded."); - resetZoom_Click(null, null); - return; - } + Thread t = new Thread(new ParameterizedThreadStart(core => + { + for (int j = (int)core; j < slices.Count; j += Configuration.ProcessorCount) + { + long slice = slices[j]; - sliceRowColIncidentScores.EnsureContainsKey(slice, typeof(Dictionary>>>)); + #region create bitmap for current slice's threat surface + try + { + lock (newSliceThreatSurface) + { + newSliceThreatSurface.Add(slice, new Bitmap(bitmapDimensions.Width, bitmapDimensions.Height, PixelFormat.Format16bppRgb565)); + } + } + catch (ArgumentException) + { + Console.Out.WriteLine("Maximum zoom exceeded. Reset zoom to refresh display."); + return; + } + #endregion - foreach (string incident in _sliceIncidentPointScores[slice].Keys) - if (selectedIncidents.Contains(incident)) - foreach (Tuple pointScore in _sliceIncidentPointScores[slice][incident]) - { - PointF drawingPoint = ConvertMetersPointToDrawingPoint(pointScore.Item1, _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); + #region get incident scores for each row and column of current slice + Dictionary>>> rowColIncidentScores = new Dictionary>>>(); + foreach (string incident in _sliceIncidentPointScores[slice].Keys) + if (selectedIncidents.Contains(incident)) + foreach (Tuple pointScore in _sliceIncidentPointScores[slice][incident]) + { + PointF drawingPoint = ConvertMetersPointToDrawingPoint(pointScore.Item1, _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); - int row, col; - GetThreatRectangleRowColumn(drawingPoint, threatRectanglePixelWidth, out row, out col); + int row, col; + GetThreatRectangleRowColumn(drawingPoint, threatRectanglePixelWidth, out row, out col); - sliceRowColIncidentScores[slice].EnsureContainsKey(row, typeof(Dictionary>>)); - sliceRowColIncidentScores[slice][row].EnsureContainsKey(col, typeof(Dictionary>)); - sliceRowColIncidentScores[slice][row][col].EnsureContainsKey(incident, typeof(List)); - sliceRowColIncidentScores[slice][row][col][incident].Add(pointScore.Item2); - } - } - #endregion + rowColIncidentScores.EnsureContainsKey(row, typeof(Dictionary>>)); + rowColIncidentScores[row].EnsureContainsKey(col, typeof(Dictionary>)); + rowColIncidentScores[row][col].EnsureContainsKey(incident, typeof(List)); + rowColIncidentScores[row][col][incident].Add(pointScore.Item2); + } + #endregion + + #region get score/incident pairs for each cell, tracking min and max scores + Dictionary>> rowColScoreIncident = new Dictionary>>(); + double sliceMinScore = double.MaxValue; + double sliceMaxScore = double.MinValue; + foreach (int row in rowColIncidentScores.Keys) + foreach (int col in rowColIncidentScores[row].Keys) + { + Dictionary> incidentScores = rowColIncidentScores[row][col]; + string mostLikelyIncident = null; + double scoreForMostLikelyIncident = double.MinValue; + foreach (string incident in incidentScores.Keys) + { + double score = incidentScores[incident].Average(); + if (score > scoreForMostLikelyIncident) + { + mostLikelyIncident = incident; + scoreForMostLikelyIncident = score; + } + } - #region get score/color pairs for each cell - Dictionary>>> sliceRowColScoreColor = new Dictionary>>>(); - double minScore = double.MaxValue; - double maxScore = double.MinValue; - foreach (long slice in sliceRowColIncidentScores.Keys) - { - Dictionary>> rowColScoreIncident = new Dictionary>>(); + if (scoreForMostLikelyIncident < sliceMinScore) sliceMinScore = scoreForMostLikelyIncident; + if (scoreForMostLikelyIncident > sliceMaxScore) sliceMaxScore = scoreForMostLikelyIncident; - foreach (int row in sliceRowColIncidentScores[slice].Keys) - foreach (int col in sliceRowColIncidentScores[slice][row].Keys) - { - string mostLikelyIncident = null; - double max = -1; - foreach (string incident in sliceRowColIncidentScores[slice][row][col].Keys) - { - double score = sliceRowColIncidentScores[slice][row][col][incident].Average(); - if (score > max) + rowColScoreIncident.EnsureContainsKey(row, typeof(Dictionary>)); + rowColScoreIncident[row].Add(col, new Tuple(scoreForMostLikelyIncident, mostLikelyIncident)); + } + #endregion + + #region store information from thread + lock (sliceRowColScoreIncident) { - mostLikelyIncident = incident; - max = score; + sliceRowColScoreIncident.Add(slice, rowColScoreIncident); } - } - if (max < minScore) minScore = max; - if (max > maxScore) maxScore = max; + lock (this) + { + if (sliceMinScore < overallMinScore) overallMinScore = sliceMinScore; + } - rowColScoreIncident.EnsureContainsKey(row, typeof(Dictionary>)); - rowColScoreIncident[row].Add(col, new Tuple(max, mostLikelyIncident)); - } + lock (this) + { + if (sliceMaxScore > overallMaxScore) overallMaxScore = sliceMaxScore; + } + #endregion + } + })); - sliceRowColScoreColor.Add(slice, rowColScoreIncident); + t.Start(i); + threads.Add(t); } - #endregion - #region draw threat surface with colors shaded appropriately - double scoreRange = maxScore - minScore; + foreach (Thread t in threads) + t.Join(); + + #region draw threat surfaces + double scoreRange = overallMaxScore - overallMinScore; if (scoreRange == 0) scoreRange = float.Epsilon; - foreach (long slice in sliceRowColScoreColor.Keys) + threads.Clear(); + for (int i = 0; i < Configuration.ProcessorCount; ++i) { - Graphics g = Graphics.FromImage(newSliceThreatSurface[slice]); - g.Clear(BackColor); - - #region threat - foreach (int row in sliceRowColScoreColor[slice].Keys) - foreach (int col in sliceRowColScoreColor[slice][row].Keys) + Thread t = new Thread(new ParameterizedThreadStart(core => { - Tuple scoreIncident = sliceRowColScoreColor[slice][row][col]; - double scaledScore = (scoreIncident.Item1 - minScore) / scoreRange; - double portionBackground = 1 - scaledScore; - Color color = _incidentColor[scoreIncident.Item2]; + using(Pen pen = new Pen(BackColor, 1)) + using(SolidBrush brush = new SolidBrush(BackColor)) + { + for (int j = (int)core; j < slices.Count; j += Configuration.ProcessorCount) + { + long slice = slices[j]; - byte red = (byte)(scaledScore * color.R + portionBackground * BackColor.R); - byte green = (byte)(scaledScore * color.G + portionBackground * BackColor.G); - byte blue = (byte)(scaledScore * color.B + portionBackground * BackColor.B); - _brush.Color = Color.FromArgb(red, green, blue); + Graphics g = Graphics.FromImage(newSliceThreatSurface[slice]); + g.Clear(BackColor); - RectangleF threatSquare = new RectangleF(col * threatRectanglePixelWidth, row * threatRectanglePixelWidth, threatRectanglePixelWidth, threatRectanglePixelWidth); - g.FillRectangle(_brush, threatSquare); + #region threat + foreach (int row in sliceRowColScoreIncident[slice].Keys) + foreach (int col in sliceRowColScoreIncident[slice][row].Keys) + { + Tuple scoreIncident = sliceRowColScoreIncident[slice][row][col]; + double scaledScore = (scoreIncident.Item1 - overallMinScore) / scoreRange; + double percentTransparent = 1 - scaledScore; + Color color = _incidentColor[scoreIncident.Item2]; + + byte red = (byte)(scaledScore * color.R + percentTransparent * BackColor.R); + byte green = (byte)(scaledScore * color.G + percentTransparent * BackColor.G); + byte blue = (byte)(scaledScore * color.B + percentTransparent * BackColor.B); + brush.Color = Color.FromArgb(red, green, blue); + + RectangleF threatSquare = new RectangleF(col * threatRectanglePixelWidth, row * threatRectanglePixelWidth, threatRectanglePixelWidth, threatRectanglePixelWidth); + g.FillRectangle(brush, threatSquare); + + if (sliceSquareThreatType != null) + { + sliceSquareThreatType.EnsureContainsKey(slice, typeof(List>)); + sliceSquareThreatType[slice].Add(new Tuple(threatSquare, scoreIncident.Item1, scoreIncident.Item2)); + } + } + #endregion - if (sliceSquareThreatType != null) - { - sliceSquareThreatType.EnsureContainsKey(slice, typeof(List>)); - sliceSquareThreatType[slice].Add(new Tuple(threatSquare, scoreIncident.Item1, scoreIncident.Item2)); - } - } - #endregion + #region overlays + foreach (Overlay overlay in Overlays) + if (overlay.Displayed) + { + pen.Color = overlay.Color; + brush.Color = overlay.Color; + foreach (List points in overlay.Points) + if (points.Count == 1) + { + PointF drawingPoint = ConvertMetersPointToDrawingPoint(points[0], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); + RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); + g.FillEllipse(brush, circle); + g.DrawEllipse(pen, circle); + } + else + for (int p = 1; p < points.Count; ++p) + g.DrawLine(pen, ConvertMetersPointToDrawingPoint(points[p - 1], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions), ConvertMetersPointToDrawingPoint(points[p], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions)); + } + #endregion - #region overlays - foreach (Overlay overlay in Overlays) - if (overlay.Displayed) - { - _pen.Color = overlay.Color; - _brush.Color = overlay.Color; - foreach (List points in overlay.Points) - if (points.Count == 1) - { - PointF drawingPoint = ConvertMetersPointToDrawingPoint(points[0], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); - RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); - g.FillEllipse(_brush, circle); - g.DrawEllipse(_pen, circle); - } - else - for (int i = 1; i < points.Count; ++i) - g.DrawLine(_pen, ConvertMetersPointToDrawingPoint(points[i - 1], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions), ConvertMetersPointToDrawingPoint(points[i], _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions)); - } - #endregion + #region true incidents + Set selectedTrueIncidentOverlays = new Set(incidentTypeCheckBoxes.Controls.Cast().Where(c => c.CheckState == CheckState.Checked).Select(c => c.Text).ToArray()); + DateTime sliceStart = DisplayedPrediction.PredictionStartTime; + DateTime sliceEnd = DisplayedPrediction.PredictionEndTime; + if (slice != -1) + { + if (!(DisplayedPrediction.Model is TimeSliceDCM)) + throw new Exception("Expected TimeSliceDCM since slice != 1"); - #region true incidents - Set selectedTrueIncidentOverlays = new Set(incidentTypeCheckBoxes.Controls.Cast().Where(c => c.CheckState == CheckState.Checked).Select(c => c.Text).ToArray()); - DateTime sliceStart = DisplayedPrediction.PredictionStartTime; - DateTime sliceEnd = DisplayedPrediction.PredictionEndTime; - if (slice != -1) - { - if (!(DisplayedPrediction.Model is TimeSliceDCM)) - throw new Exception("Expected TimeSliceDCM since slice != 1"); + long sliceTicks = (DisplayedPrediction.Model as TimeSliceDCM).TimeSliceTicks; + sliceStart = new DateTime(slice * sliceTicks); + sliceEnd = sliceStart + new TimeSpan(sliceTicks); + } - long sliceTicks = (DisplayedPrediction.Model as TimeSliceDCM).TimeSliceTicks; - sliceStart = new DateTime(slice * sliceTicks); - sliceEnd = sliceStart + new TimeSpan(sliceTicks); - } + foreach (string trueIncidentOverlay in selectedTrueIncidentOverlays) + { + brush.Color = _incidentColor[trueIncidentOverlay]; + pen.Color = Color.Black; + foreach (Incident incident in Incident.Get(sliceStart, sliceEnd, DisplayedPrediction.PredictionArea, trueIncidentOverlay)) + { + PointF drawingPoint = ConvertMetersPointToDrawingPoint(new PointF((float)incident.Location.X, (float)incident.Location.Y), _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); + RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); + g.FillEllipse(brush, circle); + g.DrawEllipse(pen, circle); + } + } + #endregion - foreach (string trueIncidentOverlay in selectedTrueIncidentOverlays) - { - _brush.Color = _incidentColor[trueIncidentOverlay]; - _pen.Color = Color.Black; - foreach (Incident incident in Incident.Get(sliceStart, sliceEnd, DisplayedPrediction.PredictionArea, trueIncidentOverlay)) - { - PointF drawingPoint = ConvertMetersPointToDrawingPoint(new PointF((float)incident.Location.X, (float)incident.Location.Y), _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); - RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); - g.FillEllipse(_brush, circle); - g.DrawEllipse(_pen, circle); - } - } - #endregion + #region prediction points + if (_displayPredictionPoints) + { + brush.Color = _predictionPointColor; + pen.Color = Color.Black; + foreach (Point p in DisplayedPrediction.Points) + { + PointF drawingPoint = ConvertMetersPointToDrawingPoint(new PointF((float)p.Location.X, (float)p.Location.Y), _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); + RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); + g.FillEllipse(brush, circle); + g.DrawEllipse(pen, circle); + } + } + #endregion + } + } + })); - #region prediction points - if (_displayPredictionPoints) - { - _brush.Color = _predictionPointColor; - _pen.Color = Color.Black; - foreach (Point p in DisplayedPrediction.Points) - { - PointF drawingPoint = ConvertMetersPointToDrawingPoint(new PointF((float)p.Location.X, (float)p.Location.Y), _regionBottomLeftInMeters, pixelsPerMeter, bitmapDimensions); - RectangleF circle = GetCircleBoundingBox(drawingPoint, _pointDrawingDiameter); - g.FillEllipse(_brush, circle); - g.DrawEllipse(_pen, circle); - } - } - #endregion + t.Start(i); + threads.Add(t); } + + foreach (Thread t in threads) + t.Join(); #endregion if (_sliceThreatSurface != null) @@ -497,11 +545,13 @@ protected override void OnPaint(PaintEventArgs e) e.Graphics.DrawImage(CurrentThreatSurface, e.ClipRectangle, sourceRectangle, GraphicsUnit.Pixel); + + if (_highlightedThreatRectangle != Rectangle.Empty && e.ClipRectangle.IntersectsWith(_highlightedThreatRectangle)) - { - _pen.Color = Color.Yellow; - e.Graphics.DrawRectangle(_pen, _highlightedThreatRectangle); - } + using (Pen pen = new Pen(Color.Yellow, 1)) + { + e.Graphics.DrawRectangle(pen, _highlightedThreatRectangle); + } } #region mouse events diff --git a/GUI/gui_config.xml b/GUI/gui_config.xml index 3db3184..27327b9 100644 --- a/GUI/gui_config.xml +++ b/GUI/gui_config.xml @@ -6,26 +6,10 @@ - - - - notepad.exe - - - - - - - - - - - - diff --git a/GuiTest/AttFormTest.cs b/GuiTest/AttFormTest.cs index e886fe2..94b6c6f 100644 --- a/GuiTest/AttFormTest.cs +++ b/GuiTest/AttFormTest.cs @@ -43,7 +43,6 @@ public void Test() [TestFixtureTearDown] public void TearDown() { - DB.Connection.Dispose(); } } } diff --git a/GuiTest/gui_config_travis_ci.xml b/GuiTest/gui_config_travis_ci.xml index db0e6a9..fb47e22 100644 --- a/GuiTest/gui_config_travis_ci.xml +++ b/GuiTest/gui_config_travis_ci.xml @@ -5,27 +5,11 @@ /home/travis/MatthewGerber/asymmetric-threat-tracker/ApplicationData - - - /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Shapefiles - /usr/bin/emacs - - /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Crimes - - - - /home/travis/MatthewGerber/asymmetric-threat-tracker/Data/Events - - - - /home/travis/MatthewGerber/asymmetric-threat-tracker/Importers - - diff --git a/Installer/Installer.isl b/Installer/Installer.isl index e46b1a3..587dd47 100644 --- a/Installer/Installer.isl +++ b/Installer/Installer.isl @@ -1923,28 +1923,28 @@ ISBuildSourcePath ISAttributes ISComponentSubFolder_ - att_config.xmlISX_DEFAULTCOMPONENTATT_CO~1.XML|att_config.xml01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\ATT\att_config.xml1 - building_violations_jan_mar_ISX_DEFAULTCOMPONENT3BUILDI~1.ZIP|building_violations_jan-mar_2013.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Events\building_violations_jan-mar_2013.zip1 - chicago.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago.attimp01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago.attimp1 - chicago_bicycle_racks.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Bicycle_Racks.attimp01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Bicycle_Racks.attimp1 - chicago_bike_racks.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_bike_racks.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_bike_racks.zip1 - chicago_city_boundary.zipISX_DEFAULTCOMPONENT6CHICAG~1.ZIP|chicago_city_boundary.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\AO\chicago_city_boundary.zip1 - chicago_crime_dec_2012_to_maISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Crime_Dec_2012_to_Mar_2013.attimp01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Crime_Dec_2012_to_Mar_2013.attimp1 - chicago_crimes_december_2012ISX_DEFAULTCOMPONENT2CHICAG~1.ZIP|chicago_crimes_december_2012-march_2013.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Crimes\chicago_crimes_december_2012-march_2013.zip1 - chicago_crimes_simple_formatISX_DEFAULTCOMPONENT2CHICAG~1.XML|chicago_crimes_simple_format_sample.xml01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Crimes\chicago_crimes_simple_format_sample.xml1 - chicago_major_streets.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Major_Streets.attimp01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Major_Streets.attimp1 - chicago_major_streets.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_major_streets.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_major_streets.zip1 - chicago_police_stations.attiISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Police_Stations.attimp01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Police_Stations.attimp1 - chicago_police_stations.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_police_stations.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_police_stations.zip1 + att_config.xmlISX_DEFAULTCOMPONENTATT_CO~1.XML|att_config.xml01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\ATT\att_config.xml1 + building_violations_jan_mar_ISX_DEFAULTCOMPONENT3BUILDI~1.ZIP|building_violations_jan-mar_2013.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Events\building_violations_jan-mar_2013.zip1 + chicago.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago.attimp01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago.attimp1 + chicago_bicycle_racks.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Bicycle_Racks.attimp01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Bicycle_Racks.attimp1 + chicago_bike_racks.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_bike_racks.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_bike_racks.zip1 + chicago_city_boundary.zipISX_DEFAULTCOMPONENT6CHICAG~1.ZIP|chicago_city_boundary.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\AO\chicago_city_boundary.zip1 + chicago_crime_dec_2012_to_maISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Crime_Dec_2012_to_Mar_2013.attimp01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Crime_Dec_2012_to_Mar_2013.attimp1 + chicago_crimes_december_2012ISX_DEFAULTCOMPONENT2CHICAG~1.ZIP|chicago_crimes_december_2012-march_2013.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Crimes\chicago_crimes_december_2012-march_2013.zip1 + chicago_crimes_simple_formatISX_DEFAULTCOMPONENT2CHICAG~1.XML|chicago_crimes_simple_format_sample.xml01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Crimes\chicago_crimes_simple_format_sample.xml1 + chicago_major_streets.attimpISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Major_Streets.attimp01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Major_Streets.attimp1 + chicago_major_streets.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_major_streets.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_major_streets.zip1 + chicago_police_stations.attiISX_DEFAULTCOMPONENT12CHICAG~1.ATT|Chicago_Police_Stations.attimp01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Importers\Chicago_Police_Stations.attimp1 + chicago_police_stations.zipISX_DEFAULTCOMPONENT7CHICAG~1.ZIP|chicago_police_stations.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Chicago\Features\chicago_police_stations.zip1 gui.primary_outputGUI.Primary_outputGUI.Primary output01<GUI>|Built3 - gui_config.xmlISX_DEFAULTCOMPONENTGUI_CO~1.XML|gui_config.xml01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\GUI\gui_config.xml1 - kabol_hydro_aquedctl.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_hydro_aquedctl.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_hydro_aquedctl.zip1 - kabol_hydro_daml.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_hydro_daml.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_hydro_daml.zip1 - kabol_trans_roadl.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_trans_roadl.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_trans_roadl.zip1 - kabul_city_boundary.zipISX_DEFAULTCOMPONENT10KABUL_~1.ZIP|kabul_city_boundary.zip01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\AO\kabul_city_boundary.zip1 - license.txtISX_DEFAULTCOMPONENT9LICENSE.txt01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\LICENSE.txt1 - notice.txtISX_DEFAULTCOMPONENT9NOTICE.txt01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\NOTICE.txt1 - readme.txtISX_DEFAULTCOMPONENTREADME.txt01C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker\GUI\Config\README.txt1 + gui_config.xmlISX_DEFAULTCOMPONENTGUI_CO~1.XML|gui_config.xml01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\GUI\gui_config.xml1 + kabol_hydro_aquedctl.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_hydro_aquedctl.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_hydro_aquedctl.zip1 + kabol_hydro_daml.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_hydro_daml.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_hydro_daml.zip1 + kabol_trans_roadl.zipISX_DEFAULTCOMPONENT11KABOL_~1.ZIP|kabol_trans_roadl.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\Features\kabol_trans_roadl.zip1 + kabul_city_boundary.zipISX_DEFAULTCOMPONENT10KABUL_~1.ZIP|kabul_city_boundary.zip01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\Data\Shapefiles\Kabul\AO\kabul_city_boundary.zip1 + license.txtISX_DEFAULTCOMPONENT9LICENSE.txt01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\LICENSE.txt1 + notice.txtISX_DEFAULTCOMPONENT9NOTICE.txt01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\NOTICE.txt1 + readme.txtISX_DEFAULTCOMPONENTREADME.txt01C:\Users\msg8u\Documents\GitHub\asymmetric-threat-tracker\GUI\Config\README.txt1 @@ -2690,7 +2690,7 @@ OrderISSetupLocationISReleaseFlags -
_1C35338C_ABD5_46B8_95D3_2ED89AC8618E_Microsoft .NET Framework 4.5 Full.prq1 + _1C35338C_ABD5_46B8_95D3_2ED89AC8618E_Microsoft .NET Framework 4.5 Full.prq2
@@ -4457,7 +4457,7 @@ UwBpAG4AZwBsAGUASQBtAGEAZwBlAAEARQB4AHAAcgBlAHMAcwA=
PROGMSG_IIS_ROLLBACKWEBSERVICEEXTENSIONS##IDS_PROGMSG_IIS_ROLLBACKWEBSERVICEEXTENSIONS## ProductCode{55543AF0-BB2E-4BC0-A41E-3370CA7C8F2C} ProductNameAsymmetric Threat Tracker - ProductVersion2.0.0 + ProductVersion2.1.0 ProgressType0install ProgressType1Installing ProgressType2installed diff --git a/Installer/Installer.isproj b/Installer/Installer.isproj index 0f4b724..07f59e3 100644 --- a/Installer/Installer.isproj +++ b/Installer/Installer.isproj @@ -1,5 +1,5 @@ - + Express diff --git a/LICENSE.txt b/LICENSE.txt index 75b5248..7b9703d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2014 The Rector & Visitors of the University of Virginia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Libraries/FeatureSelector.exe b/Libraries/FeatureSelector.exe index 6682018..f0bb27b 100644 Binary files a/Libraries/FeatureSelector.exe and b/Libraries/FeatureSelector.exe differ diff --git a/Libraries/FeatureSelector.xml b/Libraries/FeatureSelector.xml index 24605de..39e76f6 100644 --- a/Libraries/FeatureSelector.xml +++ b/Libraries/FeatureSelector.xml @@ -4,109 +4,162 @@ FeatureSelector - + - Abstract wrapper for subset selection + Specifies the cross-validation setup - + - Initializes this wrapper with various things + Constructor + + + + + Initializes options - ID of subset evaluation - Features to evaluate Options and their values - + - Initializes subclasses with options + Initializes options - Options to initialize with + Options and their values + Movement of training instances if randomizing or null if no randomization is performed - + - Sets the gain for a feature + Modifies the validation scorer - called immediately before subsets are evaluated - Feature to set gain for - Gain of feature + Start number of validation instances + Length of validation instances + Scorer to use - + - Gets the gain of a feature + Cleans up any resources created/held by this validator - Feature to get gain for - Feature gain - + - Gets whether or not this wrapper contains a given feature (group) + Gets the number of folds to use (default: 1, i.e., no cross-validation) - Feature (group) to check for - True if feature (group) is contained, false otherwise - + - Gets predicted labels and their scores + Gets the block sizes for the instances - Training vectors - Validation vectors - Feature number groups - Predicted labels - Prediction scores - + - Cleans up after subset training and validation is complete + CrossFoldValidator options - + - Gets the ID of this subset + Seed value to use for random number generator that randomizes instance blocks. ([int.MinValue,int.MaxValue], default: picked by Random() constructor) - ID - + - Gets enumerator over feature vectors, where each dimension in the vector is the feature's value for an instance + Path to file that defines the instance block sizes. (optional) + + + + + Number of folds to validate. ([1,int.MaxValue], default: 10) + + + + + Whether or not to randomize training instances before performing cross-validation. This is essential in situations where instance features or class labels are somehow dependent on the instances' positions in the training instance file. The word "blocks" is used due to the capability of treating groups of instances as a single unit; however, unless InstanceBlocksPath is defined, each training instance is treated as its own block. (true/false, default: false) + + + + + Filters features using cosine similarity + + + + + Performs feature filtering + + + + + Initializes this filter + + + + + + Initializes this filter + + + + + + Filters a set of features Feature vectors Total number of instances Feature number group mapping - Mapping from feature ids to instance numbers to feature values + Features to remove - + - Gets option configuration for evaluating interaction features + Filters features - - - + + - New options + + - + - Gets the ID + Filters a set of features + Feature vectors + Total number of instances + Feature number group mapping + Features removed by previous filters in the chain + Features to remove - + - Gets ordered list of features + Sets the next filter in the filter chain - + - Gets the newest feature added to the current wrapper + Gets the wrapper type - + - Gets or sets the gain of the newest feature added to the current wrapper + Initializes options + - + - Gets or sets the score + Filters features + + Feature vectors + Total number of instances + Feature number group mapping + Features already removed + Features numbers to remove + + + + Options + + + + + Threshold to use when filtering features. ([0,1], default: 0.95) @@ -223,194 +276,240 @@ Option to get value for Value for option - + - Filters features using cosine similarity + Scores predictions for accuracy - + - Performs feature filtering + Abstract base class for all scorers - + - Initializes this filter + Constructor - - + - Initializes this filter + Initializes this scorer - + Training instance comments + Validation instance comments + Option values - + - Filters a set of features + Initializes options - Feature vectors - Total number of instances - Feature number group mapping - Features to remove + Options and their values - + - Filters features + Gets score for predicted labels - - - - - + Start of instance range + End of instance range + Predicted labels + Prediction scores + True labels + Other information about the scoring operation that should be logged + Score of predicted labels given true labels - + - Filters a set of features + Gets the size of the block that starts at a given instance - Feature vectors - Total number of instances - Feature number group mapping - Features removed by previous filters in the chain - Features to remove + Number of instance on which the block starts + Size of block - + - Sets the next filter in the filter chain + Gets or sets the training instance comments - + - Gets the wrapper type + Gets or sets the block sizes for the validation instances that are being scored. This will only be non-null + when doing cross-validation, as that is the only place that block sizes are applicable. - + + + Gets or sets the validation instance comments + + + + + Initializes the options for this scorer + + + + + + Gets accuracy score for predictions + + Start of instance range + End of instance range + Predicted labels + Prediction scores (not used) + True labels + Extra information to log (output) + Accuracy score + + + + Scores predictions with area under surveillance plot + + + Initializes options - + - Filters features + Gets surveillance score - Feature vectors - Total number of instances - Feature number group mapping - Features already removed - Features numbers to remove + Start of instance range + End of instance range + + + + + - + Options - + - Threshold to use when filtering features. ([0,1], default: 0.95) + A space-separated list of classes to ignore when computing the surveillance plot. (optional) - + - Scores predictions with area under surveillance plot + Performs feature selection using SvmLight - + + + Wrapper for classifiers such as SvmLight and LibLinear, which use separate training and classification + executables. This also assumes that all instance files have lines in the following format: + + label feature1:value1 feature2:value2 ... featureN:valueN + + The one-based feature numbers are sorted ascendingly left to right. + + + + + Abstract wrapper for subset selection + + + + + Initializes this wrapper with various things + + ID of subset evaluation + Features to evaluate + Options and their values + + - Abstract base class for all scorers + Initializes subclasses with options + Options to initialize with - + - Constructor + Sets the gain for a feature + Feature to set gain for + Gain of feature - + - Initializes this scorer + Gets the gain of a feature - Training instance comments - Validation instance comments - Option values + Feature to get gain for + Feature gain - + - Initializes options + Gets whether or not this wrapper contains a given feature (group) - Options and their values + Feature (group) to check for + True if feature (group) is contained, false otherwise - + - Gets score for predicted labels + Gets predicted labels and their scores - Start of instance range - End of instance range + Training vectors + Validation vectors + Feature number groups Predicted labels Prediction scores - True labels - Other information about the scoring operation that should be logged - Score of predicted labels given true labels - + - Gets the size of the block that starts at a given instance + Cleans up after subset training and validation is complete - Number of instance on which the block starts - Size of block - + - Gets or sets the training instance comments + Gets the ID of this subset + ID - + - Gets or sets the block sizes for the validation instances that are being scored. This will only be non-null - when doing cross-validation, as that is the only place that block sizes are applicable. + Gets enumerator over feature vectors, where each dimension in the vector is the feature's value for an instance + Feature vectors + Total number of instances + Feature number group mapping + Mapping from feature ids to instance numbers to feature values - + - Gets or sets the validation instance comments + Gets option configuration for evaluating interaction features + + + + + New options - + - Initializes options + Gets the ID - - + - Gets surveillance score + Gets ordered list of features - Start of instance range - End of instance range - - - - - - + - Options + Gets the newest feature added to the current wrapper - + - A space-separated list of classes to ignore when computing the surveillance plot. (optional) + Gets or sets the gain of the newest feature added to the current wrapper - - - Wrapper for classifiers such as SvmLight and LibLinear, which use separate training and classification - executables. This also assumes that all instance files have lines in the following format: - - label feature1:value1 feature2:value2 ... featureN:valueN - - The one-based feature numbers are sorted ascendingly left to right. - + + + Gets or sets the score + @@ -528,6 +627,62 @@ Whether or not to include zero-vectors in the validation data. (true/false, default: true) + + + Constructor + + + + + Initializes this wrapper with options + + Options and their values + + + + Gets predicted labels and their scores + + Training vectors + Validation vectors + Feature number groups + Predicted labels + Prediction scores + + + + Gets the training process arguments. + + + + + Gets the validation process arguments + + + + + SvmLightWrapper options + + + + + Tradeoff between training error and margin. ([float.MinValue, float.MaxValue], default: [avg. x*x]^-1) + + + + + Cost factor, by which training errors on positive examples outweigh errors on negative examples. ([float.MinValue, float.MaxValue], default: 1) + + + + + Fraction of unlabeled exapmles to be classified into the positive class. ([0, 1], default: ratio in labeled data) + + + + + Size of cache for kernel evaluations in MB. ([5, int.MaxValue], default: 40) + + Performs feature selection using LibLinear @@ -683,14 +838,107 @@ -w13 option in LibLinear training. ([float.MinValue, float.MaxValue], default: 1) - + + + -w14 option in LibLinear training. ([float.MinValue, float.MaxValue], default: 1) + + + + + -w15 option in LibLinear training. ([float.MinValue, float.MaxValue], default: 1) + + + + + Treats each validation instance independently. Scores f-measure. Tunes threshold. + + + + + Gets the best confusion matrix and score + + Matrixes to test + Labels to compute f-measure with + Whether or not to macro-average f-measures + Best confusion matrix (output) + Best score (output) + + + + Constructor + + + + + Initializes options + + Options and their values + + + + Scores predictions + + Start of instance range + End of instance range + Predicted labels + Prediction scores + True labels + Miscellaneous information to log + Score of predicted labels given true labels + + + + Gets threshold matrixes + + Thresholded matrixes + + + + Adds a true/predicted label pair to thresholded prediction matrixes, using the no-judgment class if needed. + + Predicted label + Prediction score + True label + Matrixes to add labels to + + + + Gets labels used for f-measure + + + + + Options + + + + + Whether or not to do block scoring during cross-validation. In block scoring, a block (or group) of instances is classified and the highest scoring instance is selected for scoring (other instances are ignored). This only applies to cross-validation setups in which InstanceBlocksPath is supplied to the cross-validator. (true/false, default: false) + + + + + Path to file that lists all possible labels output by the classifier. (mandatory) + + + + + Threshold increment when doing threshold tuning. ((0, float.MaxValue], default: 0.01) + + + + + Maximum threshold when doing threshold tuning. ([float.MinValue, float.MaxValue], default: 1) + + + - -w14 option in LibLinear training. ([float.MinValue, float.MaxValue], default: 1) + Minimum threshold when doing threshold tuning. ([float.MinValue, float.MaxValue], default: 0) - + - -w15 option in LibLinear training. ([float.MinValue, float.MaxValue], default: 1) + Whether or not to use macro-averaging for multiple classes. (true/false, default: false) @@ -1007,77 +1255,6 @@ Type name of the classification wrapper to use. (mandatory) - - - Specifies the cross-validation setup - - - - - Constructor - - - - - Initializes options - - Options and their values - - - - Initializes options - - Options and their values - Movement of training instances if randomizing or null if no randomization is performed - - - - Modifies the validation scorer - called immediately before subsets are evaluated - - Start number of validation instances - Length of validation instances - Scorer to use - - - - Cleans up any resources created/held by this validator - - - - - Gets the number of folds to use (default: 1, i.e., no cross-validation) - - - - - Gets the block sizes for the instances - - - - - CrossFoldValidator options - - - - - Seed value to use for random number generator that randomizes instance blocks. ([int.MinValue,int.MaxValue], default: picked by Random() constructor) - - - - - Path to file that defines the instance block sizes. (optional) - - - - - Number of folds to validate. ([1,int.MaxValue], default: 10) - - - - - Whether or not to randomize training instances before performing cross-validation. This is essential in situations where instance features or class labels are somehow dependent on the instances' positions in the training instance file. The word "blocks" is used due to the capability of treating groups of instances as a single unit; however, unless InstanceBlocksPath is defined, each training instance is treated as its own block. (true/false, default: false) - - Performs feature selection using SvmPerf @@ -1124,182 +1301,5 @@ Tradeoff between training error and margin (-c in SvmPerf training). ([float.MinValue, float.MaxValue], default: 0.01) - - - Treats each validation instance independently. Scores f-measure. Tunes threshold. - - - - - Gets the best confusion matrix and score - - Matrixes to test - Labels to compute f-measure with - Whether or not to macro-average f-measures - Best confusion matrix (output) - Best score (output) - - - - Constructor - - - - - Initializes options - - Options and their values - - - - Scores predictions - - Start of instance range - End of instance range - Predicted labels - Prediction scores - True labels - Miscellaneous information to log - Score of predicted labels given true labels - - - - Gets threshold matrixes - - Thresholded matrixes - - - - Adds a true/predicted label pair to thresholded prediction matrixes, using the no-judgment class if needed. - - Predicted label - Prediction score - True label - Matrixes to add labels to - - - - Gets labels used for f-measure - - - - - Options - - - - - Whether or not to do block scoring during cross-validation. In block scoring, a block (or group) of instances is classified and the highest scoring instance is selected for scoring (other instances are ignored). This only applies to cross-validation setups in which InstanceBlocksPath is supplied to the cross-validator. (true/false, default: false) - - - - - Path to file that lists all possible labels output by the classifier. (mandatory) - - - - - Threshold increment when doing threshold tuning. ((0, float.MaxValue], default: 0.01) - - - - - Maximum threshold when doing threshold tuning. ([float.MinValue, float.MaxValue], default: 1) - - - - - Minimum threshold when doing threshold tuning. ([float.MinValue, float.MaxValue], default: 0) - - - - - Whether or not to use macro-averaging for multiple classes. (true/false, default: false) - - - - - Scores predictions for accuracy - - - - - Initializes the options for this scorer - - - - - - Gets accuracy score for predictions - - Start of instance range - End of instance range - Predicted labels - Prediction scores (not used) - True labels - Extra information to log (output) - Accuracy score - - - - Performs feature selection using SvmLight - - - - - Constructor - - - - - Initializes this wrapper with options - - Options and their values - - - - Gets predicted labels and their scores - - Training vectors - Validation vectors - Feature number groups - Predicted labels - Prediction scores - - - - Gets the training process arguments. - - - - - Gets the validation process arguments - - - - - SvmLightWrapper options - - - - - Tradeoff between training error and margin. ([float.MinValue, float.MaxValue], default: [avg. x*x]^-1) - - - - - Cost factor, by which training errors on positive examples outweigh errors on negative examples. ([float.MinValue, float.MaxValue], default: 1) - - - - - Fraction of unlabeled exapmles to be classified into the positive class. ([0, 1], default: ratio in labeled data) - - - - - Size of cache for kernel evaluations in MB. ([5, int.MaxValue], default: 40) - - diff --git a/Libraries/LAIR.Collections.dll b/Libraries/LAIR.Collections.dll index 76083f4..b9bf3d5 100644 Binary files a/Libraries/LAIR.Collections.dll and b/Libraries/LAIR.Collections.dll differ diff --git a/Libraries/LAIR.Collections.xml b/Libraries/LAIR.Collections.xml index 2ad7ba0..2a1cac8 100644 --- a/Libraries/LAIR.Collections.xml +++ b/Libraries/LAIR.Collections.xml @@ -4,6 +4,112 @@ LAIR.Collections + + + Represents an indexed item + + + + + Constructor + + Index of item + + + + Gets the index for an item + + + + + Represents an indexable set + + Type of items to store + Type of index to use on items + + + + Constructor + + Initial capacity + + + + Adds an item + + Item to add + True if item was new + + + + Adds a range of items + + Items to add + + + + Gets item by index + + Index of item to fetch + Item + + + + Tries to get an item for an index + + Index + Item + True if item was found and false otherwise + + + + Removes an item from this set + + Item to remove + + + + Gets enumerator over items + + + + + + Gets enumerator over items + + + + + + Gets the item for an index + + Index of item to get + Item + + + + Gets the number of items in this set + + + + + Provides permutations of a sequence of items + + Type of items to permute + + + + Constructor + + Items to permute + Length of permutation to return (-1 for all permutations) + + + + Gets enumerator over permutations of items + + Enumerator over permutations of items + Represents a set of unique items @@ -427,111 +533,5 @@ Current capacity Next capacity larger than a given capacity - - - Provides permutations of a sequence of items - - Type of items to permute - - - - Constructor - - Items to permute - Length of permutation to return (-1 for all permutations) - - - - Gets enumerator over permutations of items - - Enumerator over permutations of items - - - - Represents an indexed item - - - - - Constructor - - Index of item - - - - Gets the index for an item - - - - - Represents an indexable set - - Type of items to store - Type of index to use on items - - - - Constructor - - Initial capacity - - - - Adds an item - - Item to add - True if item was new - - - - Adds a range of items - - Items to add - - - - Gets item by index - - Index of item to fetch - Item - - - - Tries to get an item for an index - - Index - Item - True if item was found and false otherwise - - - - Removes an item from this set - - Item to remove - - - - Gets enumerator over items - - - - - - Gets enumerator over items - - - - - - Gets the item for an index - - Index of item to get - Item - - - - Gets the number of items in this set - - diff --git a/Libraries/LAIR.Extensions.dll b/Libraries/LAIR.Extensions.dll index c3f6708..e2b7e8d 100644 Binary files a/Libraries/LAIR.Extensions.dll and b/Libraries/LAIR.Extensions.dll differ diff --git a/Libraries/LAIR.Extensions.xml b/Libraries/LAIR.Extensions.xml index 81359a3..ed7d054 100644 --- a/Libraries/LAIR.Extensions.xml +++ b/Libraries/LAIR.Extensions.xml @@ -4,355 +4,6 @@ LAIR.Extensions - - - Provides extension methods for strings - - - - - Constructor - - - - - Replaces strings within a string - - String to process - Replacement string pairs, where the key is the string to find and the value is the replacement - Whether or not to repeat replacement procedure until no changes are made - String with replacements made - - - - Removes leading and trailing punctuation from a string - - String to trim punctuation from - Trimmed string - - - - Removes leading and trailing punctuation from a string - - String to trim punctuation from - Whether or not to trim leading punctuation - Whether or not to trim trailing punctuation - Trimmed string - - - - Removes punctuation characters (any that aren't a-z, A-Z, or 0-9) - - String to process - String without punctuation - - - - Replaces punctuation characters (any that aren't a-z, A-Z, or 0-9) with something else - - - - - - - - Removes all whitespace characters from a string (\s regex character class) - - String to process - String without whitespace - - - - Removes repeated whitespace from a string - - String to process - String without repeated whitespace - - - - Throws an exception if any of the given characters are present in the string - - String to check - Character(s) to disallow - - - - Splits a string on space characters, guaranteeing a specific number of parts. Will throw an exception if the expected number of parts is not found. - - String to split - Number of parts expected - Parts resulting from split - - - - Splits a string on space characters, guaranteeing a specific number of parts. Will throw an exception if the expected number of parts is not found. - - String to split - Number of parts expected - Characters to split on - Parts resulting from split - - - - Gets enumeration of parts within a string, delimited by space characters - - - - - - - Converts a string to its XML-escaped version - - Text to convert - XML-escaped version of text - - - - Unescapes an string that has been XML-escaped - - Text to convert - Unescaped XML text - - - - Gets path relative to another path - - Base path for absolute path - Absolute path - Relative path - - - - Gets the common initial substring between two strings - - First string - Second string - Common initial substring - - - - Changes the first n characters of a string to uppercase - - String to change - Number of characters to change - Modified string - - - - Gets the index of the nth non-space character within a string - - String to search - n - Index of nth non-space character - - - - Gets the index of the nth occurrence of a character - - String to search - Character to search for - Value of n - Index of the nth occurrence of c - - - - Gets all indexes of a substring within the current string - - String to search - Substring to search for - Indexes - - - - Concatenates an enumeration of strings - - Strings to concatenate - Separator for strings - Concatenated string - - - - Encrypts a string using AES encryption - - String to encrypt - Encryption key to use - Initialization to use - Encrypted bytes - - - - Decrypts a string using AES encryption - - Bytes to decrypt - Encryption key used to produce the bytes - Initialization that was used to produce the bytes - Unencrypted string - - - - Provides extension methods for TreeBank nodes - - - - - Gets the argument index for a node. Node can only have a single index associated with it. An - exception will be thrown if it has multiple indexes. - - Node to get argument index for. Must be a NomBankNode or a PropBankNode - Whether or not to convert NomBank argument indexes to PropBank indexes when - possible - Argument index - - - - Gets the argument indexes for a node. Node can have multiple indexes, as opposed to GetArgumentIndex. Of course, - calling this on PropBank nodes will only ever return a single index. - - Node to get argument indexes for. Must be a NomBankNode or a PropBankNode. - Whether or not to convert NomBank argument indexes to PropBank indexes when - possible - Argument indexes - - - - Gets the argument indexes for a node. Node can have multiple indexes, as opposed to GetArgumentIndex. Of course, - calling this on PropBank nodes will only ever return a single index. - - Node to get argument indexes for. Must be a NomBankNode or a PropBankNode. - Whether or not to convert NomBank argument indexes to PropBank indexes when - possible - Original argument indexes, before they were converted to PropBank indexes. If - nomBankToPropBank is false, this must be null. If nomBankToPropBank is true, this may be either null or non-null. In - the latter case, argument indexes will be added to the passed set using Set.Add. This set will also contain any PropBank - argument indexes. - Argument indexes - - - - Gets the predicate node for a given predicate tree - - Predicate tree - must be either a NomBankNode or a PropBankNode - Whether or not to allow phrasal predicates. If true and a phrasal predicate is - encountered, the first token of the phrasal predicate will be returned. - Predicate node - - - - Gets base predicate for a predicate tree (i.e., the predicate contained in Information.Noun or Information.Verb). Only - valid for root nodes. - - Predicate tree for which to get base predicate (must be root) - Whether or not to convert NomBank predicates to PropBank predicates where possible - Base predicate - - - - Gets base predicate for a predicate tree (i.e., the predicate contained in Information.Noun or Information.Verb). Only - valid for root nodes. - - Predicate tree for which to get base predicate (must be root) - Whether or not to convert NomBank predicates to PropBank predicates where possible - Whether or not the returned predicate is a verb or a noun converted to a verb - Base predicate - - - - Gets base predicate for a predicate tree (i.e., the predicate contained in Information.Noun or Information.Verb). Only - valid for root nodes. - - Predicate tree for which to get base predicate (must be root) - Whether or not to convert NomBank predicates to PropBank predicates where possible - Whether or not the returned predicate is a verb or a noun converted to a verb - Original predicate, before any NomBank-PropBank conversion - Whether or not the original predicate is a verb - Base predicate - - - - Gets argument nodes for a predicate tree. Only valid for root nodes of PropBank and NomBank trees. - - Predicate tree to get arguments for - must be a NomBankNode or PropBankNode - Whether or not to include null-element argument nodes - Whether or not to include split arguments - If including split nodes, this specifies whether or not to only include the head node - of the split argument. The head node is defined as the node containing the semantic head of the LCA of all nodes - in the split argument. - Whether or not to include single nodes - Whether or not to exclude single nodes if there are more than one - Set of argument nodes - - - - Gets the argument node collections for a TreeBankNode, which must be a NomBank or PropBank node. - - Node to get collections for - Whether or not to remove null element nodes from the collections. This does not change the - underlying PropBank or NomBank tree - null elements will still remain in these trees. - Node collections - - - - Gets modifier nodes for a predicate tree. Only valid for root nodes of PropBank and NomBank trees. - - Predicate tree to get modifiers for - must be a NomBankNode or PropBankNode - Whether or not to include null-element modifier nodes - Whether or not to include split modifiers - If including split nodes, this specifies whether or not to only include the head node - of the split modifier. The head node is defined as the node containing the semantic head of the LCA of all nodes - in the split modifier. - Whether or not to include single nodes - Whether or not to exclude single nodes if there are more than one - Set of modifier nodes - - - - Tries to get information for a role in a predicate tree - - Predicate tree to get information - Argument index to get information for - Role description for the passed argument - True if the role denoted by argumentIndex was found - - - - Tries to get information for a role in a predicate tree - - Predicate tree to get information - Argument index to get information for - Role description for the passed argument - Source index for argument index - True if the role denoted by argumentIndex was found - - - - Gets the role set for a TreeBankNode - - Node (must be root) - Whether or not to convert NomBank role set IDs to PropBank role set IDs where possible - Role set - - - - Gets unfilled roles for a PropBank or NomBank predicate tree - - Predicate tree to get unfilled roles for (must be PropBank or NomBank node) - Whether or not to consider null-element nodes when checking whether a role is filled - Unfilled roles - - - - Gets confidence of an argument node. Node must be either PropBankNode or NomBankNode, and must be an argument node. - - Node to get argument confidence for. Must be either PropBankNode or NomBankNode, and must be an argument node. - Confidence of argument label - - - - Gets the WordNet POS for a TreeBank syntactic category - - TreeBank syntactic category to get WordNet POS for - WordNet POS - Provides extension methods for the .NET Dictionary class @@ -561,5 +212,189 @@ StreamReader to reset Position to reset to + + + Provides extension methods for strings + + + + + Constructor + + + + + Replaces strings within a string + + String to process + Replacement string pairs, where the key is the string to find and the value is the replacement + Whether or not to repeat replacement procedure until no changes are made + String with replacements made + + + + Removes leading and trailing punctuation from a string + + String to trim punctuation from + Trimmed string + + + + Removes leading and trailing punctuation from a string + + String to trim punctuation from + Whether or not to trim leading punctuation + Whether or not to trim trailing punctuation + Trimmed string + + + + Removes punctuation characters (any that aren't a-z, A-Z, or 0-9) + + String to process + String without punctuation + + + + Replaces punctuation characters (any that aren't a-z, A-Z, or 0-9) with something else + + + + + + + + Removes all whitespace characters from a string (\s regex character class) + + String to process + String without whitespace + + + + Removes repeated whitespace from a string + + String to process + String without repeated whitespace + + + + Throws an exception if any of the given characters are present in the string + + String to check + Character(s) to disallow + + + + Splits a string on space characters, guaranteeing a specific number of parts. Will throw an exception if the expected number of parts is not found. + + String to split + Number of parts expected + Parts resulting from split + + + + Splits a string on space characters, guaranteeing a specific number of parts. Will throw an exception if the expected number of parts is not found. + + String to split + Number of parts expected + Characters to split on + Parts resulting from split + + + + Gets enumeration of parts within a string, delimited by space characters + + + + + + + Converts a string to its XML-escaped version + + Text to convert + XML-escaped version of text + + + + Unescapes an string that has been XML-escaped + + Text to convert + Unescaped XML text + + + + Gets path relative to another path + + Base path for absolute path + Absolute path + Relative path + + + + Gets the common initial substring between two strings + + First string + Second string + Common initial substring + + + + Changes the first n characters of a string to uppercase + + String to change + Number of characters to change + Modified string + + + + Gets the index of the nth non-space character within a string + + String to search + n + Index of nth non-space character + + + + Gets the index of the nth occurrence of a character + + String to search + Character to search for + Value of n + Index of the nth occurrence of c + + + + Gets all indexes of a substring within the current string + + String to search + Substring to search for + Indexes + + + + Concatenates an enumeration of strings + + Strings to concatenate + Separator for strings + Concatenated string + + + + Encrypts a string using AES encryption + + String to encrypt + Encryption key to use + Initialization to use + Encrypted bytes + + + + Decrypts a string using AES encryption + + Bytes to decrypt + Encryption key used to produce the bytes + Initialization that was used to produce the bytes + Unencrypted string + diff --git a/Libraries/LAIR.IO.dll b/Libraries/LAIR.IO.dll index 6edf61f..fdcb4b1 100644 Binary files a/Libraries/LAIR.IO.dll and b/Libraries/LAIR.IO.dll differ diff --git a/Libraries/LAIR.MachineLearning.dll b/Libraries/LAIR.MachineLearning.dll index b290290..745de9c 100644 Binary files a/Libraries/LAIR.MachineLearning.dll and b/Libraries/LAIR.MachineLearning.dll differ diff --git a/Libraries/LAIR.MachineLearning.xml b/Libraries/LAIR.MachineLearning.xml index a57452e..f3a7736 100644 --- a/Libraries/LAIR.MachineLearning.xml +++ b/Libraries/LAIR.MachineLearning.xml @@ -4,20 +4,14 @@ LAIR.MachineLearning - - - Logistic regression classifier - - - + - Abstract base class for all Weka wrappers + Provides access to LibLinear classifier server - + - Abstract base class for classifier wrappers that operate in a two-stage fashion, where each stage requires a call to an - external executable program. These classifiers also make use of a directory to store various data. + Abstract base class for numbered feature classifier clients @@ -130,1249 +124,1485 @@ Gets the file paths used to build models in this classifier - + - Constructor + Constructor. Assumes a connection_params file is in model directory. - Directory to store model files in - Path to LibLinear learn executable - Path to LibLinear classify executable + Method of access to use for feature name transform + Method of access to use for feature space + Whether or not to scale numeric feature values when classifying feature vectors + Model directory for this client. This directory must have a file named connection_params in it, + which has two lines. The first gives the host address, the second gives the host port. + Newline sequence used by classifier Feature extractor to use - Confidence threshold for labels + Label confidence threshold - + Constructor - Directory to store model files in - Path to LibLinear learn executable - Path to LibLinear classify executable + Method of access to use for feature name transform + Method of access to use for feature space + Whether or not to scale numeric feature values when classifying feature vectors + Model directory for this client. This directory must have a file named connection_params in it, + which has two lines. The first gives the host address, the second gives the host port. + Newline sequence used by classifier Feature extractor to use + Label confidence threshold + Host for server + Port for server - + - Gets argument list for invoked learn executable + Classifies a list of feature vectors at the remote server - Argument list + Feature vectors to classify - + - Learns classifier + Writes feature vectors to classify server + Feature vectors to be classified - + - Cleans up + Reads predictions from server + Feature vectors that have been classified at server - + - Gets argument list for invoked classify executable + Applies predictions to feature vectors - Argument list + Feature vectors to apply predictions to - + - Classifies a list of feature vectors + Gets textual representation of feature vector - Feature vectors to classify + Feature vector to get text for + Feature vector text - + - Cleans up + Gets mapped label for an unmapped label - + Unmapped label to get mapped label for + Mapped label - + - Gets or sets whether the learn process should be run after consuming all training vectors and firing the PreLearn event (default: true) + Not implemented - + - Gets the learn executable path + Gets the name of the file that stores the connection parameters - + - Gets the classify executable path + Gets the label for instances for which the class is unknown - + - Gets the path to the executable's output + Gets the path to the feature name transform - + - Gets or sets whether or not to throw an exception for any output on standard error when classifying with this classifier (default: true) + Gets the path to the feature space file - + - Gets or sets whether or not to throw an exception for any output on standard error when learning the classifier (default: true) + Gets the path to the label map file - + - Quote to use for values + Gets the label map, which maps application-level labels to classifier-level labels - + - Matches the end quote in a quotes attribute value + Gets the path to the connection parameters file - + - Gets the ARFF header for a list of features + Gets the path to the model file - Features to get header for - Class labels to write - Attribute declaration - + - Get instance text for a feature vector + Gets labels used by this classifier - Feature vector to get instance text for - Feature order to write - Label map - Instance text for feature vector - + - Escapes an attribute value + Creates a LibLinear classification server startup script, and leaves LibLinear client connection parameter files in each directory - Value to escape - Escaped value + Parent directory, to be searched recursively for model files. The startup script is created in + this directory + File name for LibLinear models + LibLinear classify server host + Base port number for the LibLinear classify server + Whether or not to output probabilities if possible - + + + Creates a LibLinear classification server startup script, and leaves LibLinear client connection parameters in each directory + + Directory to be searched recursively for model files + File name for LibLinear models + LibLinear classify server host + Current port number for models + Path to the top-level directory + Path to top-level startup script + True if any entries were added to the startup script + Whether or not to output probabilities if possible + + Constructor + Whether or not the server will output probabilities + Method of access to use for feature name transform + Method of access to use for feature space + Whether or not to scale numeric feature values when classifying feature vectors + Model directory for this client. This directory must have a file named liblinear_client_params in it, + which has two lines. The first gives the host address, the second gives the host port. Feature extractor to use - Model directory - Path to Java executable file - Path to Weka jar file + Label confidence threshold - + - Clears files from model directory before consuming new training entities + Constructor + Whether or not the server will output probabilities + Method of access to use for feature name transform + Method of access to use for feature space + Whether or not to scale numeric feature values when classifying feature vectors + Model directory for this client. This directory must have a file named liblinear_client_params in it, + which has two lines. The first gives the host address, the second gives the host port. + Feature extractor to use + Label confidence threshold + Host for server + Port for server - + - Consumes training vectors + Applies current predictions to a list of feature vectors - Vectors to consume + Feature vectors to apply predictions to - + - Finishes ARFF file + Gets the label for instances for which the true class is unknown - + - GetLearnProcessArguments override + Gets or sets whether or not the server will output probabilities - - + - Cleans up after learn process runs + Reads LibLinear-style feature vector files - + - Gets ready to classify feature vectors + Reads FeatureVectorStrings from a text file - Feature vectors to be classified - + - Gets classify process's arguments + Gets feature vector strings from a file - + Path to file + List of vectors - + - Applies predictions to feature vectors + Gets feature vector strings from a file - FeatureVectors that were classified + Path to file from which to get vectors + List of feature vector strings - + - Gets labels used by this classifier + Extracts features from FeatureVectorStrings that are in LibLinear format - + - Multi-class strategy to use (default: None) + Abstract base class for classes that extract feature vectors from classifiable entities - + - Whether or not to use the server JVM instead of the client JVM (default: false) + Constructor + Whether or not to use abbreviated feature names + Whether or not to use abbreviated feature values - + - Gets or sets whether or not to perform cross validation (default: false) + Gets a feature vector for a single entity + Entity to get feature vector for + Feature vector - + - Gets or sets whether or not to delete the training file after it is used (default: false) + Gets a feature vector for a single entity + Entity to get feature vector for + Estimated number of features that might be extracted for the entity. Passing this argument + allows feature extraction to initialize the feature vector with a predetermined capacity, which is good for memory usage. + Feature vector - + - Gets command line arguments for the JVM + Gets feature vectors for a list of entities + Entities to process + Number of features that might be extracted for an entity + List of feature vectors - + - Gets multi-class classifier arguments + Gets feature vectors for a list of entities + Entities to process + List of feature vectors - + - Gets the class for multi-class classification + Gets or sets whether or not to use abbreviated feature values instead of full-length values - + - Gets the classifier class + Gets or sets whether or not to use abbreviated feature names instead of the full names - + - Gets the path to the training instances file + Constructor - + - Get the path to the classification instances file + Gets a FeatureVector from a FeatureVectorString object + Entity to get feature vector from + Features per entity + FeatureVector - + - Gets the file to save label map to + Wrapper for the LibLinear classifier - + + + Abstract base class for all classifiers that make use of the following instance format: + + label feature1:value1 feature2:value2 ... featureN:valueN + + The one-based feature numbers are sorted ascendingly from left to right. Example classifiers + include SVM Light (and its derivatives) and LibLinear. + + + - Gets the feature name transform save file + Abstract base class for classifier wrappers that operate in a two-stage fashion, where each stage requires a call to an + external executable program. These classifiers also make use of a directory to store various data. - + - Gets the path to the feature space file + Constructor + Directory to store model files in + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use + Confidence threshold for labels - + - Gets the path to the feature order file + Constructor + Directory to store model files in + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use - + - Gets the model file + Gets argument list for invoked learn executable + Argument list - + - Gets list of file used in the curren tmodel + Learns classifier - + - Types of multi-class strategies + Cleans up - + - Constructor + Gets argument list for invoked classify executable - Feature extractor - Model directory - Path to Java executable - Path to Weka jar file + Argument list - + - Gets the logistic regression class + Classifies a list of feature vectors + Feature vectors to classify - + - Represents a feature vector used by the Cluto toolkit + Cleans up + - + - Represents a sparse vector of features + Gets or sets whether the learn process should be run after consuming all training vectors and firing the PreLearn event (default: true) - + - Constructor + Gets the learn executable path - Entity this vector is derived from - + + + Gets the classify executable path + + + + + Gets the path to the executable's output + + + + + Gets or sets whether or not to throw an exception for any output on standard error when classifying with this classifier (default: true) + + + + + Gets or sets whether or not to throw an exception for any output on standard error when learning the classifier (default: true) + + + + + Gets instance text for feature vector + + Feature vector to get instance text for + Label map to use + Gets the label for instances for which the true class is unknown + Feature space to restrict feature space to, or null for no restriction + Whether or not to scale numeric feature values to [0,1] using the observed range in + the given feature space. It's possible for a scaled value to be greater than 1 in cases where the observed range doesn't + include the value. + Feature name transform to apply + Instance text for a feature vector + + + + Gets instance text for feature vector + + Feature vector to get instance text for + Label map to use + Gets the label for instances for which the true class is unknown + Feature space to restrict feature space to, or null for no restriction + Whether or not to scale numeric feature values to [0,1] using the observed range in + the given feature space. It's possible for a scaled value to be greater than 1 in cases where the observed range doesn't + include the value. If true, caller must supply a feature space. + Feature name transform to apply + This method will add any numeric feature numbers to the supplied set. Pass null if + feature numbers aren't needed. + Instance text for a feature vector + + + + Changes the names of features used by this classifier + + Directory of model + Old names and new names + + Constructor - Entity this vector is derived from - Number of features this vector will contain + Method of access for feature name transform + Method of access for feature space + Label mapping to perform + Scale numeric feature values + Directory to store model files in + Newline sequence to use for classifier + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use + Confidence threshold for labels - + - Adds a feature/value pair to this vector + Gets an unmapped label - Feature to add - Value of feature to add - Whether or not to update the stored range on the added feature + Mapped label to get unmapped label for + Unmapped label - + - Adds feature/value pairs from a vector to this vector + Gets a mapped label - Vector whose feature/value pairs should be added to this one + Unmapped label to get mapped label for + Mapped label - + - Removes a feature from this vector + Gets 1-based feature number given a feature name - Feature to remove + Name of feature to transform + Feature number - + - Removes a feature from this vector + Tries to get the 1-based feature number given a feature name - Name of feature to remove + Name of feature to transform + Feature number (output) + True if feature number was retrieved and false otherwise - + - Gets whether or not this feature vector contains a feature + Gets instance text as it would appear when classifying a feature vector - Feature to check - True if feature is present, false otherwise + Feature vector to get instance text for + Instance text - + - Gets whether or not this feature vector contains a feature by name + Called just before the first training vectors are consumed - Feature name to check - True if feature is present, false otherwise - + - Tries to get a feature value from this vector + Consumes training feature vectors - Feature to get value for - Value of feature - True if value was retrieved, false otherwise + - + - Tries to get a feature value from this vector by name + Called just before learning takes place - Feature name to get value for - Value of feature - True if value was retrieved, false otherwise - + - Clears all feature/value pairs from this vector + Called after learning takes place - + - Normalizes the current vector to be of unit length. This only works if all feature values can be casted into floats. + Gets the index of the space character that comes before the feature-value pairs + Feature vector line + Index of space - + - Gets printable string value of this vector + Write instance file to classify - + Feature vectors to be classified - + - Restricts the feature space of this vector to conform with the given feature space. Features in this vector that are - not contained in the feature space will be removed. For restrictions on the feature values, see the parameters. + Called just after classification takes place - Feature space to use - Whether or not to require nominal features in this vector to have values that are - present in the range of the corresponding feature in the given feature space. - Whether or not to require numeric features in this vector to have values that are - within the range of the corresponding feature in the given feature space. + Feature vectors that were classified - + - Gets enumerator over features in this vector + Loads supporting model files that allow this classifier to classify feature vectors - Enumerator over features in this vector - + - Gets enumerator over features in this vector + Gets the name of the training instances file - Enumerator over features in this vector - + - Gets the Euclidean length of this vector. All feature values must be castable to floats. + Gets the feature name transform file name - + - Gets the value of a given feature + Gets the feature space file name - Feature to get value for - Value of feature - + - Gets the value of a given feature + Gets the label map file name - Name of feature - Value of feature - + - Gets number of features in this vector + Gets the model file name - + - Gets the collection of features used in this vector + Gets the name of the instances to classify file - + - Gets or sets the entity from which this feature vector is derived + Gets the label for instances for which the class is unknown - + + + Gets the newline sequence used by this classifier + + + + + Gets the name transform access method + + + + + Gets the feature space access method + + + + + Gets or sets the feature space condensation method (default: DiskBased) + + + + + Gets whether or not to scale numeric feature values + + + + + Gets the path to the file containing training instances + + + + + Gets the path to the feature name transform + + + + + Gets the path to the feature space file + + + + + Gets the path to the feature space range search file + + + + + Gets the path to the label map + + + + + Gets the label map used in this classifier + + + + + Gets labels used by this classifier + + + + + Gets the path to the model + + + + + Gets the path to the file containing the instances to classify + + + + + Gets the model files used by the implementing class + + + + + Gets or sets the starting size of the memory-based feature name transform. In order to take effect, this must + be set before the first training vectors are consumed. Will throw an exception if set when using disk-based + feature name transformation. + + + + + Gets or sets whether to delete the training instances file after learning has completed (default: false) + + + + + Gets whether a solver is probabilistic + + + + + + + Gets the solver type for a the model ID given in the model file + + ID from model file + Solver type + + + + Applies classification predictions to a list of feature vectors + + Path to predictions file + Feature vectors to apply predictions to + Whether or not probabilities were output + Label map to use + + + + Gets feature weights from a LibLinear model file. First key is the class label, the second key is the 1-based feature number + and the value is the weight. For a two-class problem, there is only one class label in the first key, and that is the label + first encountered in the model file. For a multi-class problem, there is a key for each class label. + + Path to LibLinear model file + Feature weights + + + + Creates a CSV file from a LibLinear model + + + + + + + Quotes a string if needed for use in CSV + + + + + Constructor - Entity this vector is derived from - Internal z-score - External z-score + Solver to use + Method of access for feature name transform + Method of access for feature space + Scale numeric feature values + Directory to store model files in + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use + Confidence threshold for labels - + - Gets or sets the internal z-score for this vector + Gets learn process arguments + Learn process arguments - + - Gets or sets the external z-score for this vector + Gets the index of the space character that comes before the feature-value pairs + Feature vector + Index of space - + + + Gets arguments for learn process + + Arguments for learn process + + + + Applies predictions and cleans up + + Feature vectors that have been classified + + + + Gets the name of the predictions file name + + + - Compares two feature vectors using the values of their internal z-scores + Gets the label for instances for which the true class is unknown - + - Compares two feature vectors using the values of their internal z-scores + Gets the type of solver used - First vector - Second vector - - + - Compares two feature vectors using the values of their external z-scores + Gets or sets the cost parameter - + - Compares two feature vectors using the values of their external z-scores + Gets or sets the epsilon parameter - First vector - Second vector - - + - Compares two feature vectors using a combination of the internal and external z-scores + Gets or sets the bias parameter - + - Compares two feature vectors using a combination of the internal and external z-scores + Gets or sets the number of cross-validation folds to use - First vector - Second vector - - + - Provides instances to classifiers, annotators, etc. - anything that needs a stream of classifiable instances + Gets or sets whether or not to output classification probabilities (only valid for logistic regression classifier) - + - Constructor + Gets the path to the file to be written with predictions - + - Starts the instance stream + Gets a list of files used in the current model - + - Gets the next instance in the stream + Gets or sets the per-class weights - Instance - + - Gets the previous instance in the stream + Types of LibLinear solvers - Instance - + - Gets the zero-based number of the current instance + L2-regularized primal logistic regression (s=0) - + - Gets the total number of instances available + L2-regularized L2-loss dual SVM (s=1) - + - Gets the number of instance remaining + L2-regularized L2-loss primal SVM (s=2) - + - Gets whether or not there is another instance available + L2-regularized L1-loss dual SVM (s=3) - + - Gets whether or not there is a previous instance + Multi-class SVM by Crammer and Singer (s=4) - + - Gets the current training instance + L1-regularized L2-loss SVM (s=5) - + - Reads SvmLight-style feature vector text files + L1-regularized logistic regression (s=6) - + - Reads FeatureVectorStrings from a text file + L2-regularized dual logistic regression (s=7) - + - Gets feature vector strings from a file + Reads SvmRank-style feature vector text files - Path to file - List of vectors - + Gets feature vectors from a file Path to file from which to get vectors List of feature vectors - + - Extracts features from FeatureVectorStrings that are in LibLinear format + Wrapper for the SVM Rank classifier. Any calls to classify assume that the classified feature + vectors are to be ranked against each other. - + - Abstract base class for classes that extract feature vectors from classifiable entities + Applies predictions from a file to classified feature vectors + Prediction output + Feature vectors to apply predictions to - + Constructor - Whether or not to use abbreviated feature names - Whether or not to use abbreviated feature values - - - - Gets a feature vector for a single entity - - Entity to get feature vector for - Feature vector + Trade-off between training error and margin + Method of access for feature name transform + Method of access for feature space + Scale numeric feature values + Directory to store model files in + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use - + - Gets a feature vector for a single entity + Gets the index of the space character that comes before the feature-value pairs - Entity to get feature vector for - Estimated number of features that might be extracted for the entity. Passing this argument - allows feature extraction to initialize the feature vector with a predetermined capacity, which is good for memory usage. - Feature vector + Feature vector + Index of space - + - Gets feature vectors for a list of entities + Gets learning process arguments - Entities to process - Number of features that might be extracted for an entity - List of feature vectors + - + - Gets feature vectors for a list of entities + Gets classification process arguments - Entities to process - List of feature vectors + - + - Gets or sets whether or not to use abbreviated feature values instead of full-length values + Called just before classification. Sets the qid for each feature vector to be the same. + Feature vectors to rank - + - Gets or sets whether or not to use abbreviated feature names instead of the full names + Applies predictions and cleans up + Feature vectors that have been classified - + - Constructor + Gets the name of the predictions file name - + - Gets a FeatureVector from a FeatureVectorString object + Gets the label for instances for which the true class is unknown - Entity to get feature vector from - Features per entity - FeatureVector - + - Provides access to LibLinear classifier server + Gets the path to the predictions file - + - Abstract base class for numbered feature classifier clients + Gets files used in SVM Light models - + - Constructor. Assumes a connection_params file is in model directory. + Represents a feature in Weka - Method of access to use for feature name transform - Method of access to use for feature space - Whether or not to scale numeric feature values when classifying feature vectors - Model directory for this client. This directory must have a file named connection_params in it, - which has two lines. The first gives the host address, the second gives the host port. - Newline sequence used by classifier - Feature extractor to use - Label confidence threshold - + - Constructor + Gets the value to use when an instance is missing a feature - Method of access to use for feature name transform - Method of access to use for feature space - Whether or not to scale numeric feature values when classifying feature vectors - Model directory for this client. This directory must have a file named connection_params in it, - which has two lines. The first gives the host address, the second gives the host port. - Newline sequence used by classifier - Feature extractor to use - Label confidence threshold - Host for server - Port for server - + - Classifies a list of feature vectors at the remote server + Extracts features from FeatureVectorStrings that are in LibLinear format - Feature vectors to classify - + - Writes feature vectors to classify server + Constructor - Feature vectors to be classified - + - Reads predictions from server + Gets a FeatureVector from a FeatureVectorString object - Feature vectors that have been classified at server + Entity to get feature vector from + Features per entity + FeatureVector - + - Applies predictions to feature vectors + Represents a nominal feature in Weka - Feature vectors to apply predictions to - + - Gets textual representation of feature vector + Represents non-numeric features - Feature vector to get text for - Feature vector text - + - Gets mapped label for an unmapped label + Abstract base class for all feature classes - Unmapped label to get mapped label for - Mapped label - + - Not implemented + Constructor + Name of feature. May not contain spaces. - + - Gets the name of the file that stores the connection parameters + Updates the range of this feature + - + - Gets the label for instances for which the class is unknown + Checks whether this feature equals another + Other feature to check + True if features are equal, false otherwise - + - Gets the path to the feature name transform + Gets hash code for this feature + Hash code - + - Gets the path to the feature space file + Gets a deep copy of this feature - + - Gets the path to the label map file + Renames the current feature, returning a new feature. + New feature name + New feature - + - Gets the label map, which maps application-level labels to classifier-level labels + Gets name of feature + - + - Gets the path to the connection parameters file + Compares this feature to another feature on the basis of feature names + Other feature + - + - Gets the path to the model file + Gets or sets the name - + - Gets labels used by this classifier + Constructor + Name of feature - + - Creates a LibLinear classification server startup script, and leaves LibLinear client connection parameter files in each directory + Constructor - Parent directory, to be searched recursively for model files. The startup script is created in - this directory - File name for LibLinear models - LibLinear classify server host - Base port number for the LibLinear classify server - Whether or not to output probabilities if possible + Name of feature + Initial range size - + - Creates a LibLinear classification server startup script, and leaves LibLinear client connection parameters in each directory + Constructor - Directory to be searched recursively for model files - File name for LibLinear models - LibLinear classify server host - Current port number for models - Path to the top-level directory - Path to top-level startup script - True if any entries were added to the startup script - Whether or not to output probabilities if possible + Name of feature + Elements to initialize range with - + - Constructor + Updates the range of this nominal feature - Whether or not the server will output probabilities - Method of access to use for feature name transform - Method of access to use for feature space - Whether or not to scale numeric feature values when classifying feature vectors - Model directory for this client. This directory must have a file named liblinear_client_params in it, - which has two lines. The first gives the host address, the second gives the host port. - Feature extractor to use - Label confidence threshold + - + - Constructor + Checks whether or not a value is in the range of this feature - Whether or not the server will output probabilities - Method of access to use for feature name transform - Method of access to use for feature space - Whether or not to scale numeric feature values when classifying feature vectors - Model directory for this client. This directory must have a file named liblinear_client_params in it, - which has two lines. The first gives the host address, the second gives the host port. - Feature extractor to use - Label confidence threshold - Host for server - Port for server + Value to check + Try if value is in the range, false otherwise - + - Applies current predictions to a list of feature vectors + Adds a value to this feature's range, or does nothing if the value already exists in the range - Feature vectors to apply predictions to + Value to add + True if value was added as new, false if it was already in the range - + - Gets the label for instances for which the true class is unknown + Gets a deep copy of this nominal feature + NominalFeature - + - Gets or sets whether or not the server will output probabilities + Renames the current feature, returning a new feature. + New name + New feature - + - Sorts features by name + Gets whether or not this nominal feature equals another feature + Other feature + True if both features are nominal with the same name - + - Compares two features by name + Gets hash code for this feature - First feature - Second feature - -1 if x comes before y, 1 if x comes after y, and 0 otherwise + Hash code - + - Extracts features from FeatureVectorStrings that are in LibLinear format + Gets the range of values for this nominal feature - + Constructor + - + - Gets a FeatureVector from a FeatureVectorString object + Constructor - Entity to get feature vector from - Features per entity - FeatureVector + + - + - Maps class labels to a form usable by a classifier + Constructor + + + - + - Constructor. The resulting LabelMap will be unlocked. + Constructor - Type of mapping to perform + + + - + - Constructor + Gets copy - Path to saved label map + - + - Adds a mapping + Renames - Unmapped label - Mapped label + + - + - Gets the mapped label for an unmapped label + Gets value to use when feature is missing - Label to get mapped label for - Mapped label - + - Gets unmapped label for a mapped label + Represents a numeric feature in Weka - Mapped label to get unmapped label for - Unmapped label - + - Saves this map to disk + Represents features with infinite numeric domains - Where to write map to - + - Clears this label map + Constructor + Name of feature - + - Checks whether this map contains a mapped label for a given unmapped label + Constructor - Label to check for - True if such a label exists, false otherwise + Name of feature + Minimum value of this feature + Maximum value of this feature - + - Gets or sets whether or not this LabelMap is locked (default: false) + Updates the range of this numeric feature + - + - Gets unmapped labels, which are used by the application + Gets a deep copy of this numeric feature + Feature copy - + - Gets mapped labels, which are used by the classifier + Renames the current feature, returning a new feature. + New name + New feature - + - Mapping types + Gets whether or not this numeric feature equals another feature + Other feature + True if both features are numeric with the same name - + - Perform no mapping. Directly use the given label. + Gets hash code for this feature + Hash code - + - Map labels to 1-based increasing integers + Gets whether or not a value is within the range of this numeric feature + Value to check + True if the value is in the range, false otherwise - + - Represents a feature space that can be searched using a binary search over a file. This is a read-only feature space. + Updates the range on this feature + Minimum value + Maximum value - + - Provides disk-based access to a feature space. Creates an auxiliary file that maps feature names to their ranges - numerical - ranges in the case of numerical features, and byte ranges in the case of nominals features, where the byte range specifies - a portion of the feature space file to search for the feature value. + Gets or sets the minimum value of this feature - + - Represents a feature spaces that FeatureVectors reside in + Gets or sets the maximum value of this feature - + - Condenses a feature space file. When multiple feature spaces are appended to the same file, the same feature can be listed - multiple times. This results in redundancies that must be removed for proper operation over the feature space file. + Constructor - Feature space file to condense - Output file for condensed feature space (may be the same as the input path) - Method of condensing the feature space + + - + Constructor + + + + - + - Clears this feature space and releases any resources held by it + Gets copy + - + - Gets whether or not this space contains a feature + Renames + + - + - Gets whether or not this space contains a feature/value pair + Gets value to use when feature is missing - Feature to check - Value to check - True if feature/value pair is present, false otherwise - + - Gets the range of a numeric feature value + Represents a discriminative Markov model - Numeric feature to get range for - Minimum value of range - Maximum value of range - + - Scales a numeric feature value to be within [-1,1] based on the observed range of the feature in the training data. This - isn't guaranteed, as the given feature value might be outside the feature's observed range range defined in this space, in - which case the value might be outside of [-1,1]. The range of [-1,1] is usually appropriate, since many classifiers will - assume a value of 0 for missing features. The value 0 in the range [-1,1] is uninformative for any class and thus - appropriate for features missing a value. + Represents - Numeric feature to scale - Value to scale - Scaled value - + - Gets or sets whether or not this feature space is locked (default: false) + Constructor + + - + - Gets number of features in this space + Creates a state + + + - + - Access methods + Gets states at a time index + Time at which to get states + States - + - In-memory access + Gets the observation at a given time + Observation at the given time - + - Hash search-based access + Runs the model, calculating Viterbi and forward probabilities. - + - Binary search-based access + Gets the forward probability of a state at a time, given a previous state. + + + + - + - Methods for condensing feature spaces + Gets the Viterbi probability of a state at a time, given a previous state. + + + + - + - Uses little memory, but creates large numbers of files on disk + Decodes the most likely state sequence + - + - Creates no auxiliary files, but uses lots of memory. Only recommended for small feature spaces. + Gets observations - + - Constructor + Gets the start states - + - Creates an auxiliary file that maps feature names to their ranges - numerical ranges in the case of numerical features, - and byte ranges in the case of nominals features, where the byte range specifies a portion of the feature space file to - search for the feature value. + Gets the end states - Path to feature space for which to create range file - Whether or not to create a range file in which the feature names are sorted. This is required, - for example, in the case of binary searches over ordered data - Path to range file that was created - + - Gets whether or not this space contains a feature + Gets the most likely end state - Feature to check for - True if feature is contained, false otherwise - + - Gets whether or not this feature space contains a feature/value pair + Gets number of time steps in the model - Feature to check - Value of feature - True if feature/value pair is not present - + - Gets the search value prefix for a feature-value query + Gets the number of states in each time step - Feature to get prefix for - Search value prefix for a feature-value query - + - Closes the feature space files + Gets the state IDs - + - Gets the range of a numeric feature value + Constructor - Numeric feature to get range for - Minimum value of range - Maximum value of range + + + - + - Gets or sets the feature space search + Creates a discriminative state + + + - + - Gets or sets the feature range search + Gets the forward probability of a state + + + + - + - Gets the number of features in this feature space + Gets the Viterbi probability + + + + - + - Gets whether or not the feature space is locked (always true, cannot be set to false) + Classifies all times at once - + - Constructor + Provides training instances for a discriminative HMM - Path to feature space file that is to be searched - + - The binary search feature space does not need to do feature-value prefixing because it does not do any tricky - indexing of feature values. It simply conducts a binary search for a feature value within a byte range. This - function always returns the empty string. + Provides training instances - Feature to get prefix for - Empty string - + - Transforms string feature names to numeric feature names. Some classification frameworks only work with numeric features names, - so we must have a method of transforming string names to numeric names. + Provides instances to classifiers, annotators, etc. - anything that needs a stream of classifiable instances - + Constructor - Whether or not transform is locked - - - - Gets 1-based feature number given a feature name - - Name of feature to transform - Feature number - + - Gets the feature name for a feature number + Starts the instance stream - Feature number to get name for - Feature name - + - Tries to get the feature name for a feature number + Gets the next instance in the stream - Feature number to get name for - Feature name - Feature name + Instance - + - Tries to get the 1-based feature number given a feature name + Gets the previous instance in the stream - Name of feature to transform - Feature number (output) - True if feature number was retrieved and false otherwise + Instance - + - Closes this transform, releasing resources + Gets the zero-based number of the current instance - + - Saves this transform to disk + Gets the total number of instances available - + - Gets or sets whether or not this transform is locked (default: false) + Gets the number of instance remaining - + - Available acess methods + Gets whether or not there is another instance available - + - All data is stored in memory + Gets whether or not there is a previous instance - + - Feature name hashes are stored in memory, but numeric values are on disk + Gets the current training instance - + - Nothing is stored in memory - the transform file is searched using a binary search + Constructor + Instance filter to use when providing training instances - + - A strongly-typed resource class, for looking up localized strings, etc. + Applies filter to an instance + Instance to apply filter to + True if instance passes filter, false otherwise - + - Returns the cached ResourceManager instance used by this class. + Gets or sets the instance filter used in this provider - + - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. + Delegate for functions that determine which instances should be used for training and what their true labels are + Instance to apply filter to + True label of instance, if not filtered out + Whether or not to use instance for training - + - Represents a state in a generative HMM + Represents a state in a discriminative HMM @@ -1412,162 +1642,86 @@ Gets the most likely previous state - - - Constructor - - State of node - Time of node - - - - Provides disk-based access to a feature name transform file. Provides ability to add new - features via an internal memory-based transform. - - - + Constructor - Search handler - - - - Initializes this disk-based transform - + + - + - Tries to get the 1-based feature number given a feature name + Utility routines for cross-fold validation - Name of feature to transform - Feature number (output) - True if feature number was retrieved and false otherwise - + - Not implemented + Gets the evaluation items to be used, assuming an n-fold cross-validation setup - - + + + - - - Saves any memory-based storage to disk and reloads disk-based transform - - Where to save transform - - + - Closes the transform + Sorts features by name - + - Gets or sets whether or not this transform is locked + Compares two features by name + First feature + Second feature + -1 if x comes before y, 1 if x comes after y, and 0 otherwise Stores nothing in memory. Uses an on-disk binary search of the feature name transform file. - - - Constructor - - Path to transform file, or null if no initial transform is to be used - - - - Wrapper for the LibLinear classifier - - - - - Abstract base class for all classifiers that make use of the following instance format: - - label feature1:value1 feature2:value2 ... featureN:valueN - - The one-based feature numbers are sorted ascendingly from left to right. Example classifiers - include SVM Light (and its derivatives) and LibLinear. - - - - - Gets instance text for feature vector - - Feature vector to get instance text for - Label map to use - Gets the label for instances for which the true class is unknown - Feature space to restrict feature space to, or null for no restriction - Whether or not to scale numeric feature values to [0,1] using the observed range in - the given feature space. It's possible for a scaled value to be greater than 1 in cases where the observed range doesn't - include the value. - Feature name transform to apply - Instance text for a feature vector - - + - Gets instance text for feature vector + Provides disk-based access to a feature name transform file. Provides ability to add new + features via an internal memory-based transform. - Feature vector to get instance text for - Label map to use - Gets the label for instances for which the true class is unknown - Feature space to restrict feature space to, or null for no restriction - Whether or not to scale numeric feature values to [0,1] using the observed range in - the given feature space. It's possible for a scaled value to be greater than 1 in cases where the observed range doesn't - include the value. If true, caller must supply a feature space. - Feature name transform to apply - This method will add any numeric feature numbers to the supplied set. Pass null if - feature numbers aren't needed. - Instance text for a feature vector - + - Changes the names of features used by this classifier + Transforms string feature names to numeric feature names. Some classification frameworks only work with numeric features names, + so we must have a method of transforming string names to numeric names. - Directory of model - Old names and new names - + Constructor - Method of access for feature name transform - Method of access for feature space - Label mapping to perform - Scale numeric feature values - Directory to store model files in - Newline sequence to use for classifier - Path to LibLinear learn executable - Path to LibLinear classify executable - Feature extractor to use - Confidence threshold for labels + Whether or not transform is locked - + - Gets an unmapped label + Gets 1-based feature number given a feature name - Mapped label to get unmapped label for - Unmapped label + Name of feature to transform + Feature number - + - Gets a mapped label + Gets the feature name for a feature number - Unmapped label to get mapped label for - Mapped label + Feature number to get name for + Feature name - + - Gets 1-based feature number given a feature name + Tries to get the feature name for a feature number - Name of feature to transform - Feature number + Feature number to get name for + Feature name + Feature name - + Tries to get the 1-based feature number given a feature name @@ -1575,2448 +1729,2423 @@ Feature number (output) True if feature number was retrieved and false otherwise - - - Gets instance text as it would appear when classifying a feature vector - - Feature vector to get instance text for - Instance text - - - - Called just before the first training vectors are consumed - - - - - Consumes training feature vectors - - - - - - Called just before learning takes place - - - - - Called after learning takes place - - - + - Gets the index of the space character that comes before the feature-value pairs + Closes this transform, releasing resources - Feature vector line - Index of space - + - Write instance file to classify + Saves this transform to disk - Feature vectors to be classified - + - Called just after classification takes place + Gets or sets whether or not this transform is locked (default: false) - Feature vectors that were classified - + - Loads supporting model files that allow this classifier to classify feature vectors + Available acess methods - + - Gets the name of the training instances file + All data is stored in memory - + - Gets the feature name transform file name + Feature name hashes are stored in memory, but numeric values are on disk - + - Gets the feature space file name + Nothing is stored in memory - the transform file is searched using a binary search - + - Gets the label map file name + Constructor + Search handler - + - Gets the model file name + Initializes this disk-based transform - + - Gets the name of the instances to classify file + Tries to get the 1-based feature number given a feature name + Name of feature to transform + Feature number (output) + True if feature number was retrieved and false otherwise - + - Gets the label for instances for which the class is unknown + Not implemented + + + - + - Gets the newline sequence used by this classifier + Saves any memory-based storage to disk and reloads disk-based transform + Where to save transform - + - Gets the name transform access method + Closes the transform - + - Gets the feature space access method + Gets or sets whether or not this transform is locked - + - Gets or sets the feature space condensation method (default: DiskBased) + Constructor + Path to transform file, or null if no initial transform is to be used - + - Gets whether or not to scale numeric feature values + Base class for all classes whose instances may be classified by an instance of Classifier. - + - Gets the path to the file containing training instances + Constructor - + - Gets the path to the feature name transform + Compares this scored entity to another based on its prediction confidence + Entity to compare this one to + - + - Gets the path to the feature space file + Returns the true class of this entity + - + - Gets the path to the feature space range search file + Gets or sets whether or not this entity corresponds to a zero-vector - + - Gets the path to the label map + Gets or sets the prediction confidence scores - + - Gets the label map used in this classifier + Gets the predicted class - + - Gets labels used by this classifier + Gets the confidence of the predicted class - + - Gets the path to the model + Gets or sets the true class - + - Gets the path to the file containing the instances to classify + Gets or sets the list that contains this entity - + - Gets the model files used by the implementing class + Gets the rank of this entity (1-based) - + - Gets or sets the starting size of the memory-based feature name transform. In order to take effect, this must - be set before the first training vectors are consumed. Will throw an exception if set when using disk-based - feature name transformation. + Represents a list of classifiable entities - + - Gets or sets whether to delete the training instances file after learning has completed (default: false) + Splits positive/negative data into training/testing sets + Corpus of positive instances + Corpus of negative instances + Whether or not to balance pos/neg training data + Training documents + Testing documents + Fraction of data to use as training + Whether or not to randomize data - + - Gets whether a solver is probabilistic + Constructor - - - + - Gets the solver type for a the model ID given in the model file + Constructor - ID from model file - Solver type + Initial capacity of list - + - Applies classification predictions to a list of feature vectors + Constructor - Path to predictions file - Feature vectors to apply predictions to - Whether or not probabilities were output - Label map to use + Entities to add to list upon construction - + - Gets feature weights from a LibLinear model file. First key is the class label, the second key is the 1-based feature number - and the value is the weight. For a two-class problem, there is only one class label in the first key, and that is the label - first encountered in the model file. For a multi-class problem, there is a key for each class label. + Randomizes this list - Path to LibLinear model file - Feature weights - + - Creates a CSV file from a LibLinear model + Gets index of an entity - - + ClassifiableEntity to get index of + Index of entity - + - Quotes a string if needed for use in CSV + Adds an entity to this list - - + Entity to add - + - Constructor + Adds a range of entities to this list - Solver to use - Method of access for feature name transform - Method of access for feature space - Scale numeric feature values - Directory to store model files in - Path to LibLinear learn executable - Path to LibLinear classify executable - Feature extractor to use - Confidence threshold for labels + Entities to add - + - Gets learn process arguments + Clears entities from this list - Learn process arguments - + - Gets the index of the space character that comes before the feature-value pairs + Checks whether or not this list contains an entity - Feature vector - Index of space + ClassifiableEntity to check for + True if this list contains the entity, false otherwise - + - Gets arguments for learn process + Gets enumerator over entities in this list - Arguments for learn process + Enumerator - + - Applies predictions and cleans up + Removes a range of entities from this list - Feature vectors that have been classified + Index at which to start removing + Number of entities to remove - + - Gets the name of the predictions file name + Gets a range of entities from this list + Index at which to start getting entities + Number of entities to get - + - Gets the label for instances for which the true class is unknown + Gets enumerator over entities in this list + - + - Gets the type of solver used + Gets the entity at a specified index + Index of entity to get + ClassifiableEntity - + - Gets or sets the cost parameter + Gets the number of entities in this list - + - Gets or sets the epsilon parameter + Reads SvmLight-style feature vector text files - + - Gets or sets the bias parameter + Gets feature vectors from a file + Path to file from which to get vectors + List of feature vectors - + - Gets or sets the number of cross-validation folds to use + Reads vector lines from an ARFF file - + - Gets or sets whether or not to output classification probabilities (only valid for logistic regression classifier) + Gets feature vectors from an ARFF file + + - + - Gets the path to the file to be written with predictions + Represents a feature space that can be searched using a binary search over a file. This is a read-only feature space. - + - Gets a list of files used in the current model + Provides disk-based access to a feature space. Creates an auxiliary file that maps feature names to their ranges - numerical + ranges in the case of numerical features, and byte ranges in the case of nominals features, where the byte range specifies + a portion of the feature space file to search for the feature value. - + - Gets or sets the per-class weights + Represents a feature spaces that FeatureVectors reside in - + - Types of LibLinear solvers + Condenses a feature space file. When multiple feature spaces are appended to the same file, the same feature can be listed + multiple times. This results in redundancies that must be removed for proper operation over the feature space file. + Feature space file to condense + Output file for condensed feature space (may be the same as the input path) + Method of condensing the feature space - + - L2-regularized primal logistic regression (s=0) + Constructor - + - L2-regularized L2-loss dual SVM (s=1) + Clears this feature space and releases any resources held by it - + - L2-regularized L2-loss primal SVM (s=2) + Gets whether or not this space contains a feature - + - L2-regularized L1-loss dual SVM (s=3) + Gets whether or not this space contains a feature/value pair + Feature to check + Value to check + True if feature/value pair is present, false otherwise - + - Multi-class SVM by Crammer and Singer (s=4) + Gets the range of a numeric feature value + Numeric feature to get range for + Minimum value of range + Maximum value of range - + - L1-regularized L2-loss SVM (s=5) + Scales a numeric feature value to be within [-1,1] based on the observed range of the feature in the training data. This + isn't guaranteed, as the given feature value might be outside the feature's observed range range defined in this space, in + which case the value might be outside of [-1,1]. The range of [-1,1] is usually appropriate, since many classifiers will + assume a value of 0 for missing features. The value 0 in the range [-1,1] is uninformative for any class and thus + appropriate for features missing a value. + Numeric feature to scale + Value to scale + Scaled value - + - L1-regularized logistic regression (s=6) + Gets or sets whether or not this feature space is locked (default: false) - + - L2-regularized dual logistic regression (s=7) + Gets number of features in this space - + - Reads LibLinear-style feature vector files + Access methods - + - Gets feature vector strings from a file + In-memory access - Path to file from which to get vectors - List of feature vector strings - + - EvaluationCurve class + Hash search-based access - + - Gets the average curve + Binary search-based access - - - + - Gets the average curve + Methods for condensing feature spaces - - - + - Gets the last evaluation point in this curve + Uses little memory, but creates large numbers of files on disk - + - Provides evaluation pairs to evaluation routines. An evaluation pair contains the true entity and the - entity that should be automatically classified. + Creates no auxiliary files, but uses lots of memory. Only recommended for small feature spaces. - + Constructor - ID for this provider - + - Starts this provider at the beginning of the sequence of evaluation pairs + Creates an auxiliary file that maps feature names to their ranges - numerical ranges in the case of numerical features, + and byte ranges in the case of nominals features, where the byte range specifies a portion of the feature space file to + search for the feature value. + Path to feature space for which to create range file + Whether or not to create a range file in which the feature names are sorted. This is required, + for example, in the case of binary searches over ordered data + Path to range file that was created - + - Gets the next evaluation pair + Gets whether or not this space contains a feature - Next evaluation pair + Feature to check for + True if feature is contained, false otherwise - + - Gets or sets the ID of this provider + Gets whether or not this feature space contains a feature/value pair + Feature to check + Value of feature + True if feature/value pair is not present - + - Wrapper class for Cluto toolkit + Gets the search value prefix for a feature-value query + Feature to get prefix for + Search value prefix for a feature-value query - + - Static constructor + Closes the feature space files - + - Gets features + Gets the range of a numeric feature value - - + Numeric feature to get range for + Minimum value of range + Maximum value of range - + - Constructor + Gets or sets the feature space search - + - Writes feature vectors to Cluto matrix and creates row class file + Gets or sets the feature range search - Feature vectors to write - Path of file to write - Path of row class file to write - Path of column label file to write - Path to file written with the index of zero-vectors - + - Creates HPCC submission script for Cluto clusterings + Gets the number of features in this feature space - Name of matrix file - Name of row class file - Name of column label file - Where to write submission script - Start number of clusters - End number of clusters - Cluster number increment - Specific cluster numbers to do - + - Clusters a list of feature vectors using the output of Cluto + Gets whether or not the feature space is locked (always true, cannot be set to false) - Feature vectors to cluster - ID of clustering - Cluto solution path - Standard output of Cluto - Path to file containing indexes of zero-vectors - Cluto clustering solution - + - Gets floating point z-score from string value + Constructor - - + Path to feature space file that is to be searched - + - Clustering methods + The binary search feature space does not need to do feature-value prefixing because it does not do any tricky + indexing of feature values. It simply conducts a binary search for a feature value within a byte range. This + function always returns the empty string. + Feature to get prefix for + Empty string - + - Criterion functions + Represents a feature space that can be searched using a hash-based search - + - Similarity functions + Constructor + Path to feature space file - + - Cluster selection heuristics + Gets the search value prefix for a feature, which is just the feature name itself with a space on the end to + separate it from the value. + Feature to get feature value prefix for + Feature value prefix - + - Utility routines for cross-fold validation + Gets the search value prefix for a feature, which is just the feature name itself with a space on the end to + separate it from the value. + Feature to get feature value prefix for + Feature value prefix - + - Gets the evaluation items to be used, assuming an n-fold cross-validation setup + Represents a feature space in memory - - - - - + - Binary support vector machine implementation provided by Weka + Dictionary of features, keyed/valued by the same feature. This is used because feature lookup is done often and + needs to be quick. The dictionary is valued on the same feature because Feature hash codes are computed on the + basis of the Feature name, so to look up a feature by name when all we have is some other feature with the + same name, we need a value that is a reference to the intended feature. - + Constructor - Feature extractor to use - Model directory - Path to Java executable - Path to Weka jar file - - - - GetLearnProcessArguments - - - + - Whether or not to use an RBF kernel (default: false) + Constructor + Initial capacity of feature space - + - Gets or sets the gamma parameter for RBF kernels (default: 0.01) + Constructor + Path to feature space file - + - Gets the class for Weka SVMs + Adds a feature to this space. If the feature already exists and is a nominal feature, the existing feature's range + is updated with new values from the given nominal feature. If the feature already exists and is a numeric feature, + the existing numeric feature's range is updated to include the given feature's range. + Feature to add - + - Represents features with infinite numeric domains + Adds another feature space to this one. Same as calling MemoryFeatureSpace.Add on each feature in the given feature space. + Feature space to add to this one - + - Abstract base class for all feature classes + Adds features from a file to this feature space. File must be open and positioned at the start of a feature declaration. + File from which to read - + - Constructor + Removes a feature from this space - Name of feature. May not contain spaces. + Feature to remove - + - Updates the range of this feature + Saves this feature space to file - + Path to file where feature space should be saved + Whether or not to append the current feature space to the given file, if it exists. If this is true, + the feature space will need to be condensed with FeatureSpace.Condense before it can used. - + - Checks whether this feature equals another + Gets the feature from this space that corresponds to a given feature. The matching criterion + is the feature name. - Other feature to check - True if features are equal, false otherwise + Feature to get + Matching feature from the current space - + - Gets hash code for this feature + Tries to get the feature from this space that corresponds to a given feature. The matching criterion + is the feature name. - Hash code + Feature whose corresponding feature from this list should be returned + Feature from this space corresponding to given feature + True if feature was found, false otherwise - + - Gets a deep copy of this feature + Clears this feature space and releases the internal feature collection - + - Renames the current feature, returning a new feature. + Gets whether or not this space contains a feature - New feature name - New feature + Feature to check for + True if feature is contained, false otherwise - + - Gets name of feature + Gets whether or not this space contains a feature/value pair. If the feature is nominal, the value must be in it's range. + If the feature is numeric, the feature value must parse as a double and be in the numeric range. - + Feature to check + Value to check + True if feature/value pair is present, false otherwise - + - Compares this feature to another feature on the basis of feature names + Gets the range of a numeric feature value - Other feature - + Numeric feature to get range for + Minimum value of range + Maximum value of range - + - Gets or sets the name + Gets enumerator over features in this space + Enumerator over features in this space - + - Constructor + Gets enumerator over features in this space - Name of feature + Enumerator over features in this space - + - Constructor + Gets the number of features in this feature space - Name of feature - Minimum value of this feature - Maximum value of this feature - + - Updates the range of this numeric feature + Represents a feature vector in string form - - + - Gets a deep copy of this numeric feature + Constructor - Feature copy + True class of vector + Line of text representing features - + - Renames the current feature, returning a new feature. + Gets or sets the list of features - New name - New feature - + - Gets whether or not this numeric feature equals another feature + Extracts features from FeatureVectorStrings that are in SvmLight format - Other feature - True if both features are numeric with the same name - + - Gets hash code for this feature + Constructor - Hash code - + - Gets whether or not a value is within the range of this numeric feature + Gets a feature vector from a FeatureVectorTextLine object - Value to check - True if the value is in the range, false otherwise + Object to get feature vector from + Number of features per entity + FeatureVector - + - Updates the range on this feature + Represents a cluster of feature vectors - Minimum value - Maximum value - + - Gets or sets the minimum value of this feature + Constructor + ID of cluster - + - Gets or sets the maximum value of this feature + Gets or sets the ID of this cluster - + - Gets feature vectors for time slices + Gets the size of this cluster - + - Gets name for a feature + Gets or sets the feature vectors in this cluster - Feature to get name for - Whether or not to get an abbreviated name - Feature name - + - Available features. New features should always be added to the end of this list - because the enumeration numbers are used as feature identifiers and must remain constant. + Compares two clusters using their IDs - + - Represents a Cluto clustering feature + Compares two clusters using their IDs + + + - + - Constructor + Represents a clustering solution - Name of feature - Amount of similarity this feature accounts for in its cluster - + - Not implemented + Loads a clustering solution from disk - + Path of file from which to load solution + Clustering solution - + - Not implemented + Constructor - + - + - Not implemented + Gets cluster with given ID - - + ID of cluster to get + Cluster - + - Represents a list of classifiable entities + Tries to get cluster with given ID + ID of cluster to get + + - + - Splits positive/negative data into training/testing sets + Adds a cluster to this solution - Corpus of positive instances - Corpus of negative instances - Whether or not to balance pos/neg training data - Training documents - Testing documents - Fraction of data to use as training - Whether or not to randomize data + - + - Constructor + Saves this clustering solution to disk + Path of file to save solution to - + - Constructor + Gets enumerator over clusters in this solution - Initial capacity of list + Enumerator over clusters in this solution - + - Constructor + Gets the number of clusters contained in this solution - Entities to add to list upon construction - + - Randomizes this list + Gets or sets the ID for this solution - + - Gets index of an entity + Gets the average cluster size of this solution - ClassifiableEntity to get index of - Index of entity - + - Adds an entity to this list + Wrapper class for Cluto toolkit - Entity to add - + - Adds a range of entities to this list + Static constructor - Entities to add - + - Clears entities from this list + Gets features + + - + - Checks whether or not this list contains an entity + Constructor - ClassifiableEntity to check for - True if this list contains the entity, false otherwise - + - Gets enumerator over entities in this list + Writes feature vectors to Cluto matrix and creates row class file - Enumerator + Feature vectors to write + Path of file to write + Path of row class file to write + Path of column label file to write + Path to file written with the index of zero-vectors - + - Removes a range of entities from this list + Creates HPCC submission script for Cluto clusterings - Index at which to start removing - Number of entities to remove + Name of matrix file + Name of row class file + Name of column label file + Where to write submission script + Start number of clusters + End number of clusters + Cluster number increment + Specific cluster numbers to do - + - Gets a range of entities from this list + Clusters a list of feature vectors using the output of Cluto - Index at which to start getting entities - Number of entities to get + Feature vectors to cluster + ID of clustering + Cluto solution path + Standard output of Cluto + Path to file containing indexes of zero-vectors + Cluto clustering solution - + - Gets enumerator over entities in this list + Gets floating point z-score from string value + - + - Gets the entity at a specified index + Clustering methods - Index of entity to get - ClassifiableEntity - + - Gets the number of entities in this list + Criterion functions - + - Provides training instances + Similarity functions - + - Constructor + Cluster selection heuristics - Instance filter to use when providing training instances - + - Applies filter to an instance + Represents a Cluto cluster - Instance to apply filter to - True if instance passes filter, false otherwise - + - Gets or sets the instance filter used in this provider + Constructor + ID of cluster - + - Delegate for functions that determine which instances should be used for training and what their true labels are + Gets or sets the average internal similarity of vectors in this cluster - Instance to apply filter to - True label of instance, if not filtered out - Whether or not to use instance for training - + - Represents a generative HMM + Gets or sets the standard deviation of the internal similarity of vectors in this cluster - + - Represents + Gets or sets the average external similarity of cluster - + - Constructor + Gets or sets the standard deviation of the external similarity - - - + - Creates a state + Gets or sets the descriptive features for this cluster - - - - + - Gets states at a time index + Gets or sets the discriminative features for this cluster - Time at which to get states - States - + - Gets the observation at a given time + Represents a Cluto clustering solution - Observation at the given time - + - Runs the model, calculating Viterbi and forward probabilities. + Constructor + ID of this solution - + - Gets the forward probability of a state at a time, given a previous state. + Gets or sets the value of the criterion function for this solution - - - - - + - Gets the Viterbi probability of a state at a time, given a previous state. + Gets or sets the clustering method - - - - - + - Decodes the most likely state sequence + Gets or sets the cluster selection heuristic - - + - Gets observations + Gets or sets the criterion function - + - Gets the start states + Gets or sets the similarity function - + - Gets the end states + Gets the average internal similarity of the clusters - + - Gets the most likely end state + Gets the average standard deviation of internal similarity scores of the clusters - + - Gets number of time steps in the model + Gets the average external similarity of the clusters - + - Gets the number of states in each time step + Gets the average standard deviation of external similarity scores of the clusters - + - Gets the state IDs + Compares to Cluto clusterings based on their criterion function values - + - Computes transition probabilities from transition counts. Counts must already be smoothed. + Compares to Cluto clusterings based on thier criterion function values - Transition counts - Transition probabilities + + + - + - Computes transition probabilities from transition counts. Counts must already be smoothed. + Represents a Cluto clustering feature - Transition counts - Number of times each state is the source of a transition - Number of times each state is the destination of a transition - Total number of transitions - Transition probabilities - + Constructor - Transition probability matrix - Observation probabilities - State names - Observations - Initial state probabilities + Name of feature + Amount of similarity this feature accounts for in its cluster - + - Creates a state for the HMM + Not implemented - - - + - + - Gets forward probability + Not implemented - - - - + - Gets Viterbi probability + Not implemented - - - + - + - Represents a feature vector in string form + Represents a feature vector used by the Cluto toolkit - + - Base class for all classes whose instances may be classified by an instance of Classifier. + Represents a sparse vector of features - + Constructor + Entity this vector is derived from - + - Compares this scored entity to another based on its prediction confidence + Constructor - Entity to compare this one to - + Entity this vector is derived from + Number of features this vector will contain - + - Returns the true class of this entity + Adds a feature/value pair to this vector - + Feature to add + Value of feature to add + Whether or not to update the stored range on the added feature - + - Gets or sets whether or not this entity corresponds to a zero-vector + Adds feature/value pairs from a vector to this vector + Vector whose feature/value pairs should be added to this one - + - Gets or sets the prediction confidence scores + Removes a feature from this vector + Feature to remove - + - Gets the predicted class + Removes a feature from this vector + Name of feature to remove - + - Gets the confidence of the predicted class + Gets whether or not this feature vector contains a feature + Feature to check + True if feature is present, false otherwise - + - Gets or sets the true class + Gets whether or not this feature vector contains a feature by name + Feature name to check + True if feature is present, false otherwise - + - Gets or sets the list that contains this entity + Tries to get a feature value from this vector + Feature to get value for + Value of feature + True if value was retrieved, false otherwise - + - Gets the rank of this entity (1-based) + Tries to get a feature value from this vector by name + Feature name to get value for + Value of feature + True if value was retrieved, false otherwise - + - Constructor + Clears all feature/value pairs from this vector - True class of vector - Line of text representing features - + - Gets or sets the list of features + Normalizes the current vector to be of unit length. This only works if all feature values can be casted into floats. - + - Represents a feature space that can be searched using a hash-based search + Gets printable string value of this vector + - + - Constructor + Restricts the feature space of this vector to conform with the given feature space. Features in this vector that are + not contained in the feature space will be removed. For restrictions on the feature values, see the parameters. - Path to feature space file + Feature space to use + Whether or not to require nominal features in this vector to have values that are + present in the range of the corresponding feature in the given feature space. + Whether or not to require numeric features in this vector to have values that are + within the range of the corresponding feature in the given feature space. - + - Gets the search value prefix for a feature, which is just the feature name itself with a space on the end to - separate it from the value. + Gets enumerator over features in this vector - Feature to get feature value prefix for - Feature value prefix + Enumerator over features in this vector - + - Gets the search value prefix for a feature, which is just the feature name itself with a space on the end to - separate it from the value. + Gets enumerator over features in this vector - Feature to get feature value prefix for - Feature value prefix + Enumerator over features in this vector - + - Represents a numeric feature in Weka + Gets the Euclidean length of this vector. All feature values must be castable to floats. - + - Represents a feature in Weka + Gets the value of a given feature + Feature to get value for + Value of feature - + - Gets the value to use when an instance is missing a feature + Gets the value of a given feature + Name of feature + Value of feature - + - Constructor + Gets number of features in this vector - - - + - Constructor + Gets the collection of features used in this vector - - - - - + - Gets copy + Gets or sets the entity from which this feature vector is derived - - + - Renames + Constructor - - + Entity this vector is derived from + Internal z-score + External z-score - + - Gets value to use when feature is missing + Gets or sets the internal z-score for this vector - + - Represents a two-dimensional confusion matrix + Gets or sets the external z-score for this vector - + - Constructor + Compares two feature vectors using the values of their internal z-scores - Class labels to use in matrix - + - Constructor + Compares two feature vectors using the values of their internal z-scores - Class labels to use in matrix + First vector + Second vector + - + - Constructor. Reads a confusion matrix from file. Valid files are those produced by WriteReport - or those containing text returned by GetTabular. + Compares two feature vectors using the values of their external z-scores - Path to file - + - Constructs the matrix with a set of labels + Compares two feature vectors using the values of their external z-scores - Labels to use + First vector + Second vector + - + - Checks whether this matrix contains a label + Compares two feature vectors using a combination of the internal and external z-scores - Label to check - True if label is contained, false otherwise. - + - Adds a classification result to this matrix + Compares two feature vectors using a combination of the internal and external z-scores - True label of classification - Predicted label of classification + First vector + Second vector + - + - Adds instance classifications to this confusion matrix + Maps class labels to their confidence scores - True labels for instance - Predicted labels for instance - Label to use when no prediction was made for the instance - + - Gets the number of true positives for a class (i.e., the number of items from the given class that - were classified as being in the given class) + Constructor - Class to get true positives for - Number of true positives - + - Gets the number of true negatives for a class (i.e., the number of items from a class other than the given one was - classified as something other than the given one) + Gets the predicted (highest-scoring) class for this set of confidence scores - Class to get the number of true negatives for - Number of true negatives - + - Gets the number of false positives for a class (i.e., the number of items from another class that were - misclassified as being in the given class) + Gets the confidence for the predicted class in this set of confidence scores - Class to get false positives for - Number of false positives - + - Gets the number of false negatives for a class (i.e., the number of times items from the given class - that were misclassified as being in another class) + Represents an evaluation pair, which comprises a true entity and an entity that should be automatically classified. - Class to get false negatives for - Number of false negatives - + - Gets precision for a class + Constructor - Class to get precision for - Precision for given class + True entity of this pair + Predicted entity of this pair - + - Gets precision across all classes + Gets or sets the true entity for this pair - Precision over all classes - + - Gets overall precision for particular classes + Gets or sets the predicted entity for this pair - Labels of classes to get overall precision for - Overall precision - + - Gets recall for a class + Provides evaluation pairs to evaluation routines. An evaluation pair contains the true entity and the + entity that should be automatically classified. - Class to get recall for - Recall for given class - + - Gets overall recall for particular classes + Constructor - Labels of classes to get overall recall for - Overall recall + ID for this provider - + - Gets F-measure for a class using beta=1 + Starts this provider at the beginning of the sequence of evaluation pairs - Class to get F-measure for - F-measure for given class - + - Gets F-measure for a class using a specific beta + Gets the next evaluation pair - Class to get f-measure for - Beta value to use - F-measure for given class and beta + Next evaluation pair - + - Gets overall f-measure across all classes using beta=1 + Gets or sets the ID of this provider - Overall f-measure - + - Gets overall f-measure for a set of classes using beta=1 + Represents a list of feature vectors - Labels of classes to get overall f-measure for - Overall f-measure - + - Gets overall f-measure for a set of classes using beta=1 + Constructor - Labels of classes to get overall f-measure for - Overall f-measure + Initial capacity of the list - + - Gets overall f-measure for a set of classes + Constructor - Labels of classes to get overall f-measure for - Beta parameter - Overall f-measure + Vectors to initialize this list with - + - Gets the macro-averaged f-measure for a set of classes + Constructor - Classes to get macro-averaged f-measure for - Beta value - + Feature vectors + Number in enumeration - + - Gets the accuracy of predictions in the matrix + Adds a vector to this list - + Feature vector to add - + - Gets the most confused classes + Adds vectors to this list - Get top n most confused classes - + Feature vectors to add - + - Gets total number of predictions made for items that actually belong to the given class + Removes a feature vector at an index - Class to get number of predictions for - Number of predictions + - + - Gets the number of predictions for a particular true/predicted label combination + Removes a vector from this list - True label to get predictions for - Predicted label to get predictions for - Number of such predictions + - + - Gets confusion matrix in tabular form + Gets the feature space instantiated by the vectors in this list - Confusion matrix in tabular form + Feature space - + - Gets confusion matrix in tabular form + Clears vectors from this list - Labels to include in table - Confusion matrix in tabular form - + - ToString override. Gets confusion matrix in tabular form. + Gets an enumerator over vectors in this list - Confusion matrix in tabular form + Enumerator over vectors in this list - + - Writes confusion matrix report to file. Includes all classes in the tabular and per-class stats. + Calls RestrictFeatureSpace on all vectors in this list with the given feature space - File to write report to + Feature space to use + Whether or not to require nominal features in this vector to have values that are + present in the range of the corresponding feature in the given feature space. + Whether or not to require numeric features in this vector to have values that are + within the range of the corresponding feature in the given feature space. - + - Writes report to file + Inserts a feature vector at the given index - File to write report to - Class labels to include in the tabular output - Class labels to write per-class stats for + Index + Feature vector - + - Merges this matrix with another + Gets an enumerator over feature vectors in this list - Matrix to merge this one with - Merged matrix + An enumerator over feature vectors in this list - + - Treats the two dimensions of the confusion matrix as annotators and treats the cells of the matrix as - their annotations. Computes Cohen's Kappa agreement statistic. + Gets an enumerator over feature vectors in this list - Cohen's Kappa statistic + An enumerator over feature vectors in this list - + - Gets or sets the threshold associated with this matrix. This is not set within the constructor. This member is not used within - the ConfusionMatrix class. It is provided to external users of this class for bookkeeping purposes. Default: float.NaN + Gets a vector in this list + Index of vector to get + FeatureVector - + - Gets predicted labels/counts for a true label + Gets number of vectors - True label for which to get predicted labels (and their counts) - Predicted labels/counts - + - Gets all class labels used in this matrix + Represents a list of FeatureVectorStrings - + - Gets total number of classifications in this matrix + Stores (in memory) mapping of feature name hashes to positions on disk - + - Gets the number of class labels in this matrix + Constructor + Path to transform file, or null if no initial transform is to be used - + - Decision tree classifier + Represents a time slice that can be classified - + Constructor - Feature extractor - Model directory - Path to Java executable - Path to Weka jar file + + + - + - Gets the class for Weka decision trees + Gets the DHMM - + - Transforms feature names into 1-based integer numbers. Everything is stored in memory. + Gets the previous state - + - Constructor + Gets the time - + - Constructor + Gets feature vectors for time slices - Path to transform file - + - Constructor + Gets name for a feature - Initialize size of transform + Feature to get name for + Whether or not to get an abbreviated name + Feature name - + - Constructor + Available features. New features should always be added to the end of this list + because the enumeration numbers are used as feature identifiers and must remain constant. - Initialize size of transform - Starting value - + - Loads the transform from disk + Represents a generative HMM - Path to load from - + - Tries to get a feature number for a feature name, failing only if the transform is locked and the feature name is not recognized. + Computes transition probabilities from transition counts. Counts must already be smoothed. - Name of feature to try to get number for - Number of feature, if successful - True if number was successfully retrieved, false otherwise + Transition counts + Transition probabilities - + - Tries to get the feature name for a feature number + Computes transition probabilities from transition counts. Counts must already be smoothed. - - - + Transition counts + Number of times each state is the source of a transition + Number of times each state is the destination of a transition + Total number of transitions + Transition probabilities - + - Clears this name transform. Further use will be possible via the typical methods. + Constructor + Transition probability matrix + Observation probabilities + State names + Observations + Initial state probabilities - + - Closes this name transform. Further use will not be possible. + Creates a state for the HMM + + + - + - Saves this transform to disk + Gets forward probability - Path to save transform to + + + + - + - Gets enumerator over list of feature names in this transform. Feature names are not sorted. + Gets Viterbi probability + + + + - + - Gets the number of features in this transform + Represents a state in a generative HMM - + - Gets sorted list of feature names + Constructor + State of node + Time of node - + - Represents a time slice that can be classified + Provides miscellaneous routines for working with the High Performance Computing Center - + - Constructor + Creates an HPCC job submission startup script for all training instance files at or below a directory. The training instances files + must be named "training_instances". - - - + Directory to search recursively for training instance files - + - Gets the DHMM + Scans directory recursively for training instance files + Path to training directory + Path to submission script + Path to top-level training directory + Maximum number of submissions per file + Number of submissions created so far - + - Gets the previous state + Gets path for next script + Current script + Path to next submissions script - + - Gets the time + Maps class labels to a form usable by a classifier - + - Stores (in memory) mapping of feature name hashes to positions on disk + Constructor. The resulting LabelMap will be unlocked. + Type of mapping to perform - + Constructor - Path to transform file, or null if no initial transform is to be used + Path to saved label map - + - Represents a list of feature vectors + Adds a mapping + Unmapped label + Mapped label - + - Constructor + Gets the mapped label for an unmapped label - Initial capacity of the list + Label to get mapped label for + Mapped label - + - Constructor + Gets unmapped label for a mapped label - Vectors to initialize this list with + Mapped label to get unmapped label for + Unmapped label - + - Constructor + Saves this map to disk - Feature vectors - Number in enumeration + Where to write map to - + - Adds a vector to this list + Clears this label map - Feature vector to add - + - Adds vectors to this list + Checks whether this map contains a mapped label for a given unmapped label - Feature vectors to add + Label to check for + True if such a label exists, false otherwise - + - Removes a feature vector at an index + Gets or sets whether or not this LabelMap is locked (default: false) - - + - Removes a vector from this list + Gets unmapped labels, which are used by the application - - + - Gets the feature space instantiated by the vectors in this list + Gets mapped labels, which are used by the classifier - Feature space - + - Clears vectors from this list + Mapping types - + - Gets an enumerator over vectors in this list + Perform no mapping. Directly use the given label. - Enumerator over vectors in this list - + - Calls RestrictFeatureSpace on all vectors in this list with the given feature space + Map labels to 1-based increasing integers - Feature space to use - Whether or not to require nominal features in this vector to have values that are - present in the range of the corresponding feature in the given feature space. - Whether or not to require numeric features in this vector to have values that are - within the range of the corresponding feature in the given feature space. - + - Inserts a feature vector at the given index + Transforms feature names into 1-based integer numbers. Everything is stored in memory. - Index - Feature vector - + - Gets an enumerator over feature vectors in this list + Constructor - An enumerator over feature vectors in this list - + - Gets an enumerator over feature vectors in this list + Constructor - An enumerator over feature vectors in this list + Path to transform file - + - Gets a vector in this list + Constructor - Index of vector to get - FeatureVector + Initialize size of transform - + - Gets number of vectors + Constructor + Initialize size of transform + Starting value - + - Extracts features from FeatureVectorStrings that are in SvmLight format + Loads the transform from disk + Path to load from - + - Constructor + Tries to get a feature number for a feature name, failing only if the transform is locked and the feature name is not recognized. + Name of feature to try to get number for + Number of feature, if successful + True if number was successfully retrieved, false otherwise - + - Gets a feature vector from a FeatureVectorTextLine object + Tries to get the feature name for a feature number - Object to get feature vector from - Number of features per entity - FeatureVector + + + - + - Reads SvmRank-style feature vector text files + Clears this name transform. Further use will be possible via the typical methods. - + - Gets feature vectors from a file + Closes this name transform. Further use will not be possible. - Path to file from which to get vectors - List of feature vectors - + - Provides access to Svm-Light server application + Saves this transform to disk + Path to save transform to - + - Constructor + Gets enumerator over list of feature names in this transform. Feature names are not sorted. - Method of access to use for feature name transform - Method of access to use for feature space - Whether or not to scale numeric feature values when classifying new instances - Model directory for this client. This directory must have a file named connection_params in it, - which has two lines. The first gives the host address, the second gives the host port. - Feature extractor to use - Label confidence threshold - + - Applies current predictions to a list of feature vectors + Gets the number of features in this transform - Feature vectors to apply predictions to - + - Gets the label used for instances for which the true class is not known + Gets sorted list of feature names - + - Represents non-numeric features + Wrapper for the SVM Light classifier - + - Constructor + Applies classification predictions to a list of feature vectors - Name of feature + Path to predictions file + Feature vectors to apply predictions to + Label map to use - + Constructor - Name of feature - Initial range size + Method of access for feature name transform + Method of access for feature space + Scale numeric feature values + Directory to store model files in + Path to LibLinear learn executable + Path to LibLinear classify executable + Feature extractor to use + Confidence threshold for labels - + - Constructor + Called just before the first training vectors are consumed - Name of feature - Elements to initialize range with - + - Updates the range of this nominal feature + Gets the index of the space character that comes before the feature-value pairs - + Feature vector + Index of space - + - Checks whether or not a value is in the range of this feature + Gets learn executable process arguments - Value to check - Try if value is in the range, false otherwise + - + - Adds a value to this feature's range, or does nothing if the value already exists in the range + Gets classify executable process arguments - Value to add - True if value was added as new, false if it was already in the range + - + - Gets a deep copy of this nominal feature + Applies predictions and cleans up - NominalFeature + Feature vectors that have been classified - + - Renames the current feature, returning a new feature. + Gets the name of the predictions file name - New name - New feature - + - Gets whether or not this nominal feature equals another feature + Gets the label for instances for which the true class is unknown - Other feature - True if both features are nominal with the same name - + - Gets hash code for this feature + Gets or sets whether or not to use the default C parameter - Hash code - + - Gets the range of values for this nominal feature + Gets or sets whether or not to use the default gamma parameter - + - Represents a Cluto clustering solution + Tradeoff between training error and margin - + - Represents a clustering solution + Gets or sets the kernel type - + - Loads a clustering solution from disk + Gets or sets the degree of polynomial kernels - Path of file from which to load solution - Clustering solution - + - Constructor + Gets or sets the gamma parameter for RBF kernels - - + - Gets cluster with given ID + Gets the path to the predictions file - ID of cluster to get - Cluster - + - Tries to get cluster with given ID + Gets files used in SVM Light models - ID of cluster to get - - - + - Adds a cluster to this solution + Kernel types - - + - Saves this clustering solution to disk + Linear kernel - Path of file to save solution to - + - Gets enumerator over clusters in this solution + Polynomial kernel - Enumerator over clusters in this solution - + - Gets the number of clusters contained in this solution + RBF kernel - + - Gets or sets the ID for this solution + Sigmoid tanh kernel - + - Gets the average cluster size of this solution + Provides access to Svm-Light server application - + Constructor - ID of this solution + Method of access to use for feature name transform + Method of access to use for feature space + Whether or not to scale numeric feature values when classifying new instances + Model directory for this client. This directory must have a file named connection_params in it, + which has two lines. The first gives the host address, the second gives the host port. + Feature extractor to use + Label confidence threshold - + - Gets or sets the value of the criterion function for this solution + Applies current predictions to a list of feature vectors + Feature vectors to apply predictions to - + - Gets or sets the clustering method + Gets the label used for instances for which the true class is not known - + - Gets or sets the cluster selection heuristic + Abstract base class for all Weka wrappers - + - Gets or sets the criterion function + Quote to use for values - + - Gets or sets the similarity function + Matches the end quote in a quotes attribute value - + - Gets the average internal similarity of the clusters + Gets the ARFF header for a list of features + Features to get header for + Class labels to write + Attribute declaration - + - Gets the average standard deviation of internal similarity scores of the clusters + Get instance text for a feature vector + Feature vector to get instance text for + Feature order to write + Label map + Instance text for feature vector - + - Gets the average external similarity of the clusters + Escapes an attribute value + Value to escape + Escaped value - + - Gets the average standard deviation of external similarity scores of the clusters + Constructor + Feature extractor to use + Model directory + Path to Java executable file + Path to Weka jar file - + - Compares to Cluto clusterings based on their criterion function values + Clears files from model directory before consuming new training entities - + - Compares to Cluto clusterings based on thier criterion function values + Consumes training vectors - - - + Vectors to consume - + - Represents a nominal feature in Weka + Finishes ARFF file - + - Constructor + GetLearnProcessArguments override - + - + - Constructor + Cleans up after learn process runs - - - + - Constructor + Gets ready to classify feature vectors - - - + Feature vectors to be classified - + - Constructor + Gets classify process's arguments - - - + - + - Gets copy + Applies predictions to feature vectors - + FeatureVectors that were classified - + - Renames + Gets labels used by this classifier - - - + - Gets value to use when feature is missing + Multi-class strategy to use (default: None) - + - Wrapper for the SVM Rank classifier. Any calls to classify assume that the classified feature - vectors are to be ranked against each other. + Whether or not to use the server JVM instead of the client JVM (default: false) - + - Applies predictions from a file to classified feature vectors + Gets or sets whether or not to perform cross validation (default: false) - Prediction output - Feature vectors to apply predictions to - + - Constructor + Gets or sets whether or not to delete the training file after it is used (default: false) - Trade-off between training error and margin - Method of access for feature name transform - Method of access for feature space - Scale numeric feature values - Directory to store model files in - Path to LibLinear learn executable - Path to LibLinear classify executable - Feature extractor to use - + - Gets the index of the space character that comes before the feature-value pairs + Gets command line arguments for the JVM - Feature vector - Index of space - + - Gets learning process arguments + Gets multi-class classifier arguments - - + - Gets classification process arguments + Gets the class for multi-class classification - - + - Called just before classification. Sets the qid for each feature vector to be the same. + Gets the classifier class - Feature vectors to rank - + - Applies predictions and cleans up + Gets the path to the training instances file - Feature vectors that have been classified - + - Gets the name of the predictions file name + Get the path to the classification instances file - + - Gets the label for instances for which the true class is unknown + Gets the file to save label map to - + - Gets the path to the predictions file + Gets the feature name transform save file - + - Gets files used in SVM Light models + Gets the path to the feature space file - + - Wrapper for the SVM Light classifier + Gets the path to the feature order file - + - Applies classification predictions to a list of feature vectors + Gets the model file - Path to predictions file - Feature vectors to apply predictions to - Label map to use - + - Constructor + Gets list of file used in the curren tmodel - Method of access for feature name transform - Method of access for feature space - Scale numeric feature values - Directory to store model files in - Path to LibLinear learn executable - Path to LibLinear classify executable - Feature extractor to use - Confidence threshold for labels - + - Called just before the first training vectors are consumed + Types of multi-class strategies - + - Gets the index of the space character that comes before the feature-value pairs + Decision tree classifier - Feature vector - Index of space - + - Gets learn executable process arguments + Constructor - + Feature extractor + Model directory + Path to Java executable + Path to Weka jar file - + - Gets classify executable process arguments + Gets the class for Weka decision trees - - + - Applies predictions and cleans up + Logistic regression classifier - Feature vectors that have been classified - + - Gets the name of the predictions file name + Constructor + Feature extractor + Model directory + Path to Java executable + Path to Weka jar file - + - Gets the label for instances for which the true class is unknown + Gets the logistic regression class - + - Gets or sets whether or not to use the default C parameter + Binary support vector machine implementation provided by Weka - + - Gets or sets whether or not to use the default gamma parameter + Constructor + Feature extractor to use + Model directory + Path to Java executable + Path to Weka jar file - + - Tradeoff between training error and margin + GetLearnProcessArguments + - + - Gets or sets the kernel type + Whether or not to use an RBF kernel (default: false) - + - Gets or sets the degree of polynomial kernels + Gets or sets the gamma parameter for RBF kernels (default: 0.01) - + - Gets or sets the gamma parameter for RBF kernels + Gets the class for Weka SVMs - + - Gets the path to the predictions file + Represents a two-dimensional confusion matrix - + - Gets files used in SVM Light models + Constructor + Class labels to use in matrix - + - Kernel types + Constructor + Class labels to use in matrix - + - Linear kernel + Constructor. Reads a confusion matrix from file. Valid files are those produced by WriteReport + or those containing text returned by GetTabular. + Path to file - + - Polynomial kernel + Constructs the matrix with a set of labels + Labels to use - + - RBF kernel + Checks whether this matrix contains a label + Label to check + True if label is contained, false otherwise. - + - Sigmoid tanh kernel + Adds a classification result to this matrix + True label of classification + Predicted label of classification - + - Represents a Cluto cluster + Adds instance classifications to this confusion matrix + True labels for instance + Predicted labels for instance + Label to use when no prediction was made for the instance - + - Represents a cluster of feature vectors + Gets the number of true positives for a class (i.e., the number of items from the given class that + were classified as being in the given class) + Class to get true positives for + Number of true positives - + - Constructor + Gets the number of true negatives for a class (i.e., the number of items from a class other than the given one was + classified as something other than the given one) - ID of cluster + Class to get the number of true negatives for + Number of true negatives - + - Gets or sets the ID of this cluster + Gets the number of false positives for a class (i.e., the number of items from another class that were + misclassified as being in the given class) + Class to get false positives for + Number of false positives - + - Gets the size of this cluster + Gets the number of false negatives for a class (i.e., the number of times items from the given class + that were misclassified as being in another class) + Class to get false negatives for + Number of false negatives - + - Gets or sets the feature vectors in this cluster + Gets precision for a class + Class to get precision for + Precision for given class - + - Compares two clusters using their IDs + Gets precision across all classes + Precision over all classes - + - Compares two clusters using their IDs + Gets overall precision for particular classes - - - + Labels of classes to get overall precision for + Overall precision - + - Constructor + Gets recall for a class - ID of cluster + Class to get recall for + Recall for given class - + - Gets or sets the average internal similarity of vectors in this cluster + Gets overall recall for particular classes + Labels of classes to get overall recall for + Overall recall - + - Gets or sets the standard deviation of the internal similarity of vectors in this cluster + Gets F-measure for a class using beta=1 + Class to get F-measure for + F-measure for given class - + - Gets or sets the average external similarity of cluster + Gets F-measure for a class using a specific beta + Class to get f-measure for + Beta value to use + F-measure for given class and beta - + - Gets or sets the standard deviation of the external similarity + Gets overall f-measure across all classes using beta=1 + Overall f-measure - + - Gets or sets the descriptive features for this cluster + Gets overall f-measure for a set of classes using beta=1 + Labels of classes to get overall f-measure for + Overall f-measure - + - Gets or sets the discriminative features for this cluster + Gets overall f-measure for a set of classes using beta=1 + Labels of classes to get overall f-measure for + Overall f-measure - + - Provides miscellaneous routines for working with the High Performance Computing Center + Gets overall f-measure for a set of classes + Labels of classes to get overall f-measure for + Beta parameter + Overall f-measure - + - Creates an HPCC job submission startup script for all training instance files at or below a directory. The training instances files - must be named "training_instances". + Gets the macro-averaged f-measure for a set of classes - Directory to search recursively for training instance files + Classes to get macro-averaged f-measure for + Beta value + - + - Scans directory recursively for training instance files + Gets the accuracy of predictions in the matrix - Path to training directory - Path to submission script - Path to top-level training directory - Maximum number of submissions per file - Number of submissions created so far + - + - Gets path for next script + Gets the most confused classes - Current script - Path to next submissions script + Get top n most confused classes + - + - Represents an evaluation pair, which comprises a true entity and an entity that should be automatically classified. + Gets total number of predictions made for items that actually belong to the given class + Class to get number of predictions for + Number of predictions - + - Constructor + Gets the number of predictions for a particular true/predicted label combination - True entity of this pair - Predicted entity of this pair + True label to get predictions for + Predicted label to get predictions for + Number of such predictions - + - Gets or sets the true entity for this pair + Gets confusion matrix in tabular form + Confusion matrix in tabular form - + - Gets or sets the predicted entity for this pair + Gets confusion matrix in tabular form + Labels to include in table + Confusion matrix in tabular form - + - Maps class labels to their confidence scores + ToString override. Gets confusion matrix in tabular form. + Confusion matrix in tabular form - + - Constructor + Writes confusion matrix report to file. Includes all classes in the tabular and per-class stats. + File to write report to - + - Gets the predicted (highest-scoring) class for this set of confidence scores + Writes report to file + File to write report to + Class labels to include in the tabular output + Class labels to write per-class stats for - + - Gets the confidence for the predicted class in this set of confidence scores + Merges this matrix with another + Matrix to merge this one with + Merged matrix - + - Represents a state in a discriminative HMM + Treats the two dimensions of the confusion matrix as annotators and treats the cells of the matrix as + their annotations. Computes Cohen's Kappa agreement statistic. + Cohen's Kappa statistic - + - Constructor + Gets or sets the threshold associated with this matrix. This is not set within the constructor. This member is not used within + the ConfusionMatrix class. It is provided to external users of this class for bookkeeping purposes. Default: float.NaN - - - + - Classifies binary-labeled feature vectors by assigning them random scores + Gets predicted labels/counts for a true label + True label for which to get predicted labels (and their counts) + Predicted labels/counts - + - Constructor + Gets all class labels used in this matrix - Binary label 1 - Binary label 2 - Minimum confidence value - Maximum confidence value - + - Randomly applies binary labels to a list of feature vectors + Gets total number of classifications in this matrix - Feature vectors to classify randomly - + - Not implemented + Gets the number of class labels in this matrix - + - Gets the labels that can be randomly assigned + EvaluationCurve class - + - Dummy feature extractor - always returns an empty feature vector + Gets the average curve + + - + - Constructor + Gets the average curve + + - + - Always returns an empty feature vector based on the entity passed to it + Gets the last evaluation point in this curve - - - @@ -4077,198 +4206,69 @@ Gets or sets the f-measure for this point - - - Represents a list of FeatureVectorStrings - - - + - Represents a feature space in memory + A strongly-typed resource class, for looking up localized strings, etc. - + - Dictionary of features, keyed/valued by the same feature. This is used because feature lookup is done often and - needs to be quick. The dictionary is valued on the same feature because Feature hash codes are computed on the - basis of the Feature name, so to look up a feature by name when all we have is some other feature with the - same name, we need a value that is a reference to the intended feature. + Returns the cached ResourceManager instance used by this class. - + - Constructor + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. - + - Constructor + Classifies binary-labeled feature vectors by assigning them random scores - Initial capacity of feature space - + Constructor - Path to feature space file - - - - Adds a feature to this space. If the feature already exists and is a nominal feature, the existing feature's range - is updated with new values from the given nominal feature. If the feature already exists and is a numeric feature, - the existing numeric feature's range is updated to include the given feature's range. - - Feature to add - - - - Adds another feature space to this one. Same as calling MemoryFeatureSpace.Add on each feature in the given feature space. - - Feature space to add to this one - - - - Adds features from a file to this feature space. File must be open and positioned at the start of a feature declaration. - - File from which to read - - - - Removes a feature from this space - - Feature to remove - - - - Saves this feature space to file - - Path to file where feature space should be saved - Whether or not to append the current feature space to the given file, if it exists. If this is true, - the feature space will need to be condensed with FeatureSpace.Condense before it can used. - - - - Gets the feature from this space that corresponds to a given feature. The matching criterion - is the feature name. - - Feature to get - Matching feature from the current space - - - - Tries to get the feature from this space that corresponds to a given feature. The matching criterion - is the feature name. - - Feature whose corresponding feature from this list should be returned - Feature from this space corresponding to given feature - True if feature was found, false otherwise - - - - Clears this feature space and releases the internal feature collection - - - - - Gets whether or not this space contains a feature - - Feature to check for - True if feature is contained, false otherwise - - - - Gets whether or not this space contains a feature/value pair. If the feature is nominal, the value must be in it's range. - If the feature is numeric, the feature value must parse as a double and be in the numeric range. - - Feature to check - Value to check - True if feature/value pair is present, false otherwise - - - - Gets the range of a numeric feature value - - Numeric feature to get range for - Minimum value of range - Maximum value of range + Binary label 1 + Binary label 2 + Minimum confidence value + Maximum confidence value - + - Gets enumerator over features in this space + Randomly applies binary labels to a list of feature vectors - Enumerator over features in this space + Feature vectors to classify randomly - + - Gets enumerator over features in this space + Not implemented - Enumerator over features in this space - + - Gets the number of features in this feature space + Gets the labels that can be randomly assigned - + - Represents a discriminative Markov model + Dummy feature extractor - always returns an empty feature vector - + Constructor - - - - - - - Creates a discriminative state - - - - - - - - Gets the forward probability of a state - - - - - - - - - Gets the Viterbi probability - - - - - - - - - Classifies all times at once - - - - - Reads vector lines from an ARFF file - - + - Gets feature vectors from an ARFF file + Always returns an empty feature vector based on the entity passed to it - + + - - - Provides training instances for a discriminative HMM - - diff --git a/Libraries/LAIR.Math.dll b/Libraries/LAIR.Math.dll new file mode 100644 index 0000000..bb8075a Binary files /dev/null and b/Libraries/LAIR.Math.dll differ diff --git a/Libraries/LAIR.Math.xml b/Libraries/LAIR.Math.xml new file mode 100644 index 0000000..d5ce3ad --- /dev/null +++ b/Libraries/LAIR.Math.xml @@ -0,0 +1,251 @@ + + + + LAIR.Math + + + + + Core math routines + + + + + Gets the mean of a list of numbers + + Numbers to get mean of + Mean of numbers + + + + Gets the variance of a list of numbers + + Numbers to get variance of + Variance + + + + Gets covariance between two variables + + + + + + + + Gets product-moment correlation coefficient between two variables + + + + + + + + Gets the factorial of a number + + Number to get factorial of + Factorial of number + + + + Gets the standard deviation of a list of numbers + + Numbers to get standard deviation for + Standard deviation + + + + Gets the average deviation of a list of numbers + + Numbers to get average deviation for + Average deviation + + + + Gets the entropy of a distribution + + + + + + + Gets the KL-divergence between a distribution and the uniform distribution + + + + + + + Gets the KL-divergence between two distributiona + + + + + + + + Scales a list of floats to a distribution + + + + + + + Gets cosine similarity between two vectors indexed by strings + + First vector + Second vector + Cosine similarity in [0, 1] + + + + Gets cosine similarity between two vectors indexed by integers + + First vector + Second vector + Cosine similarity in [0, 1] + + + + Gets cosine similarity of two vectors + + Vector 1 + Vector 2 + Cosine similarity + + + + Gets the disjunctive probability for a list of event probabilities + + Probabilities to process + Disjunctive probability for a list of event probabilities + + + + Gets the disjunctive probability for a list of event probabilities + + Probabilities to process + Disjunctive probability for a list of event probabilities + + + + Gets F-measure given total reference items, predicted items, and true predictions + + Total number of reference items + Number of predictions + Number of correct predictions + F-measure + + + + Gets F-measure given precision, recall, and beta. + + Precision + Recall + Beta + F-measure + + + + Gets F-measure given precision, recall, and beta=1 + + Precision + Recall + F-measure + + + + Gets a basic histogram of data + + Data to get histograph for + Width of histogram intervals + Histogram y values + + + + Writes an ROC curve from predictions + + Predictions, where each tuple is the predicted probability and the true binary class. + Where to write ROC curve + + + + Gets bootstrap statistics + + Data to resample from + Number of bootstrap resamples to take + Delegate for computing a statistic over a resample + Bootstrap statistics + + + + Gets the (1-alpha)*100 percent confidence interval using the bootstrap sampling method described by Keller et. al (2005). + + Critical region alpha value + Statistics to get confidence interval for + Interval tail + Start of interval + End of interval + + + + Performs a one-sided exact Fisher significance test on a 2-by-2 matrix, optionally performing a two-sided test. + + 2-by-2 matrix to test. The main diagonal denotes the reference "situation". All "more + extreme situations" are computed by subtracting from the non-main diagonal and adding to the main diagonal. See + the literature for a discussion. + Whether or not to perform a two-sided test + Probability of the matrix proportions (or those more extreme) being generated by chance, assuming + the marginals remain the same. + + + + Gets the Fisher-exact probability of a 2-by-2 matrix + + Matrix + Fisher-exact probability + + + + Gets a factorial + + Integer to get factorial for + Factorial + + + + Copies a matrix + + Matrix to copy + Copy of matrix + + + + Tails + + + + + Left tail + + + + + Right tail + + + + + Two-tailed + + + + + Delegate for functions that compute a bootstrap statistic + + Sample data from which to compute bootstrap + Resulting statistic + True if statistic should be used and false otherwise + + + diff --git a/Libraries/LAIR.Misc.dll b/Libraries/LAIR.Misc.dll deleted file mode 100644 index ff8aaaf..0000000 Binary files a/Libraries/LAIR.Misc.dll and /dev/null differ diff --git a/Libraries/LAIR.Misc.xml b/Libraries/LAIR.Misc.xml deleted file mode 100644 index b4cedfc..0000000 --- a/Libraries/LAIR.Misc.xml +++ /dev/null @@ -1,716 +0,0 @@ - - - - LAIR.Misc - - - - - Form for getting a value from the user - - - - - Shows a dialog and returns the value - - Title for dialog - Default text to display in value field - Whether or not the textbox should be a password field - Value - - - - Constructor - - Title of window - Default to text to show in value field - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Gets the value entered by the user - - - - - Provides functionality for interacting with MSU's HPCC - - - - - Creates HPCC job scripts for input files in a given directory - - Directory to look for files in - File pattern to match - File extensions to exclude (include . in extensions), or null for no exclusion - Stub script path, which will be completed for each input file - Script completion function - - - - Converts a feature name transform into a mapping from feature numbers to groups - - Path to transform - - - - Delegate for functions that complete HPCC job scripts - - Path to file that is to be processed - Completion of job script - - - - Interface for classes that update their status - - - - - Fired when status is updated - - - - - Update status argument class - - - - - Constructor - - New status - - - - Gets the new status - - - - - Provides language modeling functionality - - - - - Constructor - - Text to compute language model for - Size of n-grams - Stop word handler to apply, or null for no stop word processing - Stemmer to apply - - - - Computes an n-gram language model - - Size of n-grams - - - - Gets a random sample of n-grams from this language model according to the observed distribution - - Number of n-grams to get - Sequence of n-grams - - - - Gets the n-grams in this model - - - - - ChartCell class - - - - - Min edit class - - - - - Gets edit distance between two strings - - First string - Second string - Perform in case-sensitive manner - Minimum edit distance between two strings - - - - Represents the prefix tree (trie) data structure - - - - - Constructor - - - - - Constructor - - String to initialize this tree with - - - - Adds a string to the current tree - - String to add - - - - Removes stop words - - - - - Constructs a stop word handler using the default stop word list, which is fairly aggressive. - - - - - Constructor - - List of stop words to use - - - - Constructor - - Path to stop word list (one word per line) - - - - Check if a word is a stop word - - Word to check - True if word is a stop word, false otherwise - - - - Removes stop words from a list of words - - Words to check - - - - Miscellaneous event delegates - - - - - Represents a method called to give updates on processing progress - - - - - - Represents a method called to notify of processing completion - - - - - Generic, void-return, no-parameter delegate - - - - - ImageViewer form - - - - - Constructor - - List of images to view - - - - Constructor - - List of images to view - Zero-based index of image to start on - - - - Fires OnImageChange event - - - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Fired when images changes - - - - - Handles the event in which the image that is being displayed is changed - - - - - - - The event arguments for the ImageChanged event - - - - - Title of image - - - - - Constructor - - - - - - InteractivePictureBox class - - - - - Constructor - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Gets or sets the image to display - - - - - Core math routines - - - - - Gets the mean of a list of numbers - - Numbers to get mean of - Mean of numbers - - - - Gets the variance of a list of numbers - - Numbers to get variance of - Variance - - - - Gets covariance between two variables - - - - - - - - Gets product-moment correlation coefficient between two variables - - - - - - - - Gets the factorial of a number - - Number to get factorial of - Factorial of number - - - - Gets the standard deviation of a list of numbers - - Numbers to get standard deviation for - Standard deviation - - - - Gets the average deviation of a list of numbers - - Numbers to get average deviation for - Average deviation - - - - Gets the entropy of a distribution - - - - - - - Gets the KL-divergence between a distribution and the uniform distribution - - - - - - - Gets the KL-divergence between two distributiona - - - - - - - - Scales a list of floats to a distribution - - - - - - - Gets cosine similarity between two vectors indexed by strings - - First vector - Second vector - Cosine similarity in [0, 1] - - - - Gets cosine similarity between two vectors indexed by integers - - First vector - Second vector - Cosine similarity in [0, 1] - - - - Gets cosine similarity of two vectors - - Vector 1 - Vector 2 - Cosine similarity - - - - Gets the disjunctive probability for a list of event probabilities - - Probabilities to process - Disjunctive probability for a list of event probabilities - - - - Gets the disjunctive probability for a list of event probabilities - - Probabilities to process - Disjunctive probability for a list of event probabilities - - - - Gets F-measure given total reference items, predicted items, and true predictions - - Total number of reference items - Number of predictions - Number of correct predictions - F-measure - - - - Gets F-measure given precision, recall, and beta. - - Precision - Recall - Beta - F-measure - - - - Gets F-measure given precision, recall, and beta=1 - - Precision - Recall - F-measure - - - - Gets a basic histogram of data - - Data to get histograph for - Width of histogram intervals - Histogram y values - - - - Writes an ROC curve from predictions - - Predictions, where each tuple is the predicted probability and the true binary class. - Where to write ROC curve - - - - Gets bootstrap statistics - - Data to resample from - Number of bootstrap resamples to take - Delegate for computing a statistic over a resample - Bootstrap statistics - - - - Gets the (1-alpha)*100 percent confidence interval using the bootstrap sampling method described by Keller et. al (2005). - - Critical region alpha value - Statistics to get confidence interval for - Interval tail - Start of interval - End of interval - - - - Performs a one-sided exact Fisher significance test on a 2-by-2 matrix, optionally performing a two-sided test. - - 2-by-2 matrix to test. The main diagonal denotes the reference "situation". All "more - extreme situations" are computed by subtracting from the non-main diagonal and adding to the main diagonal. See - the literature for a discussion. - Whether or not to perform a two-sided test - Probability of the matrix proportions (or those more extreme) being generated by chance, assuming - the marginals remain the same. - - - - Gets the Fisher-exact probability of a 2-by-2 matrix - - Matrix - Fisher-exact probability - - - - Gets a factorial - - Integer to get factorial for - Factorial - - - - Copies a matrix - - Matrix to copy - Copy of matrix - - - - Tails - - - - - Left tail - - - - - Right tail - - - - - Two-tailed - - - - - Delegate for functions that compute a bootstrap statistic - - Sample data from which to compute bootstrap - Resulting statistic - True if statistic should be used and false otherwise - - - - Provides access to the Tidy HTML program - - - - - Runs Tidy HTML on some input - - Path to executable - Input text - Tidy HTML output - - - - Encapsulates an image and a title - - - - - Constructor - - - - - - - Gets or sets the title on this titled image - - - - - Gets or sets the image for this titled image - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to a - abaft - aboard - about - above - according - across - afore - aforesaid - after - afterwards - again - against - agin - ago - aint - albeit - all - almost - alone - along - alongside - already - also - although - always - am - amid - amidst - among - amongst - an - and - anent - another - any - anybody - anyhow - anyone - anything - anyway - anywhere - apart - are - aren't - around - as - aslant - astride - at - athwart - av - away - b - back - bar - barring - be - became - because - become - becomes - becoming - been - before - beforehand - behind - being - below - beneath - beside - besides - best - better - between - betwixt - beyond - both - but - by - c - c [rest of string was truncated]";. - - - - diff --git a/Libraries/LAIR.Morphology.dll b/Libraries/LAIR.Morphology.dll deleted file mode 100644 index 1e95154..0000000 Binary files a/Libraries/LAIR.Morphology.dll and /dev/null differ diff --git a/Libraries/LAIR.Morphology.xml b/Libraries/LAIR.Morphology.xml deleted file mode 100644 index eef2579..0000000 --- a/Libraries/LAIR.Morphology.xml +++ /dev/null @@ -1,289 +0,0 @@ - - - - LAIR.Morphology - - - - - Tags parts of speech - - - - - Tags a list of tokens - - Tokens to tag - List of categories, one for each tag - - - - Uses a discriminative HMM to tag words - - - - - HMM-based POS tagger - - - - - Tags tokens using an HMM - - - - - - - - Trains the HMM. See the documentation in the implementing class for the format of the training file. - - - - - - Constructor - - Classifier to use - - - - Trains the tagger. The format of the training file should be: one line of true state IDs, followed by a corresponding line of true observations. All IDs and observations should be separated by a space. - - - - - - Tags tokens - - - - - - - Provides training sequences - - - - - Constructor - - Training path - - - - Moves to the next state and observation sequence - - - - - - Gets current sequence - - - - - Gets the current state and observation sequence - - - - Stemmer, implementing the Porter Stemming Algorithm - - The Stemmer class transforms a word into its root form. The input - word can be provided a character at time (by calling add()), or at once - by calling one of the various stem(something) methods. - - - - Stems words - - - - - Constructor - - Stop word handler to apply, or null for no stop word handling. - Maximum size of the stem cache - Whether or not to consult the head word list when stemming - - - - Stems a word - - Word to stem - Stem of word - - - - Adds a word/stem pair to the stem cache - - Word to add - Stem to add - - - - Gets the suffix for a word - - - - - - - Gets the stop word handler for this stemmer - - - - - Gets or sets whether or not to consult the headword list - - - - - Constructor - - - - - - - Add a character to the word being stemmed. When you are finished - adding characters, you can call stem(void) to stem the word. - - - Adds wLen characters to the word being stemmed contained in a portion - of a char[] array. This is like repeated calls of add(char ch), but - faster. - - - After a word has been stemmed, it can be retrieved by toString(), - or a reference to the internal buffer can be retrieved by getResultBuffer - and getResultLength (which is generally more efficient.) - - - Returns the length of the word resulting from the stemming process. - - - Returns a reference to a character buffer containing the results of - the stemming process. You also need to consult getResultLength() - to determine the length of the result. - - - - Stem the word placed into the Stemmer buffer through calls to add(). - Returns true if the stemming process resulted in a word different - from the input. You can retrieve the result with - getResultLength()/getResultBuffer() or toString(). - - Word to stem - Stem of word - - - - Resets the stemmer - - - - - Runs Porter stemming algorithm - - - - - Gets the result of stemming - - - - - - HMM-based part of speech tagger - - - - - Constructor - - Model directory for tagger - - - - Trains this tagger with data contained in a text file. The format of the file must be as follows: "word1 tag1 word2 tag2" etc. - - Path to training file - - - - Tags a list of tokens - - Tokens to tag - List of categories, one for each tag - - - - Gets the path to the transition probabilities file - - - - - Gets the path to the observation probabilities file - - - - - Gets the path to the known words file - - - - - Keeps a list of head words - - - - - Gets whether or not a word is a head word - - String to check - True if given word is a head word, false otherwise - - - - Initializes head word list - - - - - Discriminative HMM-based POS tagger feature extraction - - - - - Constructor - - - - - - - - - - Gets name for a feature - - Feature to get name for - Whether or not to get an abbreviated name - Feature name - - - - Gets features - - - - - - - - Features - - - - diff --git a/Libraries/LAIR.ResourceAPIs.GraphViz.dll b/Libraries/LAIR.ResourceAPIs.GraphViz.dll deleted file mode 100644 index ffe66c4..0000000 Binary files a/Libraries/LAIR.ResourceAPIs.GraphViz.dll and /dev/null differ diff --git a/Libraries/LAIR.ResourceAPIs.GraphViz.xml b/Libraries/LAIR.ResourceAPIs.GraphViz.xml deleted file mode 100644 index 31fc919..0000000 --- a/Libraries/LAIR.ResourceAPIs.GraphViz.xml +++ /dev/null @@ -1,255 +0,0 @@ - - - - LAIR.ResourceAPIs.GraphViz - - - - - Complete form for viewing GraphViz items - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Constructor - - - - - Constructor - - Number of states nodes can be put into via clicking - - - - Occurs when a node is clicked - - - - - Gets or sets the graph path - - - - - Viewer for GraphViz items - - - - - Constructor - - - - - Constructor - - Number of states the nodes in this viewer can be put into via clicking - - - - Views a graph - - Path to graph file - - - - Draws edges in the viewer - - - - - - Clears this viewer control - - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Occurs when a node is clicked - - - - - Gets or sets the number of node states (default: 2) - - - - - Delegate for functions that handle node clicks - - - - - - Wrapper for Dot executable - - - - - Constructor - - - - - Constructor - - Path to Dot executable - - - - Creates a graph from an entity - - Entity to create graph for - Output format - Path to created graph file - - - - Creates a graph from an entity - - Entity to create graph for - Output format - Output path - - - - Gets or sets the path to the Dot executable - - - - - Output formats - - - - - Jpeg - - - - - PNG - - - - - Gif - - - - - Encapsulated postscript - - - - - Plain-text layout - - - - - Output the original Dot specification - - - - - Interface for classes that can be graphed using the GraphViz suite - - - - - Gets specification of graph using the Dot language - - - - - - Represents a clickable node in a graph - - - - - Constructor - - ID of node - Text to display on this node - Number of states the node can be put into via clicking it - - - - Required designer variable. - - - - - Clean up any resources being used. - - true if managed resources should be disposed; otherwise, false. - - - - Required method for Designer support - do not modify - the contents of this method with the code editor. - - - - - Gets or sets the list of adjacent nodes for this node - - - - - Gets or sets the original text for this node - - - - - Gets or sets the zero-based state for this node - - - - - Gets or sets the ID for this node - - - - - Gets or sets the location (center) of this node - - - - diff --git a/Libraries/LAIR.ResourceAPIs.MySQL.dll b/Libraries/LAIR.ResourceAPIs.MySQL.dll deleted file mode 100644 index 5cafd90..0000000 Binary files a/Libraries/LAIR.ResourceAPIs.MySQL.dll and /dev/null differ diff --git a/Libraries/LAIR.ResourceAPIs.MySQL.xml b/Libraries/LAIR.ResourceAPIs.MySQL.xml deleted file mode 100644 index 68ae97f..0000000 --- a/Libraries/LAIR.ResourceAPIs.MySQL.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - LAIR.ResourceAPIs.MySQL - - - - - Represents a pool of connections to the MySQL server - - - - - Constructor - - Base connection - - - - Constructor - - - - - - - - - - Tests this connection pool - - - - - Returns a connection to the pool - - - - - - Returns the connection associated with a command to the pool - - - - - - Creates a new command associated with an open connection - - - - - - - Executes a non-query command - - Text of command - - - - Gets a new open connection to the server - - - - - Provides convenience methods for databases - - - - - Gets tables - - - - - - - Provides utility database functionality - - - - - Gets concept IDs for a query - - - - - - - - diff --git a/Libraries/LAIR.ResourceAPIs.PostGIS.dll b/Libraries/LAIR.ResourceAPIs.PostGIS.dll index d8b1490..8c1e29a 100644 Binary files a/Libraries/LAIR.ResourceAPIs.PostGIS.dll and b/Libraries/LAIR.ResourceAPIs.PostGIS.dll differ diff --git a/Libraries/LAIR.ResourceAPIs.PostgreSQL.dll b/Libraries/LAIR.ResourceAPIs.PostgreSQL.dll index 3058cde..83bdf7f 100644 Binary files a/Libraries/LAIR.ResourceAPIs.PostgreSQL.dll and b/Libraries/LAIR.ResourceAPIs.PostgreSQL.dll differ diff --git a/Libraries/LAIR.ResourceAPIs.PostgreSQL.xml b/Libraries/LAIR.ResourceAPIs.PostgreSQL.xml index 4d014df..b379def 100644 --- a/Libraries/LAIR.ResourceAPIs.PostgreSQL.xml +++ b/Libraries/LAIR.ResourceAPIs.PostgreSQL.xml @@ -109,9 +109,9 @@ - Tests a connection by executing a simple command + Tests a connection by querying the server. Disposes connection if it's bad. - + Connection to test. diff --git a/Libraries/LAIR.ResourceAPIs.R.dll b/Libraries/LAIR.ResourceAPIs.R.dll index 640a3f3..0385fc5 100644 Binary files a/Libraries/LAIR.ResourceAPIs.R.dll and b/Libraries/LAIR.ResourceAPIs.R.dll differ diff --git a/Libraries/LAIR.ResourceAPIs.R.xml b/Libraries/LAIR.ResourceAPIs.R.xml index cf3919a..00d8697 100644 --- a/Libraries/LAIR.ResourceAPIs.R.xml +++ b/Libraries/LAIR.ResourceAPIs.R.xml @@ -34,18 +34,26 @@ Executes a script - + Script to execute Whether or not to throw an exception on error output - Content written to standard output - + Executes a script Script to execute + Whether or not to throw an exception on error output Output content Error content - Whether or not to throw an exception on error output + + + + Trains a topic model + + + + + diff --git a/Libraries/LAIR.XML.dll b/Libraries/LAIR.XML.dll index 48c0b8f..58f7489 100644 Binary files a/Libraries/LAIR.XML.dll and b/Libraries/LAIR.XML.dll differ diff --git a/Libraries/Mono.Security.dll b/Libraries/Mono.Security.dll index 1371f5c..62ae339 100644 Binary files a/Libraries/Mono.Security.dll and b/Libraries/Mono.Security.dll differ diff --git a/Libraries/MySql.Data.dll b/Libraries/MySql.Data.dll deleted file mode 100644 index da3babd..0000000 Binary files a/Libraries/MySql.Data.dll and /dev/null differ diff --git a/Libraries/Newtonsoft.Json.dll b/Libraries/Newtonsoft.Json.dll deleted file mode 100644 index 74d63cf..0000000 Binary files a/Libraries/Newtonsoft.Json.dll and /dev/null differ diff --git a/Libraries/Newtonsoft.Json.xml b/Libraries/Newtonsoft.Json.xml deleted file mode 100644 index fa5fbc9..0000000 --- a/Libraries/Newtonsoft.Json.xml +++ /dev/null @@ -1,7659 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Skips the children of the current token. - - - - - Sets the current token. - - The new token. - - - - Sets the current token and value. - - The new token. - The value. - - - - Sets the state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Gets the current reader state. - - The current reader state. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the reader is closed; otherwise false. The default is true. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets the type of the current JSON token. - - - - - Gets the text value of the current JSON token. - - - - - Gets The Common Language Runtime (CLR) type for the current JSON token. - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Specifies the state of the reader. - - - - - The Read method has not been called. - - - - - The end of the file has been reached successfully. - - - - - Reader is at a property. - - - - - Reader is at the start of an object. - - - - - Reader is in an object. - - - - - Reader is at the start of an array. - - - - - Reader is in an array. - - - - - The Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader in a constructor. - - - - - An error occurred that prevents the read operation from continuing. - - - - - The end of the file has been reached successfully. - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The reader. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - - A . This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. - - - true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. - - - - - Gets or sets a value indicating whether the root object will be read as a JSON array. - - - true if the root object will be read as a JSON array; otherwise, false. - - - - - Gets or sets the used when reading values from BSON. - - The used when reading values from BSON. - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the end of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the end of an array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end constructor. - - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes the end of the current Json object or array. - - - - - Writes the current token. - - The to read the token from. - - - - Writes the specified end token. - - The end token to write. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON without changing the writer's state. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the writer is closed; otherwise false. The default is true. - - - - - Gets the top. - - The top. - - - - Gets the state of the writer. - - - - - Gets the path of the writer. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON. - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes the beginning of a Json array. - - - - - Writes the beginning of a Json object. - - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Closes this stream and the underlying stream. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value that represents a BSON object id. - - The Object ID value to write. - - - - Writes a BSON regex. - - The regex pattern. - The regex options. - - - - Gets or sets the used when writing values to BSON. - When set to no conversion will occur. - - The used when writing values to BSON. - - - - Represents a BSON Oid (object id). - - - - - Initializes a new instance of the class. - - The Oid value. - - - - Gets or sets the value of the Oid. - - The value of the Oid. - - - - Converts a binary value to and from a base 64 string value. - - - - - Converts an object to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets the of the JSON produced by the JsonConverter. - - The of the JSON produced by the JsonConverter. - - - - Gets a value indicating whether this can read JSON. - - true if this can read JSON; otherwise, false. - - - - Gets a value indicating whether this can write JSON. - - true if this can write JSON; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Create a custom object - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Creates an object which will then be populated by the serializer. - - Type of the object. - The created object. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Provides a base class for converting a to and from JSON. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an Entity Framework EntityKey to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an ExpandoObject to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from its name string value. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - A cached representation of the Enum string representation to respect per Enum field name. - - The type of the Enum. - A map of enum field name to either the field name, or the configured enum member name (). - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets or sets a value indicating whether the written enum text should be camel case. - - true if the written enum text will be camel case; otherwise, false. - - - - Specifies how constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a paramatized constructor. - - - - - Converts a to and from a string (e.g. "1.2.3.4"). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Instructs the how to serialize the collection. - - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the id. - - The id. - - - - Gets or sets the title. - - The title. - - - - Gets or sets the description. - - The description. - - - - Gets the collection's items converter. - - The collection's items converter. - - - - Gets or sets a value that indicates whether to preserve object references. - - - true to keep object reference; otherwise, false. The default is false. - - - - - Gets or sets a value that indicates whether to preserve collection's items references. - - - true to keep collection's items object references; otherwise, false. The default is false. - - - - - Gets or sets the reference loop handling used when serializing the collection's items. - - The reference loop handling. - - - - Gets or sets the type name handling used when serializing the collection's items. - - The type name handling. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Specifies how dates are formatted when writing JSON text. - - - - - Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". - - - - - Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". - - - - - Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. - - - - - Date formatted strings are not parsed to a date type and are read as strings. - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Specifies how to treat the time value when converting between string and . - - - - - Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. - - - - - Treat as a UTC. If the object represents a local time, it is converted to a UTC. - - - - - Treat as a local time if a is being converted to a string. - If a string is being converted to , convert to a local time if a time zone is specified. - - - - - Time zone information should be preserved when converting. - - - - - Specifies formatting options for the . - - - - - No special formatting is applied. This is the default. - - - - - Causes child objects to be indented according to the and settings. - - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - Contract details for a used by the . - - - - - Contract details for a used by the . - - - - - Gets the underlying type for the contract. - - The underlying type for the contract. - - - - Gets or sets the type created during deserialization. - - The type created during deserialization. - - - - Gets or sets whether this type contract is serialized as a reference. - - Whether this type contract is serialized as a reference. - - - - Gets or sets the default for this contract. - - The converter. - - - - Gets or sets the method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the default creator method used to create the object. - - The default creator method used to create the object. - - - - Gets or sets a value indicating whether the default creator is non public. - - true if the default object creator is non-public; otherwise, false. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method called when an error is thrown during the serialization of the object. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the default collection items . - - The converter. - - - - Gets or sets a value indicating whether the collection items preserve object references. - - true if collection items preserve object references; otherwise, false. - - - - Gets or sets the collection item reference loop handling. - - The reference loop handling. - - - - Gets or sets the collection item type name handling. - - The type name handling. - - - - Represents a raw JSON string. - - - - - Represents a value in JSON (string, integer, date, etc). - - - - - Represents an abstract JSON token. - - - - - Represents a collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - Provides an interface to enable a class to return line and position information. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Compares the values of two tokens, including the values of all descendant tokens. - - The first to compare. - The second to compare. - true if the tokens are equal; otherwise false. - - - - Adds the specified content immediately after this token. - - A content object that contains simple content or a collection of content objects to be added after this token. - - - - Adds the specified content immediately before this token. - - A content object that contains simple content or a collection of content objects to be added before this token. - - - - Returns a collection of the ancestor tokens of this token. - - A collection of the ancestor tokens of this token. - - - - Returns a collection of the sibling tokens after this token, in document order. - - A collection of the sibling tokens after this tokens, in document order. - - - - Returns a collection of the sibling tokens before this token, in document order. - - A collection of the sibling tokens before this token, in document order. - - - - Gets the with the specified key converted to the specified type. - - The type to convert the token to. - The token key. - The converted token value. - - - - Returns a collection of the child tokens of this token, in document order. - - An of containing the child tokens of this , in document order. - - - - Returns a collection of the child tokens of this token, in document order, filtered by the specified type. - - The type to filter the child tokens on. - A containing the child tokens of this , in document order. - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - A containing the child values of this , in document order. - - - - Removes this token from its parent. - - - - - Replaces this token with the specified token. - - The value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Returns the indented JSON for this token. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of which will be used when writing the token. - The JSON for this token using the given formatting and converters. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Creates an for this token. - - An that can be used to read this token and its descendants. - - - - Creates a from an object. - - The object that will be used to create . - A with the value of the specified object - - - - Creates a from an object using the specified . - - The object that will be used to create . - The that will be used when reading the object. - A with the value of the specified object - - - - Creates the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Selects the token that matches the object path. - - - The object path from the current to the - to be returned. This must be a string of property names or array indexes separated - by periods, such as Tables[0].DefaultView[0].Price in C# or - Tables(0).DefaultView(0).Price in Visual Basic. - - The that matches the object path or a null reference if no matching token is found. - - - - Selects the token that matches the object path. - - - The object path from the current to the - to be returned. This must be a string of property names or array indexes separated - by periods, such as Tables[0].DefaultView[0].Price in C# or - Tables(0).DefaultView(0).Price in Visual Basic. - - A flag to indicate whether an error should be thrown if no token is found. - The that matches the object path. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Creates a new instance of the . All child tokens are recursively cloned. - - A new instance of the . - - - - Gets a comparer that can compare two tokens for value equality. - - A that can compare two nodes for value equality. - - - - Gets or sets the parent. - - The parent. - - - - Gets the root of this . - - The root of this . - - - - Gets the node type for this . - - The type. - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the next sibling token of this node. - - The that contains the next sibling token. - - - - Gets the previous sibling token of this node. - - The that contains the previous sibling token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Get the first child token of this token. - - A containing the first child token of the . - - - - Get the last child token of this token. - - A containing the last child token of the . - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Creates a comment with the given value. - - The value. - A comment with the given value. - - - - Creates a string with the given value. - - The value. - A string with the given value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format provider. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - The format provider. - - A that represents this instance. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. - - An object to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: - Value - Meaning - Less than zero - This instance is less than . - Zero - This instance is equal to . - Greater than zero - This instance is greater than . - - - is not the same type as this instance. - - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the node type for this . - - The type. - - - - Gets or sets the underlying token value. - - The underlying token value. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The raw json. - - - - Creates an instance of with the content of the reader's current token. - - The reader. - An instance of with the content of the reader's current token. - - - - Indicating whether a property is required. - - - - - The property is not required. The default state. - - - - - The property must be defined in JSON but can be a null value. - - - - - The property must be defined in JSON and cannot be a null value. - - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the object's properties. - - The object's properties. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the ISerializable object constructor. - - The ISerializable object constructor. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Get and set values for a using dynamic methods. - - - - - Provides methods to get and set values. - - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides data for the Error event. - - - - - Initializes a new instance of the class. - - The current object. - The error context. - - - - Gets the current object the error event is being raised against. - - The current object the error event is being raised against. - - - - Gets the error context. - - The error context. - - - - Represents a view of a . - - - - - Initializes a new instance of the class. - - The name. - Type of the property. - - - - When overridden in a derived class, returns whether resetting an object changes its value. - - - true if resetting the component changes its value; otherwise, false. - - The component to test for reset capability. - - - - - When overridden in a derived class, gets the current value of the property on a component. - - - The value of a property for a given component. - - The component with the property for which to retrieve the value. - - - - - When overridden in a derived class, resets the value for this property of the component to the default value. - - The component with the property value that is to be reset to the default value. - - - - - When overridden in a derived class, sets the value of the component to a different value. - - The component with the property value that is to be set. - The new value. - - - - - When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. - - - true if the property should be persisted; otherwise, false. - - The component with the property to be examined for persistence. - - - - - When overridden in a derived class, gets the type of the component this property is bound to. - - - A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. - - - - - When overridden in a derived class, gets a value indicating whether this property is read-only. - - - true if the property is read-only; otherwise, false. - - - - - When overridden in a derived class, gets the type of the property. - - - A that represents the type of the property. - - - - - Gets the hash code for the name of the member. - - - - The hash code for the name of the member. - - - - - Used to resolve references when serializing and deserializing JSON by the . - - - - - Resolves a reference to its object. - - The serialization context. - The reference to resolve. - The object that - - - - Gets the reference for the sepecified object. - - The serialization context. - The object to get a reference for. - The reference to the object. - - - - Determines whether the specified object is referenced. - - The serialization context. - The object to test for a reference. - - true if the specified object is referenced; otherwise, false. - - - - - Adds a reference to the specified object. - - The serialization context. - The reference. - The object to reference. - - - - Specifies reference handling options for the . - - - - - - - - Do not preserve references when serializing types. - - - - - Preserve references when serializing into a JSON object structure. - - - - - Preserve references when serializing into a JSON array structure. - - - - - Preserve references when serializing. - - - - - Instructs the how to serialize the collection. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a flag indicating whether the array can contain null items - - A flag indicating whether the array can contain null items. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets a value indicating whether null items are allowed in the collection. - - true if null items are allowed in the collection; otherwise, false. - - - - Specifies default value handling options for the . - - - - - - - - - Include members where the member value is the same as the member's default value when serializing objects. - Included members are written to JSON. Has no effect when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - so that is is not written to JSON. - This option will ignore all default values (e.g. null for objects and nullable typesl; 0 for integers, - decimals and floating point numbers; and false for booleans). The default value ignored can be changed by - placing the on the property. - - - - - Members with a default value but no JSON will be set to their default value when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - and sets members to their default value when deserializing. - - - - - Instructs the to use the specified when serializing the member or class. - - - - - Initializes a new instance of the class. - - Type of the converter. - - - - Gets the type of the converter. - - The type of the converter. - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified member serialization. - - The member serialization. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the member serialization. - - The member serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Specifies the settings on a object. - - - - - Initializes a new instance of the class. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - Reference loop handling. - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - The default value handling. - - - - Gets or sets a collection that will be used during serialization. - - The converters. - - - - Gets or sets how object references are preserved by the serializer. - - The preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - The type name handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - The contract resolver. - - - - Gets or sets the used by the serializer when resolving references. - - The reference resolver. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the error handler called during serialization and deserialization. - - The error handler called during serialization and deserialization. - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - true if there will be a check for additional content after deserializing an object; otherwise, false. - - - - - Represents a reader that provides validation. - - - - - Initializes a new instance of the class that - validates the content returned from the given . - - The to read from while validating. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Sets an event handler for receiving schema validation errors. - - - - - Gets the text value of the current Json token. - - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - - Gets the type of the current Json token. - - - - - - Gets the Common Language Runtime (CLR) type for the current Json token. - - - - - - Gets or sets the schema. - - The schema. - - - - Gets the used to construct this . - - The specified in the constructor. - - - - Compares tokens to determine whether they are equal. - - - - - Determines whether the specified objects are equal. - - The first object of type to compare. - The second object of type to compare. - - true if the specified objects are equal; otherwise, false. - - - - - Returns a hash code for the specified object. - - The for which a hash code is to be returned. - A hash code for the specified object. - The type of is a reference type and is null. - - - - Specifies the member serialization options for the . - - - - - All public members are serialized by default. Members can be excluded using or . - This is the default member serialization mode. - - - - - Only members must be marked with or are serialized. - This member serialization mode can also be set by marking the class with . - - - - - All public and private fields are serialized. Members can be excluded using or . - This member serialization mode can also be set by marking the class with - and setting IgnoreSerializableAttribute on to false. - - - - - Specifies how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Gets or sets the date time styles used when converting a date to and from JSON. - - The date time styles used when converting a date to and from JSON. - - - - Gets or sets the date time format used when converting a date to and from JSON. - - The date time format used when converting a date to and from JSON. - - - - Gets or sets the culture used when converting a date to and from JSON. - - The culture used when converting a date to and from JSON. - - - - Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts XML to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The calling serializer. - The value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Checks if the attributeName is a namespace attribute. - - Attribute name to test. - The attribute name prefix if it has one, otherwise an empty string. - True if attribute name is for a namespace attribute, otherwise false. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - true if the array attibute is written to the XML; otherwise, false. - - - - Gets or sets a value indicating whether to write the root JSON object. - - true if the JSON root object is omitted; otherwise, false. - - - - Represents a reader that provides fast, non-cached, forward-only access to JSON text data. - - - - - Initializes a new instance of the class with the specified . - - The TextReader containing the XML data to read. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Instructs the to always serialize the member with the specified name. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - Name of the property. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets the null value handling used when serializing this property. - - The null value handling. - - - - Gets or sets the default value handling used when serializing this property. - - The default value handling. - - - - Gets or sets the reference loop handling used when serializing this property. - - The reference loop handling. - - - - Gets or sets the object creation handling used when deserializing this property. - - The object creation handling. - - - - Gets or sets the type name handling used when serializing this property. - - The type name handling. - - - - Gets or sets whether this property's value is serialized as a reference. - - Whether this property's value is serialized as a reference. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets a value indicating whether this property is required. - - - A value indicating whether this property is required. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the specified end token. - - The end token to write. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Represents a collection of . - - - - - Provides methods for converting between common language runtime types and JSON types. - - - - - - - - Represents JavaScript's boolean value true as a string. This field is read-only. - - - - - Represents JavaScript's boolean value false as a string. This field is read-only. - - - - - Represents JavaScript's null as a string. This field is read-only. - - - - - Represents JavaScript's undefined as a string. This field is read-only. - - - - - Represents JavaScript's positive infinity as a string. This field is read-only. - - - - - Represents JavaScript's negative infinity as a string. This field is read-only. - - - - - Represents JavaScript's NaN as a string. This field is read-only. - - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - The time zone handling when the date is converted to a string. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Serializes the specified object to a JSON string. - - The object to serialize. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string. - - The object to serialize. - Indicates how the output is formatted. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using a collection of . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be is used. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - The deserialized object from the Json string. - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The of object being deserialized. - The deserialized object from the Json string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - The deserialized object from the Json string. - - - - Deserializes the JSON to the given anonymous type. - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be infered from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The object to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - The deserialized object from the JSON string. - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - - - Asynchronously populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be is used. - - - A task that represents the asynchronous populate operation. - - - - - Serializes the XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - - A flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized XmlNode - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment. - - The JSON string. - The name of the root element to append when deserializing. - - A flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized XNode - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Serializes and deserializes objects into and from the JSON format. - The enables you to control how objects are encoded into JSON. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance using the specified . - - The settings to be applied to the . - A new instance using the specified . - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Deserializes the Json structure contained by the specified . - - The that contains the JSON structure to deserialize. - The being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The type of the object to deserialize. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Occurs when the errors during serialization and deserialization. - - - - - Gets or sets the used by the serializer when resolving references. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets a collection that will be used during serialization. - - Collection that will be used during serialization. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - true if there will be a check for additional JSON content after deserializing an object; otherwise, false. - - - - - Contains the LINQ to JSON extension methods. - - - - - Returns a collection of tokens that contains the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the ancestors of every node in the source collection. - - - - Returns a collection of tokens that contains the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the descendants of every node in the source collection. - - - - Returns a collection of child properties of every object in the source collection. - - An of that contains the source collection. - An of that contains the properties of every object in the source collection. - - - - Returns a collection of child values of every object in the source collection with the given key. - - An of that contains the source collection. - The token key. - An of that contains the values of every node in the source collection with the given key. - - - - Returns a collection of child values of every object in the source collection. - - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child values of every object in the source collection with the given key. - - The type to convert the values to. - An of that contains the source collection. - The token key. - An that contains the converted values of every node in the source collection with the given key. - - - - Returns a collection of converted child values of every object in the source collection. - - The type to convert the values to. - An of that contains the source collection. - An that contains the converted values of every node in the source collection. - - - - Converts the value. - - The type to convert the value to. - A cast as a of . - A converted value. - - - - Converts the value. - - The source collection type. - The type to convert the value to. - A cast as a of . - A converted value. - - - - Returns a collection of child tokens of every array in the source collection. - - The source collection type. - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child tokens of every array in the source collection. - - An of that contains the source collection. - The type to convert the values to. - The source collection type. - An that contains the converted values of every node in the source collection. - - - - Returns the input typed as . - - An of that contains the source collection. - The input typed as . - - - - Returns the input typed as . - - The source collection type. - An of that contains the source collection. - The input typed as . - - - - Represents a JSON constructor. - - - - - Represents a token that can contain other tokens. - - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Returns a collection of the child tokens of this token, in document order. - - - An of containing the child tokens of this , in document order. - - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - - A containing the child values of this , in document order. - - - - - Returns a collection of the descendant tokens for this token in document order. - - An containing the descendant tokens of the . - - - - Adds the specified content as children of this . - - The content to be added. - - - - Adds the specified content as the first children of this . - - The content to be added. - - - - Creates an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children nodes of this token with the specified content. - - The content. - - - - Removes the child nodes from this token. - - - - - Occurs when the list changes or an item in the list changes. - - - - - Occurs before an item is added to the collection. - - - - - Occurs when the items list of the collection has changed, or the collection is reset. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets a value indicating whether this token has childen tokens. - - - true if this token has child values; otherwise, false. - - - - - Get the first child token of this token. - - - A containing the first child token of the . - - - - - Get the last child token of this token. - - - A containing the last child token of the . - - - - - Gets the count of child JSON tokens. - - The count of child JSON tokens - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name. - - The constructor name. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets or sets the name of this constructor. - - The constructor name. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Represents a collection of objects. - - The type of token - - - - An empty collection of objects. - - - - - Initializes a new instance of the struct. - - The enumerable. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Gets the with the specified key. - - - - - - Represents a JSON object. - - - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Gets an of this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An of this object's property values. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified property name. - - The with the specified property name. - - - - Gets the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - The with the specified property name. - - - - Tries to get the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - The value. - One of the enumeration values that specifies how the strings will be compared. - true if a value was successfully retrieved; otherwise, false. - - - - Adds the specified property name. - - Name of the property. - The value. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Returns the properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified property. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Occurs when a property value changes. - - - - - Occurs when a property value is changing. - - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the with the specified property name. - - - - - - Represents a JSON array. - - - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Determines the index of a specific item in the . - - The object to locate in the . - - The index of if found in the list; otherwise, -1. - - - - - Inserts an item to the at the specified index. - - The zero-based index at which should be inserted. - The object to insert into the . - - is not a valid index in the . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - - true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - - The is read-only. - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the at the specified index. - - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class. - - The token to read from. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Initializes a new instance of the class writing to the given . - - The container being written to. - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end. - - The token. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Gets the token being writen. - - The token being writen. - - - - Represents a JSON property. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the property name. - - The property name. - - - - Gets or sets the property value. - - The property value. - - - - Gets the node type for this . - - The type. - - - - Specifies the type of token. - - - - - No token type has been set. - - - - - A JSON object. - - - - - A JSON array. - - - - - A JSON constructor. - - - - - A JSON object property. - - - - - A comment. - - - - - An integer value. - - - - - A float value. - - - - - A string value. - - - - - A boolean value. - - - - - A null value. - - - - - An undefined value. - - - - - A date value. - - - - - A raw JSON value. - - - - - A collection of bytes value. - - - - - A Guid value. - - - - - A Uri value. - - - - - A TimeSpan value. - - - - - Contains the JSON schema extension methods. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - - true if the specified is valid; otherwise, false. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - When this method returns, contains any error messages generated while validating. - - true if the specified is valid; otherwise, false. - - - - - Validates the specified . - - The source to test. - The schema to test with. - - - - Validates the specified . - - The source to test. - The schema to test with. - The validation event handler. - - - - Returns detailed information about the schema exception. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Resolves from an id. - - - - - Initializes a new instance of the class. - - - - - Gets a for the specified id. - - The id. - A for the specified id. - - - - Gets or sets the loaded schemas. - - The loaded schemas. - - - - Specifies undefined schema Id handling options for the . - - - - - Do not infer a schema Id. - - - - - Use the .NET type name as the schema Id. - - - - - Use the assembly qualified .NET type name as the schema Id. - - - - - Returns detailed information related to the . - - - - - Gets the associated with the validation error. - - The JsonSchemaException associated with the validation error. - - - - Gets the path of the JSON location where the validation error occurred. - - The path of the JSON location where the validation error occurred. - - - - Gets the text description corresponding to the validation error. - - The text description. - - - - Represents the callback method that will handle JSON schema validation events and the . - - - - - Resolves member mappings for a type, camel casing property names. - - - - - Used by to resolves a for a given . - - - - - Used by to resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected - behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly - recommended to reuse instances with the . - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Gets the serializable members for the type. - - The type to get serializable members for. - The serializable members for the type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates the constructor parameters. - - The constructor to create properties for. - The type's member properties. - Properties for the given . - - - - Creates a for the given . - - The matching member property. - The constructor parameter. - A created for the given . - - - - Resolves the default for the contract. - - Type of the object. - The contract's default . - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Determines which contract type is created for the given type. - - Type of the object. - A for the given type. - - - - Creates properties for the given . - - The type to create properties for. - /// The member serialization mode for the type. - Properties for the given . - - - - Creates the used by the serializer to get and set values from a member. - - The member. - The used by the serializer to get and set values from a member. - - - - Creates a for the given . - - The member's parent . - The member to create a for. - A created for the given . - - - - Resolves the name of the property. - - Name of the property. - Name of the property. - - - - Gets the resolved name of the property. - - Name of the property. - Name of the property. - - - - Gets a value indicating whether members are being get and set using dynamic code generation. - This value is determined by the runtime permissions available. - - - true if using dynamic code generation; otherwise, false. - - - - - Gets or sets the default members search flags. - - The default members search flags. - - - - Gets or sets a value indicating whether compiler generated members should be serialized. - - - true if serialized compiler generated members; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. - - - true if the interface will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. - - - true if the attribute will be ignored when serializing and deserializing types; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Resolves the name of the property. - - Name of the property. - The property name camel cased. - - - - The default serialization binder used when resolving and loading classes from type names. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - The type of the object the formatter creates a new instance of. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Provides information surrounding an error. - - - - - Gets or sets the error. - - The error. - - - - Gets the original object that caused the error. - - The original object that caused the error. - - - - Gets the member that caused the error. - - The member that caused the error. - - - - Gets the path of the JSON location where the error occurred. - - The path of the JSON location where the error occurred. - - - - Gets or sets a value indicating whether this is handled. - - true if handled; otherwise, false. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the of the collection items. - - The of the collection items. - - - - Gets a value indicating whether the collection type is a multidimensional array. - - true if the collection type is a multidimensional array; otherwise, false. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Gets the of the dictionary keys. - - The of the dictionary keys. - - - - Gets the of the dictionary values. - - The of the dictionary values. - - - - Maps a JSON property to a .NET member or constructor parameter. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the type that declared this property. - - The type that declared this property. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets the name of the underlying member or parameter. - - The name of the underlying member or parameter. - - - - Gets the that will get and set the during serialization. - - The that will get and set the during serialization. - - - - Gets or sets the type of the property. - - The type of the property. - - - - Gets or sets the for the property. - If set this converter takes presidence over the contract converter for the property type. - - The converter. - - - - Gets the member converter. - - The member converter. - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is readable. - - true if readable; otherwise, false. - - - - Gets a value indicating whether this is writable. - - true if writable; otherwise, false. - - - - Gets a value indicating whether this has a member attribute. - - true if has a member attribute; otherwise, false. - - - - Gets the default value. - - The default value. - - - - Gets a value indicating whether this is required. - - A value indicating whether this is required. - - - - Gets a value indicating whether this property preserves object references. - - - true if this instance is reference; otherwise, false. - - - - - Gets the property null value handling. - - The null value handling. - - - - Gets the property default value handling. - - The default value handling. - - - - Gets the property reference loop handling. - - The reference loop handling. - - - - Gets the property object creation handling. - - The object creation handling. - - - - Gets or sets the type name handling. - - The type name handling. - - - - Gets or sets a predicate used to determine whether the property should be serialize. - - A predicate used to determine whether the property should be serialize. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets an action used to set whether the property has been deserialized. - - An action used to set whether the property has been deserialized. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - A collection of objects. - - - - - Initializes a new instance of the class. - - The type. - - - - When implemented in a derived class, extracts the key from the specified element. - - The element from which to extract the key. - The key for the specified element. - - - - Adds a object. - - The property to add to the collection. - - - - Gets the closest matching object. - First attempts to get an exact case match of propertyName and then - a case insensitive match. - - Name of the property. - A matching property if found. - - - - Gets a property by property name. - - The name of the property to get. - Type property name string comparison. - A matching property if found. - - - - Specifies missing member handling options for the . - - - - - Ignore a missing member and do not attempt to deserialize it. - - - - - Throw a when a missing member is encountered during deserialization. - - - - - Specifies null value handling options for the . - - - - - - - - - Include null values when serializing and deserializing objects. - - - - - Ignore null values when serializing and deserializing objects. - - - - - Specifies reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - An in-memory representation of a JSON Schema. - - - - - Initializes a new instance of the class. - - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The object representing the JSON Schema. - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The to use when resolving schema references. - The object representing the JSON Schema. - - - - Load a from a string that contains schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - Writes this schema to a . - - A into which this method will write. - - - - Writes this schema to a using the specified . - - A into which this method will write. - The resolver used. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Gets or sets the id. - - - - - Gets or sets the title. - - - - - Gets or sets whether the object is required. - - - - - Gets or sets whether the object is read only. - - - - - Gets or sets whether the object is visible to users. - - - - - Gets or sets whether the object is transient. - - - - - Gets or sets the description of the object. - - - - - Gets or sets the types of values allowed by the object. - - The type. - - - - Gets or sets the pattern. - - The pattern. - - - - Gets or sets the minimum length. - - The minimum length. - - - - Gets or sets the maximum length. - - The maximum length. - - - - Gets or sets a number that the value should be divisble by. - - A number that the value should be divisble by. - - - - Gets or sets the minimum. - - The minimum. - - - - Gets or sets the maximum. - - The maximum. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - A flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - A flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - - - Gets or sets the minimum number of items. - - The minimum number of items. - - - - Gets or sets the maximum number of items. - - The maximum number of items. - - - - Gets or sets the of items. - - The of items. - - - - Gets or sets the of properties. - - The of properties. - - - - Gets or sets the of additional properties. - - The of additional properties. - - - - Gets or sets the pattern properties. - - The pattern properties. - - - - Gets or sets a value indicating whether additional properties are allowed. - - - true if additional properties are allowed; otherwise, false. - - - - - Gets or sets the required property if this property is present. - - The required property if this property is present. - - - - Gets or sets the identity. - - The identity. - - - - Gets or sets the a collection of valid enum values allowed. - - A collection of valid enum values allowed. - - - - Gets or sets a collection of options. - - A collection of options. - - - - Gets or sets disallowed types. - - The disallow types. - - - - Gets or sets the default value. - - The default value. - - - - Gets or sets the extend . - - The extended . - - - - Gets or sets the format. - - The format. - - - - Generates a from a specified . - - - - - Generate a from the specified type. - - The type to generate a from. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Gets or sets how undefined schemas are handled by the serializer. - - - - - Gets or sets the contract resolver. - - The contract resolver. - - - - The value types allowed by the . - - - - - No type specified. - - - - - String type. - - - - - Float type. - - - - - Integer type. - - - - - Boolean type. - - - - - Object type. - - - - - Array type. - - - - - Null type. - - - - - Any type. - - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Get and set values for a using reflection. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type - - - - - Represents a method that constructs an object. - - The object type to create. - - - - Specifies type name handling options for the . - - - - - Do not include the .NET type name when serializing types. - - - - - Include the .NET type name when serializing into a JSON object structure. - - - - - Include the .NET type name when serializing into a JSON array structure. - - - - - Always include the .NET type name when serializing. - - - - - Include the .NET type name when the type of the object being serialized is not the same as its declared type. - - - - - Converts the value to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert the value to. - The converted type. - - - - Converts the value to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert the value to. - The converted value if the conversion was successful or the default value of T if it failed. - - true if initialValue was converted successfully; otherwise, false. - - - - - Converts the value to the specified type. If the value is unable to be converted, the - value is checked whether it assignable to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert or cast the value to. - - The converted type. If conversion was unsuccessful, the initial value - is returned if assignable to the target type. - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Specifies the type of Json token. - - - - - This is returned by the if a method has not been called. - - - - - An object start token. - - - - - An array start token. - - - - - A constructor start token. - - - - - An object property name. - - - - - A comment. - - - - - Raw JSON. - - - - - An integer. - - - - - A float. - - - - - A string. - - - - - A boolean. - - - - - A null token. - - - - - An undefined token. - - - - - An object end token. - - - - - An array end token. - - - - - A constructor end token. - - - - - A Date. - - - - - Byte data. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - Determines whether the collection is null or empty. - - The collection. - - true if the collection is null or empty; otherwise, false. - - - - - Adds the elements of the specified collection to the specified generic IList. - - The list to add to. - The collection of elements to add. - - - - Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer. - - The type of the elements of source. - A sequence in which to locate a value. - The object to locate in the sequence - An equality comparer to compare values. - The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. - - - - Gets the type of the typed collection's items. - - The type. - The type of the typed collection's items. - - - - Gets the member's underlying type. - - The member. - The underlying type of the member. - - - - Determines whether the member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - Determines whether the property is an indexed property. - - The property. - - true if the property is an indexed property; otherwise, false. - - - - - Gets the member's value on the object. - - The member. - The target object. - The member's value on the object. - - - - Sets the member's value on the target object. - - The member. - The target. - The value. - - - - Determines whether the specified MemberInfo can be read. - - The MemberInfo to determine whether can be read. - /// if set to true then allow the member to be gotten non-publicly. - - true if the specified MemberInfo can be read; otherwise, false. - - - - - Determines whether the specified MemberInfo can be set. - - The MemberInfo to determine whether can be set. - if set to true then allow the member to be set non-publicly. - if set to true then allow the member to be set if read-only. - - true if the specified MemberInfo can be set; otherwise, false. - - - - - Determines whether the string is all white space. Empty string will return false. - - The string to test whether it is all white space. - - true if the string is all white space; otherwise, false. - - - - - Nulls an empty string. - - The string. - Null if the string was null, otherwise the string unchanged. - - - - Specifies the state of the . - - - - - An exception has been thrown, which has left the in an invalid state. - You may call the method to put the in the Closed state. - Any other method calls results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/Libraries/Npgsql.EntityFramework.dll b/Libraries/Npgsql.EntityFramework.dll index 364883f..5f33f2d 100644 Binary files a/Libraries/Npgsql.EntityFramework.dll and b/Libraries/Npgsql.EntityFramework.dll differ diff --git a/Libraries/Npgsql.EntityFramework.xml b/Libraries/Npgsql.EntityFramework.xml index ae9c44c..af0d628 100644 --- a/Libraries/Npgsql.EntityFramework.xml +++ b/Libraries/Npgsql.EntityFramework.xml @@ -16,26 +16,22 @@ The connection string. An initialized DbConnection. - + - Given a join expression and a projection, fetch all columns in the projection - that reference columns in the join. - - - - - Given an InputExpression append all from names (including nested joins) to the list. + Removes schema prefix e.g. "dto.Blogs" returns "Blogs" and "Posts" returns "Posts" + + - + - Get new ColumnExpression that will be used in projection that had it's existing columns moved. - These should be simple references to the inner column + Represents an InputExpression and what alias it will have when used in a FROM clause - + - Every property accessed in the list of columns must be adjusted for a new scope + A tree of subqueries, used when evaluating SQL text for DbPropertyExpressions in SqlSelectGenerator. + See SqlSelectGenerator.Visit(DbPropertyExpression) for more information. @@ -51,5 +47,17 @@ + + + Used for lookup in a Dictionary, since Tuple is not available in .NET 3.5 + + + + + Negates an expression. + If possible, replaces the operator of exp if exp is a negatable OperatorExpression, + else return a new OperatorExpression of type Not that wraps exp. + + diff --git a/Libraries/Npgsql.EntityFrameworkLegacy.dll b/Libraries/Npgsql.EntityFrameworkLegacy.dll index c5a2916..5c8b95b 100644 Binary files a/Libraries/Npgsql.EntityFrameworkLegacy.dll and b/Libraries/Npgsql.EntityFrameworkLegacy.dll differ diff --git a/Libraries/Npgsql.EntityFrameworkLegacy.xml b/Libraries/Npgsql.EntityFrameworkLegacy.xml index 38c36db..8a57475 100644 --- a/Libraries/Npgsql.EntityFrameworkLegacy.xml +++ b/Libraries/Npgsql.EntityFrameworkLegacy.xml @@ -4,26 +4,15 @@ Npgsql.EntityFrameworkLegacy - + - Given a join expression and a projection, fetch all columns in the projection - that reference columns in the join. + Represents an InputExpression and what alias it will have when used in a FROM clause - + - Given an InputExpression append all from names (including nested joins) to the list. - - - - - Get new ColumnExpression that will be used in projection that had it's existing columns moved. - These should be simple references to the inner column - - - - - Every property accessed in the list of columns must be adjusted for a new scope + A tree of subqueries, used when evaluating SQL text for DbPropertyExpressions in SqlSelectGenerator. + See SqlSelectGenerator.Visit(DbPropertyExpression) for more information. @@ -39,5 +28,17 @@ + + + Used for lookup in a Dictionary, since Tuple is not available in .NET 3.5 + + + + + Negates an expression. + If possible, replaces the operator of exp if exp is a negatable OperatorExpression, + else return a new OperatorExpression of type Not that wraps exp. + + diff --git a/Libraries/Npgsql.dll b/Libraries/Npgsql.dll index 1aeb4cf..2eba937 100644 Binary files a/Libraries/Npgsql.dll and b/Libraries/Npgsql.dll differ diff --git a/Libraries/Npgsql.xml b/Libraries/Npgsql.xml index 8133430..642180e 100644 --- a/Libraries/Npgsql.xml +++ b/Libraries/Npgsql.xml @@ -1274,10 +1274,362 @@ value will normalised it to 00:00:00. + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + - Summary description for LargeObjectManager. + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + OID describing object to delete. @@ -1496,7 +1848,7 @@ Convert to a postgres money. - + Convert to a postgres double with maximum precision. @@ -1955,6 +2307,16 @@ Mapping object to add types too. List of types that need to have OID's mapped. + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + Set Cache Size. The default value is 20. @@ -1982,10 +2344,6 @@ implementation. - This class represents the base class for the state pattern design pattern - implementation. - - @@ -2155,7 +2513,7 @@ Position in buffer in bytes to get data from. How much data in bytes in the buffer to use. - + Implements for version 3 of the protocol. @@ -2203,18 +2561,6 @@ Completes the implementation of Streamer for byte data. - - - Implements for version 2 of the protocol. - - - - - Encapsulates the null mapping bytes sent at the start of a version 2 - datarow message, and the process of identifying the nullity of the data - at a particular index - - This class represents a BackEndKeyData message received @@ -2228,11 +2574,6 @@ - - - For classes representing messages sent from the client to the server. - - This class represents the CancelRequest message sent to PostgreSQL @@ -2315,14 +2656,26 @@ A NpgsqlParameter object. - + + + Releases the resources used by the NpgsqlCommand. + + + - Slightly optimised version of ExecuteNonQuery() for internal use in cases where the number + Internal query shortcut for use in cases where the number of affected rows is of no interest. - This function must not be called with a query that returns result rows, after calling Prepare(), or. - with a query that requires parameter substitution of any kind. + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + Executes a SQL statement against the connection and returns the number of rows affected. @@ -2392,35 +2745,24 @@ A version of CommandText with the Parameters inserted. - + Process this.commandText, trimming each distinct command and substituting paramater tokens. - UTF8 encoded command ready to be sent to the backend. - - - Find the beginning and end of each distinct SQL command and produce - a list of descriptors, one for each command. Commands described are trimmed of - leading and trailing white space and their terminating semi-colons. - - Raw command text. - List of chunk descriptors. - - + Append a region of a source command text to an output command, performing parameter token substitutions. Stream to which to append output. Command text. - Starting index within src. - Length of region to be processed. - + + false if the query has multiple statements which are not allowed @@ -2443,6 +2785,11 @@ One of the CommandType values. The default is CommandType.Text. + + + DB connection. + + Gets or sets the NpgsqlConnection @@ -2450,12 +2797,22 @@ The connection to a data source. The default value is a null reference. + + + DB parameter collection. + + Gets the NpgsqlParameterCollection. The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + DB transaction. + + Gets or sets the NpgsqlTransaction @@ -2477,6 +2834,11 @@ Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + Design time visible. + + This class is responsible to create database commands for automatic insert, update and delete operations. @@ -2875,6 +3237,22 @@ The collection specified. + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + Occurs on NoticeResponses from the PostgreSQL backend. @@ -3047,16 +3425,27 @@ ConnectionState.Open or ConnectionState.Closed + + + Compatibility version. + + Version of the PostgreSQL backend. This can only be called when there is an active connection. + + + PostgreSQL server version. + + Protocol version in use. This can only be called when there is an active connection. + Always retuna Version3 @@ -3098,6 +3487,11 @@ User name. + + + Use extended types. + + Password. @@ -3108,6 +3502,11 @@ Determine if connection pooling will be used for this connection. + + + DB provider factory. + + Return an exact copy of this NpgsqlConnectionString. @@ -3158,11 +3557,6 @@ Gets or sets the backend server port. - - - Gets or sets the specified backend communication protocol version. - - Gets or sets the name of the database to be used after a connection is opened. @@ -3175,15 +3569,6 @@ Gets or sets the login user name. - - - This is a pretty horrible hack to fix https://github.com/npgsql/Npgsql/issues/133 - In a nutshell, starting with .NET 4.5 WindowsIdentity inherits from ClaimsIdentity - which doesn't exist in mono, and calling UserName getter above bombs. - The workaround is that the function that actually deals with WindowsIdentity never - gets called on mono, so never gets JITted and the problem goes away. - - Gets or sets the login password as a UTF8 encoded byte array. @@ -3204,11 +3589,6 @@ Gets or sets a value indicating whether to attempt to use SSL. - - - Gets the backend encoding. Always returns "UTF8". - - Gets or sets the time to wait while trying to establish a connection @@ -3282,6 +3662,16 @@ Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + Case insensative accessor for indivual connection string values. @@ -3350,6 +3740,12 @@ This method is responsible to release all portals used by this Connector. + + + Modify the backend statement_timeout value if needed. + + New timeout + Default SSL CertificateSelectionCallback implementation. @@ -3453,11 +3849,6 @@ Version of backend server this connector is connected to. - - - Backend protocol version in use by this connector. - - The physical connection socket to the backend. @@ -3488,11 +3879,6 @@ Report if the connection is in a transaction. - - - Report whether the current connection can support prepare functionality. - - Options that control certain aspects of native to backend conversions that depend @@ -3978,25 +4364,293 @@ Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). - + - Represents the method that handles the RowUpdated events. + Default delimiter. - The source of the event. - A NpgsqlRowUpdatedEventArgs that contains the event data. - + - Represents the method that handles the RowUpdating events. + Default separator. - The source of the event. - A NpgsqlRowUpdatingEventArgs that contains the event data. + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + Represents the method that handles the RowUpdated events. + + The source of the event. + A NpgsqlRowUpdatedEventArgs that contains the event data. + + + + Represents the method that handles the RowUpdating events. + + The source of the event. + A NpgsqlRowUpdatingEventArgs that contains the event data. This class represents an adapter from many commands: select, update, insert and delete to fill Datasets. + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. @@ -4030,6 +4684,13 @@ FIXME: Why this method returns String? + + + Has ordinal. + + + + Return the column name of the column named . @@ -4045,6 +4706,13 @@ Return the data NpgsqlDbType of the column at index . + + + Get specified field value. + /// + + + Get the value of a column as a . @@ -4055,6 +4723,46 @@ Index of the field to find. value of the field. + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + Gets the value of a column converted to a Guid. @@ -4121,7 +4829,7 @@ - Gets the value of a column as Byte. Not implemented. + Gets the value of a column as Byte. @@ -4145,6 +4853,12 @@ from it. + + + Get enumerator. + + + Is raised whenever Close() is called. @@ -4653,12 +5367,6 @@ The name of the Method A Object-Array with zero or more Ojects that are Arguments of the Method. - - - Sets/Returns the level of information to log to the logfile. - - The current LogLevel - Sets/Returns the filename to use for logging. @@ -4676,13 +5384,20 @@ The exception that is thrown when the PostgreSQL backend reports errors. - + Construct a backend error exception based on a list of one or more backend errors. The basic Exception.Message will be built from the first (usually the only) error in the list. + + + Get object data. + + + + Format a .NET style exception string. @@ -4823,6 +5538,12 @@ + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + EventArgs class to send Notification parameters. @@ -4877,10 +5598,24 @@ The m_Name of the parameter to map. One of the DbType values. + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, and the size. + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. The m_Name of the parameter to map. One of the DbType values. @@ -4889,8 +5624,15 @@ Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, the size, - and the source column m_Name. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. The m_Name of the parameter to map. One of the DbType values. @@ -4899,12 +5641,25 @@ - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, the size, - the source column m_Name, a ParameterDirection, - the precision of the parameter, the scale of the parameter, a - DataRowVersion to use, and the - value of the parameter. + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. The m_Name of the parameter to map. One of the DbType values. @@ -4920,6 +5675,11 @@ An Object that is the value of the NpgsqlParameter. + + + Reset DBType. + + Creates a new NpgsqlParameter that @@ -4942,6 +5702,11 @@ The default value is 0, which indicates that the data provider sets the precision for Value. + + + Whether to use an explicit cast when included in a query. + + Gets or sets the number of decimal places to which @@ -5026,6 +5791,11 @@ An Object that is the value of the parameter. The default value is null. + + + Source column mapping. + + Represents a collection of parameters relevant to a NpgsqlCommand @@ -5223,6 +5993,40 @@ An IEnumerator that can be used to iterate through the collection. + + + Add an Array of parameters to the collection. + + Parameters to add. + + + + Get parameter. + + + + + + + Get parameter. + + + + + + + Set parameter. + + + + + + + Set parameter. + + + + In methods taking an object as argument this method is used to verify @@ -5230,6 +6034,47 @@ The object to verify + + + Report the offset within the collection of the given parameter. + + Parameter to find. + Index of the parameter, or -1 if the parameter is not present. + + + + Insert the specified parameter into the collection. + + Index of the existing parameter before which to insert the new one. + Parameter to insert. + + + + Report whether the specified parameter is present in the collection. + + Parameter to find. + True if the parameter was found, otherwise false. + + + + Remove the specified parameter from the collection. + + Parameter to remove. + True if the parameter was found and removed, otherwise false. + + + + Convert collection to a System.Array. + + Destination array. + Starting index in destination array. + + + + Convert collection to a System.Array. + + NpgsqlParameter[] + Gets the NpgsqlParameter with the specified name. @@ -5244,12 +6089,32 @@ The zero-based index of the NpgsqlParameter to retrieve. The NpgsqlParameter at the specified index. + + + Report whether the collection is read only. Always false. + + + + + Report whether the collection is fixed size. Always false. + + + + + Report whether the collection is synchronized. + + Gets the number of NpgsqlParameter objects in the collection. The number of NpgsqlParameter objects in the collection. + + + Sync root. + + This class represents the ParameterStatus message sent from PostgreSQL @@ -5275,14 +6140,15 @@ Used when a connection is closed - + - Summary description for NpgsqlQuery + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. - + - This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + The index of the current field in the stream, i.e. the one that hasn't + been read yet @@ -5378,6 +6244,12 @@ Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + Dispose. + + + Commits the database transaction. @@ -5413,6 +6285,11 @@ The NpgsqlConnection object associated with the transaction. + + + DB connection. + + Specifies the IsolationLevel for this transaction. diff --git a/README.md b/README.md index 3f23b59..c88e62d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ There are two installation choices: binary installer and compilation from source ## Binary Installer Download and run the installer for the version you would like: +* [2.1.0](https://github.com/MatthewGerber/asymmetric-threat-tracker/releases/download/v2.1.0/setup.exe) (5/27/2015) * [2.0.0](https://github.com/MatthewGerber/asymmetric-threat-tracker/releases/download/v2.0.0/setup.exe) (8/21/2014) * [1.3](https://github.com/MatthewGerber/asymmetric-threat-tracker/releases/download/v1.3/setup.exe) (5/27/2014) @@ -28,6 +29,7 @@ After you run the installer, edit the configuration files in the Config sub-dire * Obtain the source code: * Clone the [ATT GitHub repository](https://github.com/MatthewGerber/asymmetric-threat-tracker.git). * Source archives: + * 2.1.0 (5/27/2015) ([zip](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v2.1.0.zip), [tar.gz](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v2.1.0.tar.gz)) * 2.0.0 (8/21/2014) ([zip](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v2.0.0.zip), [tar.gz](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v2.0.0.tar.gz)) * 1.3 (5/27/2014) ([zip](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v1.3.zip), [tar.gz](https://github.com/MatthewGerber/asymmetric-threat-tracker/archive/v1.3.tar.gz)) * If you're going to build the installer or cut releases, edit "Installer\Installer.isl" replacing "C:\Users\matt\Documents\GitHub\asymmetric-threat-tracker" (or whatever appears) with the appropriate path to your local repository. This assumes that you have installed the InstallShield add-on as described above. If you're not going to work with the installer, skip this step. diff --git a/RELEASE.txt b/RELEASE.txt index 95a29f2..e9aa541 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,15 +1,17 @@ The process for cutting a release is as follows: -* Check out the most recent version of develop and test it, fixing any errors. +* Check out the most recent version of develop. +* Open the ATT solution within Visual Studio and load the Installer project if not currently loaded. +* Within the Installer project, set the Product Version under Installer -> Organize Your Setup -> General Information -> General. Follow Semantic Versioning guidelines in forming the version number: http://semver.org +* In the Application properties for the ATT project, edit the Assembly Information, updating the Assembly version and File version with the version number from the previous step. Do the same for the GUI project. * Edit README.md, adding links to the new release under the "Binary Installer" and "Compilation from Source" sections. +* Build the ATT solution and test it, fixing any errors. * Commit all changes to develop. -* Merge all changes from develop into master. -* Check out master. -* Open ATT within Visual Studio and load the Installer project if not currently loaded. -* Within the Installer project, set the Product Version under Installer -> Organize Your Setup -> General Information -> General. Follow Semantic Versioning guidelines in forming the version number: http://semver.org/ -* Build the ATT Solution, resolve any errors, and test the ATT by installing and running it. The installer should be at the following location: +* Merge all changes from develop into master and check out master. +* Build the ATT solution, resolve any errors, and test the ATT by installing and running it. The installer should be at the following location: {att_repository}\Installer\Installer\Express\SingleImage\DiskImages\DISK1\setup.exe - -* On GitHub, draft a new release with tag "vX.Y.Z" and release title "ATT release X.Y.Z", attaching the binary installer file (setup.exe) that you built above. + +* Merge any changes to master (e.g., fixes) back into develop and commit all branches to GitHub. +* On GitHub, draft a new release from master with tag "vX.Y.Z" and release title "ATT release X.Y.Z", attaching the binary installer file (setup.exe) that you built above. * Rebuild the GitHub website via Settings -> Automatic page generator. Click Load README.md, use the Tactile layout, publish the page, select the gh-pages branch, and edit the page to include "" at the end of the header element. The updated website should appear within a few minutes.