Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 12, 2019 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/07ea3ffad1ba545af8d89067203f0d33 to your computer and use it in GitHub Desktop.
Save NMZivkovic/07ea3ffad1ba545af8d89067203f0d33 to your computer and use it in GitHub Desktop.
public Model(MLContext mlContext, IEstimator<ITransformer> algorythm, string trainingDataLocation)
{
_mlContext = mlContext;
_algorythim = algorythm;
_trainingDataView = _mlContext.Data.LoadFromTextFile<BikeSharingDemandSample>(
path: trainingDataLocation,
hasHeader: true,
separatorChar: ',');
Name = algorythm.GetType().ToString().Split('.').Last();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment