#!/usr/bin/env raku
use v6.d;

use lib <. lib>;

use ML::NLPTemplateEngine;

#`[
my $q = 'Make a classifier with the method RandomForest over the data dfTitanic; show precision and accuracy; plot True Positive Rate vs Positive Predictive Value.';

say concretize(Whatever, $q):echo;
]

#`[
my $lsaCommand = q:to/END/;
Extract 20 topics from the text corpus aAbstracts using
the method NNMF. Show statistical thesaurus with the words neural, function, and notebook.
END

#say concretize($lsaCommand, template => 'LSAMon'):echo;
say concretize($lsaCommand, template => 'LatentSemanticAnalysis', finder => 'gemini'):echo;
]

#`[
my $qrCommand = q:to/END/;
Compute quantile regression with probabilities 0.4 and 0.6, with interpolation order 2, for the dataset dfTempBoston.
END

#say concretize($qrCommand, finder => 'gemini', lang => 'R'):echo;
say concretize($qrCommand):echo;
]

#note (%*ENV<OPENAI_API_KEY>);
#note (%*ENV<PALM_API_KEY>);

my $cmd = "
use tsTemp;
echo data summary;
rescale the time axis;
compute quantile regression for 0.1, 0.5, and 0.9;
show plot
";

say concretize($cmd):echo;


#`[
my $command = q:to/END/;
Make random table with 6 rows and 4 columns with the names A1, B2, C3, D4.
END

say concretize($command, template => 'RandomTabularDataset', finder => 'chatgpt', lang => 'Raku'):echo;
]