Open PapadopoulosDimitrios opened 4 months ago
Hm what is your imodelsx
version? Can you maybe try pip install --upgrade imodelsx
and then rerunning?
The version is 1.0.7 . I am using google colab so every time I start the environment anew.
The code is basically from the posted example:
X, y = make_regression(n_samples=5000, n_features=5, n_informative=3)
model_KAN = imodelsx.KANRegressor( hidden_layer_sizes=[32,64], regularize_activation=1.0, regularize_entropy=1.0 )
print(model_KAN)
model_KAN.fit(X, y) y_pred = model_KAN.predict(X)
test_correlation = np.corrcoef(y, y_pred.flatten())[0, 1] print('Test correlation:', test_correlation)
I faced the same problem with this library.
print(imodelsx.KANRegressor( hidden_layer_sizes=[32,64], hidden_layer_size=36, regularize_activation=1.0, regularize_entropy=1.0 ))
trying out this code in a Jupyter notebook I get the following error: AttributeError: 'KANRegressor' object has no attribute 'hidden_layer_size'
Same thing happens if I use hidden_layer_size=32. Any insights?