ifeatureselector.cs

来自「利用人工智能算法对财务数据进行分析」· CS 代码 · 共 26 行

CS
26
字号
namespace FinanceAI.AI
{
    interface IFeatureSelector
    {
        // Select the appropriate features from the sample
        ISample Select( ISample sample );
    }

    // Select all features in the original sample
    public class FeatureSelectorAll : IFeatureSelector
    {
        public ISample Select( ISample sample )
        {
            return sample;
        }
    }

    // Select only the Description feature of the sample
    public class FeatureSelectorDescription : IFeatureSelector
    {
        public ISample Select( ISample sample )
        {
            return new SampleBasic( sample.Description );
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?