Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Microsoft.ML.sln
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CodeAnalyzer",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CodeAnalyzer.Tests", "test\Microsoft.ML.CodeAnalyzer.Tests\Microsoft.ML.CodeAnalyzer.Tests.csproj", "{3E4ABF07-7970-4BE6-B45B-A13D3C397545}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AdditionalLearners", "src\Microsoft.ML.AdditionalLearners\Microsoft.ML.AdditionalLearners.csproj", "{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -329,6 +331,14 @@ Global
{3E4ABF07-7970-4BE6-B45B-A13D3C397545}.Release|Any CPU.Build.0 = Release|Any CPU
{3E4ABF07-7970-4BE6-B45B-A13D3C397545}.Release-Intrinsics|Any CPU.ActiveCfg = Release|Any CPU
{3E4ABF07-7970-4BE6-B45B-A13D3C397545}.Release-Intrinsics|Any CPU.Build.0 = Release|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Debug-Intrinsics|Any CPU.Build.0 = Debug|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Release|Any CPU.Build.0 = Release|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Release-Intrinsics|Any CPU.ActiveCfg = Release|Any CPU
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D}.Release-Intrinsics|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -367,6 +377,7 @@ Global
{BF66A305-DF10-47E4-8D81-42049B149D2B} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
{B4E55B2D-2A92-46E7-B72F-E76D6FD83440} = {7F13E156-3EBA-4021-84A5-CD56BA72F99E}
{3E4ABF07-7970-4BE6-B45B-A13D3C397545} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{E2169EDF-88F5-4264-BDEA-164E7EBFBE3D} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Pack">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageDescription>ML.NET additional learners. They depend on other packages, like MlNetMklDeps. </PackageDescription>

@TomFinley TomFinley Jul 31, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additional [](start = 31, length = 10)

The name "additional learners" is something we might want to reconsider, since in future as we publish more wrappers we will surely want descriptive names.

I think naming it OrdinaryLeastSquares is probably a fine choice since that's literally all it is? #Pending

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that maybe we can have SymSGD here too, and other learners that need to drag dependencies?

@Ivanidzo4ka didn't like it either and suggested MklDepsLearners.


In reply to: 206582236 [](ancestors = 206582236)

@Zruty0 Zruty0 Jul 31, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MklDeps also doesn't feel good, but it's better. Can we have a name that conveys 'these learners use MKL's optimized linear algebra', without actually saying 'MKL' in the name?

I don't think this should be 'all learners with big dependencies', because it doesn't actually improve the experience too much (if you need one of these learners, you have to grab all). I'd much rather have 'learners depending on MKL' and 'learners depending on OtherHeaveDependency' separate


In reply to: 206584367 [](ancestors = 206584367,206582236)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renaming it to HalLearners. If that doesn's sound good, please suggest a name :)


In reply to: 206634151 [](ancestors = 206634151,206584367,206582236)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like HAL learners.


In reply to: 206661889 [](ancestors = 206661889,206634151,206584367,206582236)

</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../Microsoft.ML/Microsoft.ML.nupkgproj" />
<PackageReference Include="MlNetMklDeps" Version="$(MlNetMklDepsPackageVersion)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project DefaultTargets="Pack">

<Import Project="Microsoft.ML.AdditionalLearners.nupkgproj" />

@Ivanidzo4ka Ivanidzo4ka Jul 30, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdditionalLearners [](start = 32, length = 18)

MklDependentLearners maybe? it just separation of standard/additional learner is unclear from the names #Closed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was thinking that we could use it for other learners, that we don;t want on the core package because of other dependencies. We could bundle them all in one package..


In reply to: 206356744 [](ancestors = 206356744)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we continue the discussion in the other comment (Learners.nupkgproj) and close this one


In reply to: 206357569 [](ancestors = 206357569,206356744)


</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeInPackage>Microsoft.ML.AdditionalLearners</IncludeInPackage>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

@Ivanidzo4ka Ivanidzo4ka Jul 30, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[](start = 0, length = 1)

HERESY! #Resolved

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you spot them in codeflow !!


In reply to: 206356521 [](ancestors = 206356521)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on top right corner next to (show both) (on right side) is "a.b" button. click on it :)


In reply to: 206356725 [](ancestors = 206356725,206356521)

