API and Command Reference

This outline covers the available APIs and commands within HelixML. The helix command and its options are a primary focus.

Helix CLI

The helix command offers a command-line interface for interacting with HelixML. It provides various options to manage models, data, and experiments.

Helix Command Options

The helix command supports numerous options, allowing for flexible interaction with HelixML. Here are some notable examples:

  1. helix train: Trains a HelixML model on the specified dataset.

    • Usage: helix train --model <model_name> --dataset <dataset_name>

    • Options:

      • --model: Specifies the model to train. (Required)

      • --dataset: Specifies the dataset to use for training. (Required)

      • --epochs: Specifies the number of epochs for training. (Default: 100)

      • --batch_size: Specifies the batch size for training. (Default: 32)

      • --learning_rate: Specifies the learning rate for training. (Default: 0.001)

    • Example: helix train --model my_model --dataset my_dataset --epochs 200 --batch_size 64 --learning_rate 0.0001

  2. helix predict: Makes predictions using a trained HelixML model.

    • Usage: helix predict --model <model_name> --input <input_data>

    • Options:

      • --model: Specifies the trained model to use for predictions. (Required)

      • --input: Specifies the input data for prediction. (Required)

      • --output: Specifies the output file for predictions. (Optional)

    • Example: helix predict --model my_trained_model --input my_input_data --output predictions.csv

  3. helix evaluate: Evaluates the performance of a trained HelixML model.

    • Usage: helix evaluate --model <model_name> --dataset <dataset_name>

    • Options:

      • --model: Specifies the trained model to evaluate. (Required)

      • --dataset: Specifies the dataset to use for evaluation. (Required)

      • --metrics: Specifies the evaluation metrics to calculate. (Default: accuracy, precision, recall, f1-score)

    • Example: helix evaluate --model my_trained_model --dataset my_test_dataset --metrics accuracy,precision,recall

  4. helix info: Displays information about a HelixML model.

    • Usage: helix info --model <model_name>

    • Options:

      • --model: Specifies the model to display information about. (Required)
    • Example: helix info --model my_model

  5. helix list: Lists all available HelixML models.

    • Usage: helix list

    • Options:

      • --type: Specifies the type of models to list. (Optional, values: all, trained, untrained)
    • Example: helix list --type trained

Helix API

HelixML provides a Python API for programmatic access to its functionality. This API offers a comprehensive set of classes and functions for working with models, data, and experiments.

Data Loading and Preprocessing

The helix.data module offers functions and classes for loading and preprocessing data.

  • helix.data.load_dataset: Loads a dataset from a file or URL.
  • helix.data.preprocess_dataset: Preprocesses a dataset for training.

Model Training and Evaluation

The helix.models module contains classes for various machine learning models supported by HelixML.

  • helix.models.Model: Base class for all HelixML models.
  • helix.models.LinearRegression: Linear regression model.
  • helix.models.LogisticRegression: Logistic regression model.
  • helix.models.DecisionTreeClassifier: Decision tree classifier.
  • helix.models.RandomForestClassifier: Random forest classifier.

The helix.metrics module offers functions for evaluating model performance.

  • helix.metrics.accuracy_score: Calculates the accuracy of a model.
  • helix.metrics.precision_score: Calculates the precision of a model.
  • helix.metrics.recall_score: Calculates the recall of a model.
  • helix.metrics.f1_score: Calculates the F1-score of a model.

Example Usage

import helix
          
          # Load a dataset
          dataset = helix.data.load_dataset("my_dataset.csv")
          
          # Preprocess the dataset
          preprocessed_dataset = helix.data.preprocess_dataset(dataset)
          
          # Train a model
          model = helix.models.LinearRegression()
          model.fit(preprocessed_dataset)
          
          # Make predictions
          predictions = model.predict(new_data)
          
          # Evaluate the model
          accuracy = helix.metrics.accuracy_score(predictions, true_labels)
          
          # Print the results
          print(f"Accuracy: {accuracy}")
          

Documentation Sources

Contribution Guidelines

Contributions to HelixML are welcome! Please refer to the Contribution Guidelines for detailed information on how to contribute.