Helper Functions¶
-
class
corels.
RuleList
(rules=[], features=[], prediction_name='')[source]¶ This class represents a rulelist. It is used to store the model generated by CorelsClassifier.fit.
-
rules
¶ Set of rule indices (into the features array) that comprise the rulelist.
Type: list
-
features
¶ Set of all features. An array of strings.
Type: list
-
prediction_name
¶ Name of the feature being predicted.
Type: str
-
-
corels.
load_from_csv
(fname)[source]¶ Load a dataset from a csv file. The csv file must contain n_samples+1 rows, each with n_features+1 columns. The last column of each sample is its prediction class, and the first row of the file contains the feature names and prediction class name.
Parameters: fname (str) – File name of the csv data file Returns: - X (array-like, shape = [n_samples, n_features]) – The sample data
- y (array-line, shape = [n_samples]) – The target values for the sample data
- features (list) – A list of strings of length n_features. Specifies the names of each of the features.
- prediction_name (str) – The name of the prediction class