dmlfw (Daniyal Machine Learning Framework)
example_dmlfw_ml_configurations.c

Example usage:

#include <stdio.h>
#include <stdlib.h>
#include <dmlfw_error.h>
int main(void) {
char err[512], dbg[512];
if (dmlfw_error()) {
dmlfw_get_error_string(err, sizeof(err));
dmlfw_get_debug_string(dbg, sizeof(dbg));
printf("Creation failed: %s\nDebug info: %s\n", err, dbg);
return EXIT_FAILURE;
}
if (dmlfw_error()) {
dmlfw_get_error_string(err, sizeof(err));
dmlfw_get_debug_string(dbg, sizeof(dbg));
printf("Setting learning rate failed: %s\nDebug info: %s\n", err, dbg);
return EXIT_FAILURE;
}
// Additional configuration calls with error checks...
return EXIT_SUCCESS;
}
int main()
Main function to execute batch gradient descent linear regression example.
Definition batch_gd.c:316
Core machine learning algorithms and configuration facilities.
Centralized error handling interface for the framework.
void dmlfw_get_error_string(char *error_string, uint32_t size)
Copies the last error message into the provided character buffer.
uint8_t dmlfw_error(void)
Checks if the last framework call resulted in an error.
void dmlfw_get_debug_string(char *debug_string, uint32_t size)
Copies detailed debug information about the last error into the provided character buffer.
void dmlfw_gradient_descent_options_destroy(dmlfw_gradient_descent_options *gd_options)
Destroys a gradient descent options object and frees associated memory.
struct _dmlfw_gradient_descent_options dmlfw_gradient_descent_options
Opaque structure representing gradient descent configuration options.
Definition dmlfw_ml_configurations.h:121
dmlfw_gradient_descent_options * dmlfw_gradient_descent_options_create_new(void)
Creates a new gradient descent options object with default values.
void dmlfw_gradient_descent_options_set_learning_rate(dmlfw_gradient_descent_options *gd_options, double learning_rate)
Sets the learning rate.

Ownership:

Creation functions allocate new configuration objects; callers must free them using the provided destroy function.