</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.ML.Core\Microsoft.ML.Core.csproj" />
<ProjectReference Include="..\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\Microsoft.ML.StandardLearners\Microsoft.ML.StandardLearners.csproj" />
<ProjectReference Include="..\Microsoft.ML\Microsoft.ML.csproj" />
<PackageReference Include="MlNetMklDeps" Version="$(MlNetMklDepsPackageVersion)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.ML.Runtime.Internal.Internallearn;
using Microsoft.ML.Runtime;
using Microsoft.ML.Runtime.AdditionalLearners;
using Microsoft.ML.Runtime.Internal.Internallearn;
using Microsoft.ML.Runtime.Internal.Utilities;
using Microsoft.ML.Runtime.CommandLine;
using Microsoft.ML.Runtime.Data;
using Microsoft.ML.Runtime.EntryPoints;
using Microsoft.ML.Runtime.Learners;
using Microsoft.ML.Runtime.Model;
using Microsoft.ML.Runtime.Internal.Utilities;
using Microsoft.ML.Runtime.Training;
using System.Runtime.InteropServices;

Expand All @@ -30,7 +31,7 @@

[assembly: LoadableClass(typeof(void), typeof(OlsLinearRegressionTrainer), null, typeof(SignatureEntryPointModule), OlsLinearRegressionTrainer.LoadNameValue)]

namespace Microsoft.ML.Runtime.Learners
namespace Microsoft.ML.Runtime.AdditionalLearners
{
/// <include file='doc.xml' path='doc/members/member[@name="OLS"]/*' />
public sealed class OlsLinearRegressionTrainer : TrainerBase<OlsLinearRegressionPredictor>
Expand Down Expand Up @@ -220,7 +221,7 @@ private OlsLinearRegressionPredictor TrainCore(IChannel ch, FloatLabelCursor.Fac
catch (DllNotFoundException)
{
// REVIEW: Is there no better way?
throw ch.ExceptNotSupp("The MKL library (Microsoft.ML.MklImports.dll) or one of its dependencies is missing.");
throw ch.ExceptNotSupp("The MKL library (Microsoft.ML.MklImports) or one of its dependencies is missing.");
}
// Solve for beta in (LL')beta = X'y:
Mkl.Pptrs(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, m, 1, xtx, xty, 1);
Expand Down Expand Up @@ -466,7 +467,7 @@ public static void Pptri(Layout layout, UpLo uplo, int n, Double[] ap)
Desc = "Train an OLS regression model.",
UserName = UserNameValue,
ShortName = ShortName,
XmlInclude = new[] { @"<include file='../Microsoft.ML.StandardLearners/Standard/doc.xml' path='doc/members/member[@name=""OLS""]/*' />" })]
XmlInclude = new[] { @"<include file='../Microsoft.ML.AdditionalLearners/Standard/doc.xml' path='doc/members/member[@name=""OLS""]/*' />" })]

@eerhardt eerhardt Jul 31, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right path?

  1. Why do we need to go up a directory, and then back into the same directory we are already in?
  2. I don't see a Standard folder that doc.xml is in. It looks like it is just directly under this current directory. #Resolved

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference is relative to the CSharpApi.cs file, in Microsoft.ML. This line of xml comment will appear atop the OrdinaryLeastSqaresregressor in the C#api, and from there make its way in the XML.


In reply to: 206638688 [](ancestors = 206638688)

public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, Arguments input)
{
Contracts.CheckValue(env, nameof(env));
Expand Down
27 changes: 27 additions & 0 deletions src/Microsoft.ML.AdditionalLearners/doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>

<member name="OLS">

@eerhardt eerhardt Jul 31, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<summary>
Train an OLS regression model.
</summary>
<remarks>
<a href='https://en.wikipedia.org/wiki/Ordinary_least_squares'>Ordinary least squares (OLS)</a> is a parameterized regression method.
It assumes that the conditional mean of the dependent variable follows a linear function of the dependent variables.
The parameters of the regressor can be estimated by minimizing the squares of the difference between observed values and the predictions.
</remarks>
<example>
<code language="csharp">
new OrdinaryLeastSquaresRegressor
{
L2Weight = 0.1,
PerParameterSignificance = false,
NormalizeFeatures = Microsoft.ML.Models.NormalizeOption.Yes
}
</code>
</example>
</member>

</members>
</doc>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<ProjectReference Include="..\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\Microsoft.ML\Microsoft.ML.csproj" />
<PackageReference Include="MlNetMklDeps" Version="$(MlNetMklDepsPackageVersion)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public override void SaveAsIni(TextWriter writer, RoleMappedSchema schema, ICali

public abstract class RegressionPredictor : LinearPredictor
{
internal RegressionPredictor(IHostEnvironment env, string name, ref VBuffer<Float> weights, Float bias)
protected RegressionPredictor(IHostEnvironment env, string name, ref VBuffer<Float> weights, Float bias)
: base(env, name, ref weights, bias)
{
}
Expand Down
Loading