Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            var employeeSkillPath = System.IO.Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.Employee_skills_file);
            var skillListPath     = System.IO.Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.Skill_file);

            var trainingResult = Training.TrainModel(employeeSkillPath, skillListPath);


            var modelPath = Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.model_file);

            Training.SaveModel(trainingResult.model, trainingResult.schema, modelPath);

            var(currentSkills, recommendedSkills) = Prediction.GetRecommendedSkills(modelPath, employeeSkillPath, skillListPath, "E3574");
        }
Exemplo n.º 2
0
        public Predictions Get(string employeeId)
        {
            if (string.IsNullOrEmpty(employeeId))
            {
                throw new ArgumentNullException($"Parameter employeeId cannot be empty.");
            }
            var returnValue = new Predictions();

            var employeeSkillPath = System.IO.Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.Employee_skills_file);
            var skillListPath     = System.IO.Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.Skill_file);
            var modelPath         = System.IO.Path.Combine(Environment.CurrentDirectory, Constants.Data_directory, Constants.model_file);

            var(currentSkills, recomendedSkills) = Prediction.GetRecommendedSkills(modelPath, employeeSkillPath, skillListPath, employeeId);

            returnValue.CurrentSkills     = currentSkills.AsEnumerable();
            returnValue.RecommendedSkills = recomendedSkills;
            return(returnValue);
        }