mlts-experiment-data
Version:
Machine learning experiment data downloader.
64 lines • 1.87 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils/utils");
var Dataset = /** @class */ (function () {
function Dataset(_x, _y, _t, _ty) {
this._x = _x;
this._y = _y;
this._t = _t;
this._ty = _ty;
}
Object.defineProperty(Dataset.prototype, "train", {
get: function () {
return utils_1.tuple(this._x, this._y);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Dataset.prototype, "test", {
get: function () {
return utils_1.tuple(this._t, this._ty);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Dataset.prototype, "features", {
get: function () {
return utils_1.product(this._x.shape.slice(1));
},
enumerable: true,
configurable: true
});
Object.defineProperty(Dataset.prototype, "trainSamples", {
get: function () {
return this._x.shape[0];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Dataset.prototype, "testSamples", {
get: function () {
return this._t.shape[0];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Dataset.prototype, "classes", {
get: function () {
return utils_1.product(this._y.shape.slice(1));
},
enumerable: true,
configurable: true
});
Dataset.prototype.description = function () {
return {
samples: this.trainSamples,
testSamples: this.testSamples,
features: this.features,
classes: this.classes,
};
};
return Dataset;
}());
exports.Dataset = Dataset;
//# sourceMappingURL=Data.js.map