Skip to content

Commit

Permalink
Class rename and diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
elaboy committed Dec 11, 2023
1 parent 18aecce commit cda0872
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

namespace UsefulProteomicsDatabases
{
public static class ChronologerDictionary
/// <summary>
/// This class provides static methods to build dictionaries for different models.
/// </summary>
public static class DictionaryBuilder
{
public static Dictionary<(char, string), int>
GetChronologerDictionary(TypeOfDictionary dict)
Expand Down
42 changes: 42 additions & 0 deletions mzLib/MachineLearning/MachineLearningDiagram.cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="MachineLearning.DeepTorch">
<Position X="8" Y="2" Width="4.5" />
<TypeIdentifier>
<HashCode>AAAgAgAAAACAAgAAAAAxAAAIICgAIAQAAIAACABCAAg=</HashCode>
<FileName>DeepTorch.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="MachineLearning.TorchDataset">
<Position X="14.25" Y="2.5" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAACAAAAAAAAAAAAAAQAAAAAABAAAAAAQAAAAAA=</HashCode>
<FileName>TorchDataset.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="MachineLearning.RetentionTimePredictionModels.Chronologer">
<Position X="8.75" Y="8" Width="3.25" />
<TypeIdentifier>
<HashCode>ABIgAgAIAACAAAAAAAAwQAAIOCAAAEAAAIAACAACACg=</HashCode>
<FileName>RetentionTimePredictionModels\Chronologer.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UsefulProteomicsDatabases.DictionaryBuilder">
<Position X="13.75" Y="8" Width="4.25" />
<Compartments>
<Compartment Name="Nested Types" Collapsed="false" />
</Compartments>
<NestedTypes>
<Enum Name="UsefulProteomicsDatabases.DictionaryBuilder.TypeOfDictionary" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>DictionaryBuilder.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
</NestedTypes>
<TypeIdentifier>
<HashCode>AAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DictionaryBuilder.cs</FileName>
</TypeIdentifier>
</Class>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using TorchSharp;
using TorchSharp.Modules;
using TorchSharp.Utils;
using static UsefulProteomicsDatabases.ChronologerDictionary;
using static UsefulProteomicsDatabases.DictionaryBuilder;

namespace MachineLearning.RetentionTimePredictionModels
{
Expand Down
10 changes: 5 additions & 5 deletions mzLib/Test/TestChronologer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class TestChronologer
public void TestChronologerMethods()
{
var dictionary =
ChronologerDictionary.GetChronologerDictionary(ChronologerDictionary.TypeOfDictionary.Chronologer);
DictionaryBuilder.GetChronologerDictionary(DictionaryBuilder.TypeOfDictionary.Chronologer);
var chronologer = new Chronologer(dictionary, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"RetentionTimePredictionModels",
"Chronologer_20220601193755_TorchSharp.dat"));

Check warning on line 22 in mzLib/Test/TestChronologer.cs

View check run for this annotation

Codecov / codecov/patch

mzLib/Test/TestChronologer.cs#L17-L22

Added lines #L17 - L22 were not covered by tests
Expand Down Expand Up @@ -47,7 +47,7 @@ public void TestChronologerMethods()
public void TestDatasets()
{
var dictionary =
ChronologerDictionary.GetChronologerDictionary(ChronologerDictionary.TypeOfDictionary.Chronologer);
DictionaryBuilder.GetChronologerDictionary(DictionaryBuilder.TypeOfDictionary.Chronologer);

Check warning on line 50 in mzLib/Test/TestChronologer.cs

View check run for this annotation

Codecov / codecov/patch

mzLib/Test/TestChronologer.cs#L48-L50

Added lines #L48 - L50 were not covered by tests

var chronologer = new Chronologer(dictionary, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"RetentionTimePredictionModels",
Expand Down Expand Up @@ -115,7 +115,7 @@ public void TestDatasets()
public void TestTensorize()
{
var dictionary =
ChronologerDictionary.GetChronologerDictionary(ChronologerDictionary.TypeOfDictionary.Chronologer);
DictionaryBuilder.GetChronologerDictionary(DictionaryBuilder.TypeOfDictionary.Chronologer);

Check warning on line 118 in mzLib/Test/TestChronologer.cs

View check run for this annotation

Codecov / codecov/patch

mzLib/Test/TestChronologer.cs#L116-L118

Added lines #L116 - L118 were not covered by tests

var chronologer = new Chronologer(dictionary, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"RetentionTimePredictionModels",
Expand All @@ -136,7 +136,7 @@ public void TestTensorize()
public void TestForwardPass()
{
var dictionary =
ChronologerDictionary.GetChronologerDictionary(ChronologerDictionary.TypeOfDictionary.Chronologer);
DictionaryBuilder.GetChronologerDictionary(DictionaryBuilder.TypeOfDictionary.Chronologer);

Check warning on line 139 in mzLib/Test/TestChronologer.cs

View check run for this annotation

Codecov / codecov/patch

mzLib/Test/TestChronologer.cs#L137-L139

Added lines #L137 - L139 were not covered by tests

var chronologer = new Chronologer(dictionary, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"RetentionTimePredictionModels",
Expand All @@ -155,7 +155,7 @@ public void TestForwardPass()
public void TestTrainMethod()
{
var dictionary =
ChronologerDictionary.GetChronologerDictionary(ChronologerDictionary.TypeOfDictionary.Chronologer);
DictionaryBuilder.GetChronologerDictionary(DictionaryBuilder.TypeOfDictionary.Chronologer);

Check warning on line 158 in mzLib/Test/TestChronologer.cs

View check run for this annotation

Codecov / codecov/patch

mzLib/Test/TestChronologer.cs#L156-L158

Added lines #L156 - L158 were not covered by tests

var chronologer = new Chronologer(dictionary, Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"RetentionTimePredictionModels",
Expand Down

0 comments on commit cda0872

Please sign in to comment.