Reputation: 21
I'm trying to create a categorial model. I have a boolean type which I want to predict using multiple features (floats) in c#. I've tried many different codes from online, but I thought that this one would represent my problem the best:
However, one thing that I keep running into is this bug: System.DllNotFoundException: 'Unable to load DLL 'lib_lightgbm': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'
I originally started with the latest Microsoft.ML 3.0 version, so I thought maybe the code is too old and so I downgradeded it to version 2.0.0, I even went as far as downgrading all the packages to the time the article I mentioned was written. Here is my piece of code:
//Creating the data pipeline
var dataProcessPipeline = mLContext.Transforms.Concatenate("Features", new[] { "F1", "F2", "F3",
"F4", "F4", "F5" });
// Choosing algorithm
var trainer = mLContext.BinaryClassification.Trainers.LightGbm(labelColumnName: "label",
featureColumnName: "Features");
// Appending algorithm to pipeline
var trainingPipeline = dataProcessPipeline.Append(trainer);
ITransformer model = trainingPipeline.Fit(trainingData);
The namespaces I'm using are:
using Microsoft.ML;
using OcapOptimaal.CHPUsageMLv2.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
What I find peculiar is that it's not using the Microsoft.ML.Trainers.LightGbm namespace (as in it's grey).
The connecting package of the Microsoft LightGbm also doesn't show up in my reference even though I'm 100% sure that I've installed it. I've also tried manually adding it via references but then I get this error: enter image description here
I've also tried adding the X64 solution I've seen floating around to the .csproj file but that simply made my project dissapear from Visual Studio (luckily I had a git backup). I don't know if this is a visual studio bug that somehow the file is somewhere lost in the package files on my PC or if it's an issue with the code, that's why I added the visual studio tag. My apoplogies if that is incorrect.
Small update: I've also tried using the FastTree, however this gave the same error. I think there might be an issue with the microsoft.ML and it's connection?
Upvotes: 1
Views: 194
Reputation: 1126
Maybe you are trying to run code on "clean/fresh" machine
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
inside csproj (but as I see you have tried it)Source: https://github.com/dotnet/machinelearning/issues/1945#issuecomment-569597078
Upvotes: 0